4 ms·
>Little-endian also feels more natural for big integers: the byte at offset x has weight 256^x. This is literally the opposite of how most programmers in the w
by wyager 12y ago
>Little-endian also feels more natural for big integers: the byte at offset x has weight 256^x.
This is literally the opposite of how most programmers in the world write numbers naturally.
See "1234". The digit at offset x from the right has weight 10^x. That corresponds to big-endian.
Considering that the only important difference between little and big endian is when people have to read or write it by hand, we should probably model it after common human representation...
- hamstergene 12y agoBy the way, this "natural" way of writing numbers comes unchanged from right-to-left writing system of Arabic. They naturally read 1234 starting from the lowest significant digit (here, '4'). Think about the irony :)
- KMag 12y agoI'm not sure about Arabic, but my understanding of Hebrew (another member of the Semitic language family) is that they still pronounce the numbers left to right, and if a line break forces digits to be split across lines, the most significant digits are put on the top line.
- hamstergene 12y agoYou got me curious. I googled and found[1] that indeed they only pronounce numbers 21-99 that way, e.g. for 31 the order of words is "one thirty", but higher order components go left to right, e.g. for 25031 the order of words is "five twenty thousand one thirty". 1. http://arabic.tripod.com/VocabNumbers.htm http://arabic.tripod.com/VocabNumbers.htm