二进制和 Bitstrings

二进制是无符号 8 位字节序列。

1> <<1,2,3,255>>.
<<1,2,3,255>>
2> <<256,257,258>>.
<<0,1,2>>
3> <<"hello","world">>.
<<"helloworld">>

位串是通用二进制,其位长度不一定是 8 的倍数。

1> <<1:1, 0:2, 1:1>>.
<<9:4>> % 4 bits bitstring