• ↑↓ pour naviguer
  • pour ouvrir
  • pour sélectionner
  • ⌘ ⌥ ↵ pour ouvrir dans un panneau
  • ←→ pour naviguer
  • esc pour rejeter
⌘ '
raccourcis clavier

The Comparison

Big Endian and Little Endian are two conventions for storing multi-byte data in memory. The difference is which byte (Most Significant or Least Significant) gets stored at the lowest memory address.

Side-by-Side Comparison

FeatureBig EndianLittle Endian
Byte orderMSB → LSB (MSB first)LSB → MSB (LSB first)
Human readabilityEasier (matches usual notation)Harder (reversed in memory dumps)
CPU examplesMotorola 68k, SPARC (sometimes)Intel x86, AMD64
Network orderStandard (TCP/IP network byte order)Not standard
Arithmetic efficiencyMay need extra byte reorderingEfficient for x86 arithmetic (LSB first)
DebuggingEasier to read memory dumpsHarder to read memory dumps

Visual Example

For 32-bit number 0x12345678:

Big Endian (MSB first):

Address:  1000h  1001h  1002h  1003h
Data:      12     34     56     78

Little Endian (LSB first):

Address:  1000h  1001h  1002h  1003h
Data:      78     56     34     12

Key Insights

  1. Network byte order: TCP/IP protocols mandate Big Endian (called “network byte order”). Little Endian systems must convert when sending data over network.

  2. No “right” answer: Both have valid use cases. Big Endian matches human reading order; Little Endian is more efficient for x86 arithmetic.

  3. Data corruption risk: Mixing systems with different endianness without conversion causes silent data corruption.

  4. Most systems are Little Endian today: Intel x86 dominance made Little Endian the most common desktop/PC architecture.

Connections