Little Endian — Least Significant Byte First
Open a memory dump on almost any laptop or phone, look for the number 0x12345678, and you will find the bytes 78 56 34 12. The number has not been scrambled. Most processors today, including x86 chips and ARM chips in their usual mode, are little endian: they store the little end first.
The rule
Little endian: the little end, the least significant byte, goes first.
The least significant byte is the one worth the least, the rightmost hex pair. Little endian puts it at the lowest address:
0x12345678, little endian:
address: 100 101 102 103
byte: 78 56 34 12Why would anyone choose this? One reason: the byte at the starting address is always the ones byte, whatever the width. The number 5 stored in 8 bytes begins with 05 at the same address as 5 stored in 4 bytes, and addition starts from the low byte just as you add from the rightmost digit.
The real danger is a mismatch: bytes written in one order and read in the other. Suppose a little-endian program writes the 32-bit number 1 as raw bytes: 01 00 00 00. A reader that assumes big endian sees 0x01000000, which is 16,777,216. Nothing crashes; the number is just silently wrong. This is why file formats and protocols state their byte order, and why programs convert explicitly when they read or write binary data.