When searching for a solution to a programming problem on
Portland Patterns Repository today, I ran across something shocking....
First, a little background for non-coders. A common problem in writing cross-platform code is that some computers are
little-endian (least-significant-digits first) and some are
big-endian (most-significant-digits first). That is, 3e3 + 4e2 + 1e1 is written stored as "321" vs."123" (assuming an imaginary base-10 computer).
Human-written numbers, however, when read left-to-right (like most of us do), are big-endian. Except that we don't
all read and write left-to-right.... Arabs write right-to-left (backwards, from our perspective). Now, why does this matter? Consider who invented our numeral system. Yep, the Arabs. But if you look at numbers written by an Arab, they look to be in the same order as ours... which means that our numerical system was originally little-endian, and then when Europeans copied it they kept the ordering of the numbers even though the ordering of the writing is reversed.
Now, consider how much nicer little-endianness is for basic arithmetic - when you carry-over in addition, you carry-over
forwards. After all, when you do math on paper, you do it in a backwards right-to-left fashion, don't you? Which makes perfect sense, if you're the people who designed the system.
Tell me your mind is not blown by this bizarre accident of history.