# Bitstring and binary

**URL:** <https://forum.elixirforum.com/t/bitstring-and-binary/2351>\
**Category:** Questions\
**Created:** [November 12, 2016, 1:57pm UTC](https://forum.elixirforum.com/t/bitstring-and-binary/2351 "2016-11-12T13:57:39Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![minhajuddin](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/minhajuddin/32/1533_2.png) [@minhajuddin](https://forum.elixirforum.com/u/minhajuddin)\
**Post date:** [November 15, 2016, 10:45am UTC](https://forum.elixirforum.com/t/bitstring-and-binary/2351/7 "2016-11-15T10:45:08Z")

</div>

It is both, a quick test shows

```elixir
a = << 3 >>
IO.puts is_bitstring(a) # => true
IO.puts is_binary(a) # => true

```

When you write `<< 3 >>`, there is an implicit `::size(8)` modifier added. So, `<< 3 >>` is the same as `<< 3 :: size(8) >>` and since the number of bits is divisible by 8, it is a binary and a bitstring

---

_[View the full topic](https://forum.elixirforum.com/t/bitstring-and-binary/2351)._
