<p>It's pretty simple. Since the hashes are uniformly distributed, 25 zeroes is as likely as any other possible value for the first 25 hexadecimal digits. There are 16 possible values for each hexadecimal digit, so the number of possible combinations is 16^25, or about a 1,2676506×10<sup>30</sup>. This also means that on average, one in 1,2676506×10<sup>30</sup> hashes will start with 25 hexadecimal zero digits.</p>

<p>To verify the solution, you just compute the hash once and check if it starts with the required number of zeroes. So, it's 10<sup>30</sup> times easier to check the hash than to find it.</p>

CC BY-SA 3.0
2014-09-25T03:07:35.910Z
I should restate my question as it appears that it might not be complete.  If the output is 256 bits, that would be binary {0,1} and not hexadecimal correct?  If I assume the later, then there would be 2^25 possible hashes which start with twenty five zeros.  What would the number of hashes approximately then would I need to compute in order to find one that satisfies this? (2^25)/(2^256)???
mcdoomington
CC BY-SA 3.0
2014-09-25T03:19:07.163Z
In addition to the bits versus hex digits confusion, it looks like 25 turned into 15 somewhere along the line?
Nate Eldredge
CC BY-SA 3.0
2014-09-25T03:26:51.643Z
If you're looking for 25 zero bits, it would be (2^25). The fact that there are 256 total bits is irrelevant.
David Schwartz
CC BY-SA 3.0
2014-09-25T02:40:15.743Z
2014-09-28T20:37:00.857Z
2014-09-28T20:37:00.857Z
David Schwartz
<p>I have a question about bitcoin, lets say that the output is uniformly random and that it is 256 bits in length.  The output of the hash function y=H(t) begins with 25 zeros - how many times would one have to call the hash function to get something that starts with 25 zeros?</p>

<p>Secondly, how does one verify the solution and how many hashes would be attempted to solve it?</p>

CC BY-SA 3.0
2014-09-25T03:16:35.923Z
Does "zeros" mean zero bits or zero hex digits (which would be 100 bits)?
Nate Eldredge
CC BY-SA 3.0
2014-09-25T13:42:18.360Z
zero binary bits as stated.
mcdoomington
<hash><difficulty>
Laymans guess to determine how many hashes must be computed to you find a specific value
mcdoomington
# Laymans guess to determine how many hashes must be computed to you find a specific value

(Asked by: username_0 on 2014-09-25)

I have a question about bitcoin, lets say that the output is uniformly random and that it is 256 bits in length. The output of the hash function y=H(t) begins with 25 zeros - how many times would one have to call the hash function to get something that starts with 25 zeros?

Secondly, how does one verify the solution and how many hashes would be attempted to solve it?

**Tags:** hash, difficulty

> **Comments:**
> **username_1**: Does "zeros" mean zero bits or zero hex digits (which would be 100 bits)?  
> **username_0**: zero binary bits as stated.  

---

## 1 answers

### Answer by username_2 on 2014-09-25. Score: 1

It's pretty simple. Since the hashes are uniformly distributed, 25 zeroes is as likely as any other possible value for the first 25 hexadecimal digits. There are 16 possible values for each hexadecimal digit, so the number of possible combinations is 16^25, or about a 1,2676506×1030. This also means that on average, one in 1,2676506×1030 hashes will start with 25 hexadecimal zero digits.

To verify the solution, you just compute the hash once and check if it starts with the required number of zeroes. So, it's 1030 times easier to check the hash than to find it.

> **Comments:**
> **username_0**: I should restate my question as it appears that it might not be complete.  If the output is 256 bits, that would be binary {0,1} and not hexadecimal correct?  If I assume the later, then there would be 2^25 possible hashes which start with twenty five zeros.  What would the number of hashes approximately then would I need to compute in order to find one that satisfies this? (2^25)/(2^256)???  
> **username_1**: In addition to the bits versus hex digits confusion, it looks like 25 turned into 15 somewhere along the line?  
> **username_2**: If you're looking for 25 zero bits, it would be (2^25). The fact that there are 256 total bits is irrelevant.  

---

