Penguin

Numbering of bits within a byte, and bytes within a multi-byte integer, to correspond more closely to the order in which one might read them in a memory dump. Opposite of LittleEndian.

See Endianness.


Odd fact: even on big-endian CPUs, registers are still little-endian. To see this, consider the following pseudo-AssemblyLanguage sequence:

  • move two-byte integer from A to X
  • move one-byte integer from X to B

Question: will the byte at B end up containing the high byte or the low byte of A?

In little-endian architectures, the answer is always “the low byte”. However, in big-endian architectures, the answer depends on whether X is a memory location or a register; if it’s a memory location, then B gets the high byte. Otherwise, it gets the low byte.