Endianness

Integers are usually 4 bytes. There are two ways that an integer could be stored. Either they could be big endian or little endian.

However, since the order matters only if you access the identical data both as a word and as four individual bytes, few need to be aware of the “endianness”. You only really need to be aware of Endianness when you do Byte Addressing, where you are trying to access individual bytes.

Big Endian

  • Used in MIPS, where the most significant byte (left most) is at the lowest memory address (usual left-right reading; store from least to largest).

Little Endian (Most systems use this)

  • Used in RISC-V, where address of 64-bit word refers to address of ‘little’ or rightmost byte, (containing bit 0 of word)