Leading Zeroes Requirement
The Leading Zeroes Requirement
The most visible feature of a Bitcoin block hash is the string of leading zeroes. These zeroes are the visual evidence of the Proof of Work performed by the miner.
1. Zeroes as Low Numbers
A SHA-256 hash can be any value between 0 and $2^{256} - 1$.
-
If you need a hash that is less than a certain Target, you are effectively looking for a very small number.
-
In hexadecimal, small numbers naturally start with zeroes.
2. Statistical Probability
Finding a hash with a specific number of leading zeroes is purely a game of chance.
-
The probability of a hash starting with one zero (4 bits) is $1/16$.
-
The probability of a hash starting with two zeroes (8 bits) is $1/256$.
-
The probability of a hash starting with $N$ hex zeroes is $1/16^N$.
3. Trillions of Hashes
As of 2024, the Bitcoin network requires roughly 19 leading hex zeroes.
-
Probability: $1 / 16^{19} \approx 1 / 7.5 \times 10^{22}$.
-
This means a miner must expect to calculate 75 sextillion hashes to find a single valid block!
4. Why Zeroes Aren't Everything
While explorers emphasize leading zeroes, the real rule is numeric comparison.
-
Target:
0000 0000 0000 0000 000A B... -
Hash 1:
0000 0000 0000 0000 0009 C...(Valid: $9 < A$) -
Hash 2:
0000 0000 0000 0000 000B D...(Invalid: $B > A$) Both hashes have the same number of leading zeroes, but only one is below the specific target threshold.
The number of leading zeroes is a "coarse" measure of difficulty. The Bits field in the header provides the "fine" measurement that nodes use for exact validation.
In the next section, we will clarify the difference between the Block ID and the Block Hash.
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: