in reply to Re^4: Bit order in bytes
in thread Bit order in bytes
Nybbles == 4-bits, so looking at the byte values in decimal doesn't show it.
Look at the patterns of the nybbles (in hex):
## 'b' lists bits lsb->msb print unpack 'b*', "\x12\x34";; 1248 1248 1248 1248 0100 1000 0010 1100 2 1 4 3 ## 'B' lists bits msb <- lsb print unpack 'B*', "\x12\x34";; 8421 8421 8421 8421 0001 0010 0011 0100 1 2 3 4
|
|---|