4 ms·
Why should the ubiquity of a particular hardware design dictate that you diverge from the canonical representation of a number? If we were laying out digits and
by BlackFly 5y ago
Why should the ubiquity of a particular hardware design dictate that you diverge from the canonical representation of a number? If we were laying out digits and not bytes, everyone would find it bizarre to lay it out little endian, we all know the canonical layout of the digits of a number and changing that really requires some documentation. Why would changing radix change what is canonical? It gets really annoying when you convert from radix 16 to radix 2 and suddenly your "little endian" layout is actually mixed endian because rarely will people apply the endianness to representations of bits (of course, you already see mixed endianness in radix 16, it is only in radix 256 that little endianness exists and isn't actually mixed endian).
So when people are choosing to write things to wire, big endian seems quite natural because what is natural in radix 10 is equally natural in radix 16 and equally natural in radix 2.
- magicalhippo 5y ago> Why should the ubiquity of a particular hardware design dictate that you diverge from the canonical representation of a number? Performance. Byte-swapping "everything" isn't free. And there's already precedence for it, after all most binary formats use multiples of 8 bits for the same reason when storing numbers etc.