endianness (On Holy Wars)

lore

programmingnetworking

The byte-ordering split whose names Danny Cohen borrowed from a satirical war in Gulliver's Travels.

In Swift's novel, Lilliput and Blefuscu go to war over whether to crack a boiled egg at its big or little end; Cohen's 1980 memo used Big-Endian and Little-Endian to needle engineers arguing just as fiercely over which byte comes first. The joke stuck, and the two terms are now the standard vocabulary for machine byte order.

Danny Cohen's 1980 paper On Holy Wars and a Plea for Peace borrowed its terminology from Gulliver's Travels, where Lilliput and Blefuscu went to war over which end of a boiled egg to crack. The analogy was pointed: big-endian and little-endian byte ordering are arbitrary conventions, and neither is meaningfully better.

The argument for each is real but small. Little-endian makes the low byte come first, which suits arithmetic on machines that process incrementally. Big-endian matches how humans write numbers, which makes hex dumps readable left to right. Cohen's actual plea was not that one should win but that a convention should be agreed, because the cost of disagreement exceeds the benefit of either choice.

The disagreement persisted anyway and became a permanent tax. Network byte order is big-endian, most processors people use are little-endian, and every protocol implementation therefore converts, which is why the byte-swap functions exist and why forgetting one produces values that are wrong in a specifically confusing way. Cohen was right about the cost, and the industry paid it for forty years, which is the usual outcome when a coordination problem is left to the market.

Also known as: big-endian, little-endian, byte order, On Holy Wars and a Plea for Peace

Sources

  • Cohen, 'On Holy Wars and a Plea for Peace', IEEE Computer (1981)
  • Swift, 'Gulliver's Travels' (1726)

All glossary entries