Differences Between Little Endian, Big Endian, Middle Endian, and Bi-Endian

Overview

This post summarizes the differences between little endian and big endian.

What is Endianness?

  • The arrangement of multiple bytes is called endianness or byte order.
  • It refers to how data is arranged when loaded into memory.
  • Endianness is determined by the CPU, protocol, or OS.
  • Issues related to endianness often arise when exchanging data between different systems or networks.
    • e.g., Endianness conversion is required when analyzing binary data.

Big Endian

  • A method where data is arranged in memory starting from the lower address, with the most significant byte placed first, followed by the less significant bytes.
  • e.g., Hexadecimal 00 01 02 03 → 00 01 02 03

Little Endian

  • A method where data is arranged in memory starting from the higher address, with the most significant byte placed first, followed by the less significant bytes.
  • e.g., Hexadecimal 00 01 02 03 → 03 02 01 00

Middle Endian

  • A more unconventional method compared to the two above.

Bi-Endian

  • A method that allows switching between big endian and little endian.

References