Endianness is the convention for which byte of a multi-byte value gets stored at the lowest address in byte-addressable memory. There are two main choices: big-endian and little-endian.

Big-endian

The most significant byte (MSB) goes at the lowest address. Bytes appear in memory in the same order you’d write the number on paper, left to right.

For the 32-bit value stored at address :

Address
Data

Used by: traditional PowerPC, SPARC, network protocols (“network byte order” is big-endian).

Little-endian

The least significant byte (LSB) goes at the lowest address. Bytes appear reversed compared to how you’d write the number.

For :

Address
Data

Used by: x86, x86-64, most ARM (configurable but usually little-endian by default), RISC-V.

Why it matters

When you only access a value through an instruction that knows its size (ldw for word, ldb for byte), endianness is invisible — the processor handles the byte-shuffling internally. Where it bites:

  • Cross-platform data exchange. A binary file written by a big-endian machine and read by a little-endian machine sees byte-swapped values. Network protocols pin down byte order explicitly to avoid this.
  • Casting between types. If you write a 32-bit value as four bytes and then try to read it back as a single 32-bit value on a different-endian machine, you get garbage. C unions and pointer casts exhibit this readily.
  • Memory dumps in debugging. A hex dump of memory shows bytes in address order, not the “natural” left-to-right number order. On little-endian, shows up as 78 56 34 12, which can confuse if you’re not expecting it.

The eternal debate

Neither convention is inherently better on modern hardware. Big-endian feels natural to humans reading hex dumps. Little-endian’s historical advantage was on serial-byte ALUs that processed one byte per cycle starting from the LSB — convenient because the LSB sat at the lowest address. Modern parallel ALUs read or write a whole word in one cycle, so neither order has a meaningful arithmetic advantage today. The one residual little-endian convenience is aliased addressing: a byte, halfword, and word load from the same address all read the low bits of the value, which simplifies some pointer-casting tricks. But that’s a software ergonomics point, not a performance one.

Some processors (like ARM and PowerPC) are bi-endian — they can be configured to operate in either mode at boot.

The classic Jonathan Swift origin: Gulliver’s Travels mentions a war between people who break their boiled eggs at the big end vs. the little end. Computer scientists adopted the term in a 1980 paper about exactly this kind of “the choice doesn’t matter much, but you have to pick one and it’ll cause arguments forever.”