Post by Nick McCowinIn a consistent Little Endian scheme shouldn't the bits also be read
from right to left? It seems like the solution for #10b is assuming
that the system is using an inconsistent Little Endian scheme since
each byte has been written down exactly as it is in memory.
This matter is ripe for many possible confusions. Thanks for thinking
hard about it and asking a good question. It can take a while to sort
out the conventions people use to communicate.
The ordering of the bits is actually irrelevant here. The Contents
column of the table is telling us not so much the exact bit layout in
memory, but (as it happens, in hexadecimal notation) the unsigned
numeric value of the memory cell. These values range from 0 through 2^8
- 1, or 0 through 255, or 0 through 0xFF, or 0 through 0b11111111. Even
the binary representation of such a value, say, 0b1010000, doesn't take
a position on bit ordering in memory, it only relies on the convention,
that, on paper, chalkboard, display screen, or any other format intended
for human eyes in North America, the less significant the digit, the
further out to the right it lies.
The Little Endian memory storage scheme is defined only in terms of the
ordering of the bytes, not in terms of bit ordering within a byte. It
is defined in terms of the values of each of the bytes. Hence, the
value represented in addresses 16404 through 16407 in the example is
0x65 * 16^0 + 0x63 * 16^1 + 0x74 * 16^2, which, by the hexadecimal
convention may be written as 0x746365. (It's also, of course 101 * 16^0
+ 99 * 16^1 + 116 * 16^2, or 101 + 99 * 16 + 116 * 256.)
As for the consistency of bit ordering, consistent Little Endian means
that the bit number given to the least significant bit is 0. However,
often bit number zero is written on paper out to the right. Where bit
number zero is physically in memory is open to many possibilities.
The value in the example stored in address 16400 (0x50) could be
expressed on paper with bit numberings in either of the following two
ways. Both ways are consistent Little Endian.
76543210
01010000
01234567
00001010
To get an inconsistent Little Endian, all we would need to do would be
to change the bit numbering scheme:
01234567
01010000
--
Wayne