Endianess

From Rice Wiki
Revision as of 06:55, 2 April 2024 by Rice (talk | contribs) (Created page with "CPUs operate on a group of bits called a ''word''. A 32-bit CPU has a 32 bit (4 byte) word size. '''Endianess''' is the choice of order when storing multiple bytes of a word across memory. There are two choices: Big Endian and Little Endian. Consider storing 0x10203040 in a 32-bit machine In '''Big Endian''', the most significant byte is stored at the lowest part of an address (i.e. big end first). Addresses would look something like 0x10, 0x20, 0x30, 0x40. BE is used...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

CPUs operate on a group of bits called a word. A 32-bit CPU has a 32 bit (4 byte) word size. Endianess is the choice of order when storing multiple bytes of a word across memory. There are two choices: Big Endian and Little Endian.

Consider storing 0x10203040 in a 32-bit machine

In Big Endian, the most significant byte is stored at the lowest part of an address (i.e. big end first). Addresses would look something like 0x10, 0x20, 0x30, 0x40. BE is used on the internet.

In Little Endian, the least significant byte is stored at the lowest part of an address (i.e. little end first). Addresses would look something like 0x40, 0x30, 0x20, 0x10. LE is used on intel machines.