Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How do you read a number like 1234? "One thousand two hundreds thirty four", big endian.

Most (all?) Western languages say out their numbers in big endian, as do East Asian languages like Chinese, Japanese and Korean. It is only natural that we write down our numbers in big endian, it can be argued that the mistake was making little endian CPUs.



Little endian: byte N has value 256^N, bit n has value 2^n.

Big endian: byte N has value 256^(L-N), bit n has value 2^n or 2^(l-n) depending on the architecture (some effectively have little bit-endian but big byte-endian) and where L and l are the byte and bit size of the whole integer respectively.

Design hardware or even write arbitrary precision routines, and you'll quickly realise that "big endian is backwards, little endian is logical".


As bits are generally not addressable / not ordered, it makes no sense to call CPU architecture big/little bit-endian. That makes sense only for serial lines/buses.


Wrong for any CPU with bit manipulation instructions... which is nearly all of them.


How do you read a number like 17? "seventeen", small endian.

Language is messy, some more than others [1].

[1]: https://en.wikipedia.org/wiki/Danish_language#Numerals


"Diecisiete", still big endian. (you could make an argument for numbers between 11 and 15 though)

Yeah, I know there are exceptions, but on average most human languages are big endian.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: