Not sure about your statement on swapping but I cannot see any. hex 12 is decimal 18 = 16 + 2 is binary 00010010 and hex 34 is decimal 52 is binary 00110100.
print unpack 'b*', "\x12\x34";; 01001000 00101100 18 52 print unpack 'B*', "\x12\x34";; 00010010 00110100 18 52
In reply to Re^4: Bit order in bytes
by hdb
in thread Bit order in bytes
by geoffleach
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |