[erlang-questions] Bitstring question

Mike Oxford <>
Wed Feb 12 07:27:14 CET 2014

D = <<33:6>>

I want to convert that 6 bit value (33) into a numeric value.

Why does <<0:2, D>> not work?
Why does <<0:2/bits, D:6/bits>> not work?
Why does <<D/integer>> not work?

Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140211/cc784484/attachment.html>

More information about the erlang-questions mailing list