Big endian vs little endian

The endian is one of the most confusing concept in computer design. I remember it took me so long to remember their difference in year 1 computer course and then I forget which one is which shortly.  The endian answers the question what is the proper byte order inside the computer, to be more specify, which bit should travel first. The big endian thinks the most significant bit should go first, while the little endian believe the least significant bit should go first.

The term big endian and little endian is coined by David Cohen in his legendary paper On Holy Wars and a Plea for Peace. The terms are originated from Swift’s Gulliver’s Travels. In the tale, there are two countries Lilliput and Blefuscu go on war for what is the right way to break an egg, on the big end or on the little end. They are big endian for the former one and little endian for the latter one. In the tale, Swift is satirizing the holy wars between religions with the egg war. Which end to break the egg is such a silly question that people should eat their egg any way they like. However if two computers want to communicate, they have to share the same endian. So, it is some sort of holy war in the computer world, and either side is not going to give up easily.

The little endian have their idea coming from daily language, such as English. We write characters from left to right, start with the first character, second character and so on. Thus, they think it is natural to send the least significant bit first. The big endian are inspired by the mathematicians. In maths, we write from left to right begins with the most significant digit. Each camp has its merits and has been rallying troops for the endian war.  The paper was published in 1981, almost a quarter century ago. Today, the computer world is still split along the line of endian with different protocols, architectures on each camp.  This give us lots of headache when we are building chips to bridge different protocols.

It seems the endian war will never end. As Cohen said, agreement upon an order is more important than the order agree upon. Shall we toss a coin?

One thought on “Big endian vs little endian”

Leave a Reply