creating a binary number
Java House
java4dev@REDACTED
Thu Dec 9 18:46:58 CET 2021
Hi Jacob
I tried it but it does not work
16> Z =
<<<<1>>:1/bitstring,<<1>>:1/bitstring,<<1>>:1/bitstring,<<1>>:1/bitstring,<<1>>:1/bitstring,<<1>>:1/bitstring,<<1>>:1/bitstring,<<1>>:1/bitstring>>.
<<0>>
17> Z.
<<0>>
I should be getting back <<255>> but I get back 0.
Στις Πέμ 9 Δεκ 2021 στις 5:17 μ.μ., ο/η Jacob <jacob01@REDACTED> έγραψε:
> On 12/9/21 5:04 PM, Java House wrote:
>
> > Hello
> >
> > I am trying to build a binary number but I cannot find the correct way:
> > 13> <<1:1/bitstring,
> >
> 0:1/bitstring,0:1/bitstring,0:1/bitstring,0:1/bitstring,0:1/bitstring,0:1/bitstring,0:1/bitstring>>.
>
> It's either << <<1>>:1/bitstring >> or << 1:1 >> (for one bit).
>
> Jacob
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20211209/e8a7dc47/attachment.htm>
More information about the erlang-questions
mailing list