4 ms·
What happens is that all machines that matter are little endian but network works always in Big Endian.
by bumbada 5y ago
What happens is that all machines that matter are little endian but network works always in Big Endian.
- londons_explore 5y agoWe'll have to keep it as a quirk of history... A bit like the electron has a negative charge...
- PixelOfDeath 5y agoThey hat a 50/50 chance at getting the technical electricity direction right... and the fucked it up!
- bombcar 5y agoIsn’t big endian a bit more natural considered on a bit level? The bits start from highest to lowest on a serial connection.
- ben509 5y agoBig-endian is natural when you're comparing numbers, which is probably why people represent numbers in a big-endian fashion. Little-endian is natural with casts because the address doesn't change, and it's the order in which addition takes place.
- kangalioo 5y agoI feel like big endian is more _intuitive_ because that's what our number notation has evolved to be. But more _natural_ is little endian because, well, it's just more straightforward to have the digits' magnitude be in ascending order (2^0, 2^1, 2^2, 2^3...) instead of putting it in reverse. Plus you encounter less roadblocks in practice with little endian (e.g. address changes with casts) which is often a sign of good natural design
- CydeWeys 5y agoI'm curious how you're defining "natural", and if you think ISO-8601 is the reverse of "natural" too. All human number systems I've ever seen write numbers out as big Endian (yes, even Roman numerals), so I'm really struggling to see how that wouldn't be considered natural.
- ByteJockey 5y agoIt seems like it would be a more natural for representing the number when communicating with a human. But that's not what we're doing here, so it's not entirely relevant.
- bombcar 5y agoCounting out change is little endian - usually you start cents then dollars. I wonder if we went big endian “by mistake” with Arabic numerals given that Arabic is written right to left. Some ancient texts have “four and twenty” which is little endian. We also add commas to large numbers to help with a human processing problem - you have to get to the end of the number to know what the first digit represents and then count backwards (groups of three help).
- a1369209993 5y ago> The bits start from highest to lowest on a serial connection. This is only true on a big endian serial connection (that is, one that, tautologically, sends the most-significant bit first). Offhand, I think most serial protocols are big endian, but by that logic, most CPUs are little endian, so that doesn't really help. The thing that's actually useful about big endian is not that it's natural (as kangalioo points out, that's little endian) or that it's how humans write numbers (by that logic crap like BCD or decimal floats is a good idea), but that big endian preserves lexicographic order of fixed-width integers.