Skip to content

big endian

Big-endian is a way of ordering the bytes of a multi-byte value so that the most significant byte, the one carrying the largest place value, is stored at the lowest memory address or transmitted first:

Two rows of four byte cells for the value 0x0A0B0C0D over a shared memory address axis. The big-endian row reads 0A 0B 0C 0D and the little-endian row reads 0D 0C 0B 0A.
The same value 0x0A0B0C0D reverses byte order between big-endian and little-endian across the same memory addresses.

This ordering matches how people write numbers by hand, with the largest place value on the left, so a memory dump of a big-endian value reads in the same direction as the number it represents. The opposite convention, little-endian, places the least significant byte first.

Both names come from Gulliver’s Travels, where the empires of Lilliput and Blefuscu go to war over which end of a boiled egg to crack. Danny Cohen borrowed them for computing in a 1980 note on byte order.

Big-endian is the fixed order in several common settings:

  • Network byte order: the internet protocol suite transmits the bytes of an address or port most significant first, so every host reads a packet the same way regardless of its native order.
  • Processor families: IBM mainframes, the Motorola 68000, and SPARC store memory big-endian, while x86 and most ARM chips are little-endian.
  • Interchange formats: many formats fix a big-endian layout so a file is interpreted identically on any machine.

A signed integer or other value written to a binary file carries no marker of its byte order, so a program reading it back has to know the declared layout in advance.

Bytes Objects: Handling Binary Data in Python

Tutorial

Bytes Objects: Handling Binary Data in Python

In this tutorial, you'll learn about Python's bytes objects, which help you process low-level binary data. You'll explore how to create and manipulate byte sequences in Python and how to convert between bytes and strings. Additionally, you'll practice this knowledge by coding a few fun examples.

intermediate python

For additional information on related topics, take a look at the following resources:


By Martin Breuss • Updated July 17, 2026