Got another Erlang binary representation query ('coz that's what I am reading about these days, and need for binary protocol implementation).
If I understand the type-specifier properly, then, for a "float" type value the 8 byte representation seems fine (this is on 64-bit Win7).
1> <<A1/binary>> = <<12.3214/float>>.
<<64,40,164,142,138,113,222,106>>
However what stumped me, was that the "integer" type value's binary representation.
2> <<A2/binary>> = <<32512/integer>>.
<<0>>
3> <<A3/binary>> = <<232512518/integer>>.
<<6>>
4> <<A5/binary>> = <<80/integer>>.
<<"P">>
Why are all of those represented in 1 byte ? Can someone please explain this ?