
On Tue, Jul 06, 2021 at 02:29:51PM +1200, Lawrence D'Oliveiro wrote:
On Tue, 6 Jul 2021 14:05:49 +1200, Michael Cree wrote:
On Tue, Jul 06, 2021 at 01:00:15PM +1200, Lawrence D'Oliveiro wrote:
Having used both kinds of computer architectures over the years, I agree. Little-endian ordering is more mathematically consistent.
What do you mean? They are both mathematically consistent. If one was not mathematically consistent it would not have even been used.
Big-endian was mainly used because it was easier to get data dumps to match reading order, which might have been helpful for debugging.
Consider the numbers assigned to three different things in a multibyte object: the bytes within the object, the bits within the byte/object, and the weightings of the bits as digits in a binary integer (bit 0 represents 2**0, bit 1 represents 2**1 etc). Only in little-endian do you have a straightforward relationship among all three: in big-endian layouts, it is unavoidable that at least one of the three ends up the opposite way to the others.
Which is what I was explaining in the response I gave and you snipped from your reply. I agree that little-endian is much more sensible when extending or truncating integer numbers. My point is that the above, and the other things you mentioned further in your email, do not amount to mathematical inconsistency. Indeed, I would even query the claim that anything can be "more" mathematically consistent, because it is either mathematically consistent or it is not. Cheers Michael.