Best question to ask
Why <<5::2>> == <<1::2>>? Elixir
Bits vary in size not in numbers
Published in
3 min readApr 18, 2020
This article talks about the bitstrings and binaries representation. Let’s dive.
In Elixir we use <<0>>
for binary(8 bits) reprsentation. However, we can tell how many bits of information we need with size(num) i.e <<5::size(3)>>
for 3
bits instead of size(8)
which is…