5 ms·
Everything is consistent in the big (down to the nybble and bit) endian view. The number 0x12345678 is actually the nybbles 1 2 3 4 ... which are the bits 0001
by kazinator 9y ago
Everything is consistent in the big (down to the nybble and bit) endian view.
The number 0x12345678 is actually the nybbles 1 2 3 4 ... which are the bits 0001 0010 0011 0100 and so on.
In the hex dump 12 34 56 78 we just understand the bytes to be big-endian also at the nybble level (and bit also).
That is to say the "1" can be understood to be at the lower "nybble address", relative to the "2".
If that buffer is sent over a serial communication channel or network, the bits actually go in that order 0001 0010 0011. The 1 nybble goes out first, as 0001 (three zeros out the door, then a one), then the 2 nybble and so on.
- spc476 9y agoIt depends. with RS-232 (the old serial port standard) bits were transmitted least-significant-bit first, with the most significant bit sent last [1]. Getting back to hex dumps, here's one of some data: 00000000: 6C 6F 77 09 30 0A 66 72 65 65 09 31 32 32 0A 65 low.0.free.122.e You can see it's ASCII. A little endian dump of that would be e.221.eerf.0.wol 65 0A 32 32 31 09 65 65 72 66 0A 30 09 77 6F 6C :00000000 It makes reading any text in binary data a bit difficult. [1] My first computer was a Tandy Color Computer, which had a serial port driven directly by the CPU. I learned pretty quickly which bit goes first.