Endianness refers to the way in which bytes are ordered in computer memory. It is essential to understand endianness when working with computer memory and saving or fetching numbers in it. There are two types of endianness: big-endian and little-endian.
In big-endian, the most significant byte (MSB) is stored at the lowest memory address, while the least significant byte (LSB) is stored at the highest memory address. This means that if we have a 4-byte integer 0x12345678
, it will be stored in memory as follows:
Address | Value |
---|