Why are numbers written in descending order? Is there any advantage of doing so, especially in left-to-right writing systems?
Wouldn't it be more convenient to do it in ascending order? For example:
In straight form, 1234 + 56 can be written like this:
4321 + // If we use left alignment, the operator should be on the right for convenience 65 ------ 1 0921
In the convention of left-to-right writing systems, the evaluation can be done from left to right, rather than from right to left. Also, the left alignment is similar to the writing system. (I hope this isn't the answer to my question ‐ please don't tell me people tried to make the number system different from the writing system so that arithmetics looks more professional!)
Similarly, 1234 - 567:
4321 - 765 ------ 111 766
From this, we can also notice another advantage of using ascending order, that is, convenience when the expression is written inline. This is a common situation faced by students who write inline expressions in grid exercise books ‐ when I write
1234 - 567 inline, I may not know (suppose I am very bad at mental calculation) how many digits the result would be, so I do it from the last digit, and when I realized that there is an empty digit (or an extra digit for addition), I need to rub it out and rewrite it (so that everything is in its proper grid). This is actually troublesome because you need to leave some space and estimate the number of digits left.
Actually, this kind of advantage is also reflected in computer science, where in many operating systems, integers are stored in small endian (starting from the least significant byte) instead of big endian (starting from the most significant byte), because when you convert a
short (2 bytes) to an
long long (8 bytes) you just need to pad NUL bytes behind until all 8 bytes of memory allocated are filled, rather than adding in front of it where you need to calculate 10, like this:
// small-endian a = 12 34 // we now allocate 8 bytes b = 00 00 00 00 00 00 00 00 // now we copy 2 bytes from memory address of a to memory address of b b = 12 34 00 00 00 00 00 00 // big-endian a = 34 12 b = 00 00 00 00 00 00 00 00 // we can't copy from memory address to memory address directly // we have to calculate 8 - 2 = 6, then add 6 to the memory address of b b = 00 00 00 00 00 00 34 12
We see a similar problem when trying to convert from
long long to
short. In small endian, we just need to copy the 8 bytes from the beginning until the memory in the
short is filled up (i.e. copy the first 2 bytes), but in big endian, we need to copy starting from the 7th byte.
In a left-to-right writing system widely used in Europe (I refer to Roman numerals as the source of this descending order system), isn't it going to cause similar trouble?
In multiplication, the number of digits in the result is probably even more unpredictable.
I'm currently writing a problem that implements arbitrary-base arbitrary-digit non-recurring number representation (don't ask me why), and when implementing it, it came to me that implementing it starting from the lowest digit is much more convenient.