Intel CPUs & Satoshi's Choice
Intel CPUs & Satoshi's Choice
Why did Satoshi Nakamoto decide that Bitcoin should be Little Endian? The answer lies in the hardware that was available in 2008: the Intel x86 Processor.
1. The Intel Legacy
The x86 architecture (used in almost all desktop and laptop computers) is natively Little Endian.
-
When a programmer writes the number
5to a 4-byte integer in memory on an Intel chip, the chip automatically writes it as05 00 00 00. -
Satoshi was writing Bitcoin in the C++ language on a Windows PC (likely with an Intel CPU).
2. Zero-Effort Serialization
By choosing Little Endian, Satoshi made the code extremely fast for the computers of that era.
-
To "Save" a number to disk, the computer just copied the raw bytes from the CPU memory directly into the file.
-
There was no need to "Flip" the bytes before saving. This saved precious CPU cycles during a time when computers were much slower than they are today.
3. The "Casting" Trick
In C++, you can "cast" a piece of memory directly into a structure.
-
If you have a block of 4 bytes on disk, an Intel CPU can read them directly into a variable.
-
If Bitcoin had used Big Endian, every single number in every transaction would have to be manually reversed before it could be used in a calculation.
4. The Modern Conflict
Today, many mobile devices (ARM chips) can support both Little and Big Endian (Bi-Endian). However, because the original protocol was defined by the Intel-native format, the entire world must now follow the "Little Endian" rule for Bitcoin transactions, regardless of what hardware they are using.
5. Performance vs. Readability
Satoshi prioritized Performance over Human Readability.
-
It is harder for a human to read
80 F0 FA 02as 50 million. -
But it was faster for a 2009-era Pentium processor to read it. Since the blockchain is meant to be processed by machines, the "Machine-First" logic won.
| Year | Hardware | Native Endianness |
|---|---|---|
| 2009 | Intel Pentium / Core 2 | Little Endian |
| 2024 | Apple M3 (ARM) | Bi-Endian (Defaults LE) |
| Protocol | Bitcoin Core | Strict Little Endian |
In the next section, we will compare Big Endian: The Network Standard.
TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation: