General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Lawrence D’Oliveiro
Computerphile
comments
Comments by "Lawrence D’Oliveiro" (@lawrencedoliveiro9104) on "Endianness Explained With an Egg - Computerphile" video.
The mistake lies in thinking that there is a “left” and “right” in memory. There isn’t, any more than there is a “top” or “bottom”. There are only numbers for bytes/words, and numbers for bits within a word. Spatial arrangement only applies when a human looks at a diagram. The usual reading order for English (or any other language using some variation of the Roman, Greek or Cyrillic alphabets) is left-to-right, top-to-bottom. If the bit numbers within a word should be in decreasing order from left to right, then, for consistency, shouldn’t we have word addresses decreasing from top to bottom?
3
If you look at the three different kinds of address numbering needed for memory, they are * byte addresses within memory (call this number B) * bit numbers within a byte for masking (call this number b) * bit numbers within a byte for integer digit values (call this number a) In all little-endian architectures, we have a = b and B = int(b / 8) which is very simple and straightforward. But in big-endian architectures, the situation is more complicated. Also, another peculiarity of big-endian architectures is that CPU registers are still effectively little-endian! For example, consider an instruction sequence like move_word a → b move_byte b → c Does c end up with the high or low byte of a? In little-endian architectures, it is always the low byte. In big-endian architectures, it is the high byte if b is in memory, but the low byte if b is a register! Thus, the only truly consistent byte/bit layout is little-endian.
2