What is Bitcoin Mining? Proof-of-Work, Hash Functions, and Hexadecimal Numbers (Article 5 of 52)

This is one article in a collection of 52 articles published weekly throughout 2023 on the basics of Bitcoin.  The series is intended for people unfamiliar with Bitcoin or people wishing to enhance their understanding of the fundamentals that underpin the technology.  Please contact us, if you have any questions or comments.


As discussed in our previous publication, a block is mined (i.e. created) approximately every 10 minutes.  A mathematical formula is used to determine who successfully mines the next block using a concept known as proof-of-work.  The proof-of-work concept ensures that a certain amount of computation power is expended before the next block is created.  The proof-of-work system the Bitcoin protocol uses is important to grasp so one can conceptualize the security of the Bitcoin protocol despite being completely decentralized.  While there are several different types of proof-of-work systems, Bitcoin miners essentially enter guesses (known as a nonce) to see if they can come up with the right criteria to successfully mine the next block.  To understand bitcoin mining it is essential to know the basics of hash functions and hexadecimal numbers.

A hash function is a computer program which transforms any kind of data of any length to a fixed number of characters.  There are many different hashing algorithms that have been created.  However, the Bitcoin protocol uses the hashing algorithm known as Secure Hash Algorithm 256 (SHA256). Technically the Bitcoin protocol uses double SHA256 which means data is put into the hash function two times.  SHA256 provides a fixed length output of 64 characters using only the hexadecimal numbers.  The hexadecimal number system, which includes 16 characters 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, and f, is frequently used in computer science because it allows 4 bits of data to be used efficiently which is always one of the paramount goals for programming.

A useful hash function has the following five characteristics:

  1. The hash function creates a hash value on any length of data quickly;
  2. The hash function is deterministic. This means the hash function always creates the same hash value (output) for the same input;
  3. The hash function is pseudorandom. This means the hash value returned should change unpredictably when the input of data is changed, even if the change is slight. However, a hash function is only pseudorandom because an identical entry should always produce the same hash value (i.e. it is deterministic);
  4. The hash function is preimage resistant. This means the input cannot be calculated or determined based on the hash value.  In other words, the hash function only works in one direction from input to output.  Under no circumstances should a person or even the strongest super computer be able to determine the input of a useful hash function from the hash value; and
  5. The hash function is collision resistant. This means there is only one input that creates a hash value. If there are two inputs that create the same hash value, the hash function is not collision resistant.

SHA256 has many applications outside of Bitcoin and has continually met the five criteria discussed above.  We encourage our readers to play around with the SHA256 algorithm which can be found in this link.  Our next publication will explore how these tools are used to determine which miner successfully mines the next block on the Bitcoin blockchain (or time chain as Satoshi originally called it).

About the Author

Picture of <a href="https://cryptoustaxattorneys.com/ryan-p-moulder/" target="_blank" red="no opener">Ryan P. Moulder</a>

Ryan Moulder is the founder of Crypto US Tax Attorneys. Additionally, he serves as the General Counsel and owner at Accord Systems, LLC. Ryan received his LL.M. from Georgetown University Law Center and his J.D. from Saint Louis University School of Law. He has distinguished himself as a leader in evolving areas of tax law and has written and spoken on a variety of evolving tax law topics as it relates to compliance for individuals and companies.

Previous Publications

Share Our Information

Legal Consent

The information contained on this site is not, nor is it intended to be, legal advice. An attorney should be consulted for advice regarding your situation. Copyright © 2023 by Crypto US Tax Attorneys. All rights reserved. You may reproduce materials available at this site for your own personal use and for non-commercial distribution. All copies must include this copyright statement.

The virtual currency referenced in any publication is not intended to be investment advice. All investment strategies and investments involve risk of loss. Nothing contained in this website should be construed as investment advice. Any reference to a specific cryptocurrency's past performance is not, and should not be construed as, a recommendation or a guarantee of any specific outcome or profit.