4 ms·
I've read that since Arabic goes right-to-left, decimal numbers are little-endian there.
by abecedarius 2y ago
I've read that since Arabic goes right-to-left, decimal numbers are little-endian there.
- flohofwoe 2y agoI think it's the other way around, our numbers use an unusual right-to-left notation because we got them from the Saracens. The "natural" notation fitting our left-to-right-writing would look like Turings binary.
- dragonwriter 2y agoThe natural notation fitting our spoken language combined with the left-to-right writing system used for it is big-endian. Which is what we use.
- flohofwoe 2y agoLook at some Arabic text, they use the same "number endianess" as we do, and the Arabs is where we got our numbers from. I bet it was a historical accident that we didn't reverse the written numbers when adopting the decimal system into our left-to-right writing system. In some Germanic languages the spoken numbers (for the last two digits at least) are even still reversed from the writing, eg "twenty-five" is "five-and-twenty" in German - same in "old English" btw). PS: interesting tidbit, apparently "old" Arabic was reading numbers strictly from right-to-left (eg one-and-ten-and-hundred), but later switched to a more "western convention" of starting with the major digits. Would be interesting how it worked in the original Hindu system (where the Arabs learned of the decimal system).
- abecedarius 2y agoIt looks like the Hindu numbers originated in a left-to-right script https://en.wikipedia.org/wiki/Brahmi_script https://en.wikipedia.org/wiki/Brahmi_script though I couldn't find Wikipedia addressing this endianness question in the pages on Hindu-Arabic numerals. Agreed re little-endian being at least as natural, and apparent historical accidents. (Edit: I'm doubting the advantage claimed below, now that I wrote it out. The mental ops are serial either way.) There is a small advantage of big-endian for manual arithmetic which I only noticed the other day: in summing a column of numbers in carry-save style, it seems easiest to add the digits left-to-right in your inner loop, with a one-digit mental scratchpad and a one-line accumulator. Pretty much opposite of what I was taught in grade school. ("Carry-save" means expanding the range of digits from 0-9 to 0-a (10), and delaying carry propagation until the very end. So the scratchpad digit may need incrementing before going into the accumulator, depending on the next single-digit addition, but carries never propagate further than that one place per step until you reach the bottom line. This seems to help in bounding the needs for short-term memory and avoiding variation in steps which could throw you off, as a fallible human.)
- dragonwriter 2y ago> Look at some Arabic text I'm not arguing origins. I am saying that irrespective of the path by which it arrived at that, in modern English at least, the order in which things are read in the order they are spoken, as is the case for the rest of the symbols in our written language (and therefore the "natural order"), is big-endian. Something else may have been "natural" for some other languages spoken at some other time and place, but...
- tengwar2 2y agoTo the extent that Roman numbers have a direction, it is the same as for Arabic numbers. The current year is MMXXIIII (or MMXXIV in the more familiar notation generally taught in modern schools). You can't write this as IIIIXXMM. There is only one exception that I know of: the 22nd Legion wrote their number as IIXX, but this caused confusion at the time.