Big-Endian vs Little-Endian: How Do You Remember Which is Which?

If you need to read binary files or binary streams, you need to know whether the file you’re reading is big-endian or little-endian.

It’s about the order that the bytes are stored in the file. For example the number 1, stored as a 32 bit integer, is 00000001, occupying 4 bytes. That means you need a sequence of four bytes in the file to store the number. If you put the byte that holds the most significant bits first, then the bytes look like this: Continue reading “Big-Endian vs Little-Endian: How Do You Remember Which is Which?”