Author

Topic: output hash value to begin with 10 zeroes : average number of tries? (Read 626 times)

hero member
Activity: 793
Merit: 1026
each byte is two characters, so 10 zeros is actually five 00 bytes.  one byte has 256 possible combinations, so assuming that each combo is just as probable as any other combo, the probability is (1/256) * (1/256) * (1/256) * (1/256) * (1/256) = 1/1099511627776
kjj
legendary
Activity: 1302
Merit: 1026
More directly, you can see that hex is base 16, so 1610 = 1,099,511,627,776
Gol
newbie
Activity: 47
Merit: 0
newbie
Activity: 23
Merit: 0
In binary format, for every bit that you require in the front to be zero you have 1/2 chance, so if you want to have n bits to be zero, then it's 1/2**n chance (or on average 2**n tries).

If you want the beginning of the the hash in hex representation to be 0: every hex character is actually 4 bits, so for m digits, you'll need 2**(m*4) tries. For 10 zeros in the front it is 2**(10*4) = 2**(40) = 1099511627776 ~ approx 1.1 Trillion tries.
Gol
newbie
Activity: 47
Merit: 0
Hello all,
is there a way to calculate the average number of tries(proof of work) for
output hash value to begin with 10 zeroes?

thank you!
Gol
Jump to: