Bitcoin Forum
April 25, 2024, 04:35:42 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: output hash value to begin with 10 zeroes : average number of tries?  (Read 603 times)
Gol (OP)
Newbie
*
Offline Offline

Activity: 47
Merit: 0


View Profile
February 26, 2014, 09:39:36 AM
 #1

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
1714019742
Hero Member
*
Offline Offline

Posts: 1714019742

View Profile Personal Message (Offline)

Ignore
1714019742
Reply with quote  #2

1714019742
Report to moderator
1714019742
Hero Member
*
Offline Offline

Posts: 1714019742

View Profile Personal Message (Offline)

Ignore
1714019742
Reply with quote  #2

1714019742
Report to moderator
You get merit points when someone likes your post enough to give you some. And for every 2 merit points you receive, you can send 1 merit point to someone else!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714019742
Hero Member
*
Offline Offline

Posts: 1714019742

View Profile Personal Message (Offline)

Ignore
1714019742
Reply with quote  #2

1714019742
Report to moderator
1714019742
Hero Member
*
Offline Offline

Posts: 1714019742

View Profile Personal Message (Offline)

Ignore
1714019742
Reply with quote  #2

1714019742
Report to moderator
imrehg
Newbie
*
Offline Offline

Activity: 23
Merit: 0


View Profile WWW
February 26, 2014, 12:07:06 PM
 #2

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 (OP)
Newbie
*
Offline Offline

Activity: 47
Merit: 0


View Profile
February 26, 2014, 02:06:59 PM
 #3

WOW, thanks!
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1024



View Profile
February 26, 2014, 05:39:17 PM
 #4

More directly, you can see that hex is base 16, so 1610 = 1,099,511,627,776

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
luv2drnkbr
Hero Member
*****
Offline Offline

Activity: 793
Merit: 1016



View Profile
February 26, 2014, 07:16:02 PM
 #5

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

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!