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:
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.
Related Resources
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.
For additional information on related topics, take a look at the following resources:
- Binary, Bytes, and Bitwise Operators in Python (Course)
- Socket Programming in Python (Guide) (Tutorial)
- Python's Bytearray: A Mutable Sequence of Bytes (Tutorial)
- Bitwise Operators in Python (Tutorial)
- How to Convert Bytes to Strings in Python (Tutorial)
- Unicode & Character Encodings in Python: A Painless Guide (Tutorial)
- Programming Sockets in Python (Course)
- Python Bytes (Quiz)
- Socket Programming in Python (Quiz)
- Python's Bytearray (Quiz)
- Bitwise Operators in Python (Quiz)
- How to Convert Bytes to Strings in Python (Quiz)
- Unicode in Python: Working With Character Encodings (Course)
By Martin Breuss • Updated July 17, 2026