DEV Community

Cover image for Differences Between Little Endian, Big Endian, Middle Endian, and Bi-endian
Kenta Takeuchi
Kenta Takeuchi

Posted on • Originally published at bmf-tech.com

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

This article was originally published on bmf-tech.com.

Overview

This article summarizes the differences between Little Endian and Big Endian.

What is Endian?

  • The method of arranging multiple bytes is called Endian or byte order.
  • It refers to how data is arranged when loaded into memory.
  • Endian is determined by the CPU, protocol, and OS.
  • Problems related to Endian can easily arise when exchanging data between different systems or networks.
    • e.g. Endian conversion is necessary when analyzing binaries.

Big Endian

  • A method where data is arranged from the lower address in the order of higher bytes to lower bytes.
  • e.g. Hexadecimal 00 01 02 03 → 00 01 02 03

Little Endian

  • A method where data is arranged from the higher address in the order of higher bytes to lower bytes.
  • e.g. Hexadecimal 00 01 02 03 → 03 02 01 00

Middle Endian

  • A more irregular method than the above two.

Bi-endian

  • A method that switches between Big Endian and Little Endian.

References

Top comments (0)