3.4  Byte Ordering

Different microprocessor vendors use different byte-ordering schemes. For example, Intel processors have traditionally been little-endian. Motorola processors have always been big-endian. Big-endian is an order in which the "big end" (the most-significant byte) is stored first. Little-endian is an order in which the "little end" (the least-significant byte) is stored first.

3.4 and 3.5 show a representation of the hexadecimal value 0xFF342109, where the number is stored at memory locations 0x1000 through 0x1003 on a little-endian machine and a big-endian system respectively.

Figure 3.4 Representation of 0xFF342109 on a Little-endian System

The diagram illustrates how the hexadecimal value 0xFF342109 is stored at memory locations 0x1000 through 0x1003 on a little-endian machine. The byte at address 0x1000 stores the value 0x09. The byte at address 0x1001 stores the value 0x21. The byte at address 0x1002 stores the value 0x34. The byte at address 0x1003 stores the value 0xFF.

Figure 3.5 Representation of 0xFF342109 on a Big-endian System

The diagram illustrates how the hexadecimal value 0xFF342109 is stored at memory locations 0x1000 through 0x1003 on a big-endian machine. The byte at address 0x1000 stores the value 0xFF. The byte at address 0x1001 stores the value 0x34. The byte at address 0x1002 stores the value 0x21. The byte at address 0x1003 stores the value 0x09.