# Big-Endian/Little-Endian argument - paper by Danny Cohen

Reading a book I was redirected to "On holy wars and a plea for peace" paper by Danny Cohen, which covers the "holy war" between big-endians and little-endians considering byte-order.

Reaching the summary of the memory section I got confused as the author sais:

To the best of my knowledge only the Big-Endians of Blefuscu have built systems with a consistent order which works across chunk-boundaries, registers, instructions and memories. I
failed to find a Little-Endians' system which is totally consistent.

Which kind of contradicts his previous text sections covering little-endian:

e.g.

When they add the bit order and the byte order they get:

               ...|---word2---|---word1---|---word0---|
....|C3,C2,C1,C0|C3,C2,C1,C0|C3,C2,C1,C0|
.....|B31......B0|B31......B0|B31......B0|


In this regime, when word W(n) is shifted right, its LSB moves into the MSB of word W(n-1). 4

English text strings are stored in the same order, with the first character in C0 of W0, the next in C1 of W0, and so on.

This order is very consistent with itself, with the Hebrew language, and (more importantly) with mathematics, because significance increases with increasing item numbers (address).

he even lateron sais:

The Big-Endians struck again, and without any resistance got their way. The decimal number 12345678 is stored in the VAX memory in this order:

                       7 8  5 6  3 4  1 2
...|-------long0-------|
....|--word1--|--word0--|
.....|-C1-|-C0-|-C1-|-C0-|
......|B15....B0|B15....B0|


This ugliness cannot be hidden even by the standard Chinese trick.

How did the author get to this completely different conclusion on overall consistency?

An answer does not have to only base on the text, but may also include other sources which might clear up how the statement is sound.

• What's the question? – Dave Clarke May 6 '12 at 7:13
• I am now wondering how the author got to this completely different conclusion on overall consistency – Sim May 6 '12 at 8:33
• Maybe you could add that as a question on the bottom. – Dave Clarke May 6 '12 at 8:40
• I did now point it out a bit more – Sim May 6 '12 at 9:39
• An actual question would make it clearer. – Dave Clarke May 6 '12 at 9:43

The first statement says that there is a system that consistently uses the big-endian convention for various things (instructions, registers, etc.) The second statement says that the little-endian convention is more elegant ("consistent with itself").

• I failed to find a Little-Endians' system which is totally consistent. <-> This order is very consistent with itself, with the Hebrew language, and (more importantly) with mathematics, because significance increases with increasing item numbers (address). (speaking about little-endian). And the underlying tone is also quite contra big-endianes as far as I understood. >>This ugliness cannot be hidden even by the standard Chinese trick. Therefore the conclusion doesn't fit the text. – Sim May 7 '12 at 19:37
• Furthermore I actually fail to see the consistency in "7 8 5 6 3 4 1 2" actually meaning 12345678 – Sim May 7 '12 at 19:40
• This is getting ridiculous, but let me try one more time. (a) "There are cars that are completely black, but no car that is completely white." (b) "White is more beautiful than black." You somehow claim that (a) and (b) are contradictory. Plus, your second comment is simply wrong: the document you quote never says such a thing (which would be the equivalent of "black is beautiful"). Glossary: white = little-endian; black = big-endian; car = system. – rgrig May 7 '12 at 20:06
• so the author does a "practical" summary, not considering the theory but just the practical accomplishments done by either party? – Sim May 7 '12 at 21:16

In the first statement, the author states that he failed to find a little-endian system that is totally consistent across chunk-boundaries, registers, instructions, and memories.

In the second statement, the author states that the little-endian representations are consistent with Hebrew but the English characters appear to be written backward and he considers this only as an aesthetic problem which was worked around by using Chinese top-down representation.

When the author moved on to compare the floating point number representations in big-endian and little-endian, the little-endian representations were not consistent.

He also states: "Having scored so easily in the floating point department, the Blefuscuians moved to new territories: Packed-Decimal. "

In the third statement, the author moved on from floating point representation to Packed-Decimal where he states that the big-endian struck again by being consistent and the decimal number '12345678' stored in VAX memory is ugly and cannot even be worked around by Chinese top-down representation. VAX is little-endian.

So, in all 3 statements/methods, the author figures that big-endian representations were consistent unlike little-endian.

He concludes by stating that it does not matter whichever way is chosen but it is important that both parties agree upon an order.

The author states: "I do hope that my way will be chosen, but I believe that, after all, which way is chosen does not make too much difference. It is more important to agree upon an order than which order is agreed upon."