 # Bitcoin Mining Simplified

Mining takes care of two aspects in the Bitcoin computer code. Firstly, Mining secures the content of the Bitcoin accounting journal -the Blockchain- in order for it to become unchangeable. Secondly, Mining is also the tool that is at the basis of the creation of consensus between network participating computers on new transactions to be added to the database.

This first part of a set of 2 articles concentrates on the first aspect: the way Mining secures the content of the Bitcoin accounting journal, also referred to as the Bitcoin Blockchain or the database.

Mining secures the accounting journal with the help of some mathematics which is complex in its details but rather accessible in its principles. In the rest of this article, we’ll explain these principles and how they allow for the accounting journal to become unchangeable and tamperproof. Let’s dive into it!

Do you remember those equations for which you have to compute the unknown X? Bitcoin mining -also called “POW” or “Proof of Work”- is exactly that: finding the solution for the unknown X in an equation! Be aware that the real formula in Bitcoin Mining is not a summation. We just use the summation formula in order to make the reasoning accessible!

A feature of an equation with an unknown X is that when X is found, then the KNOWN becomes “LOCKED” and unchangeable. If you put another number than 5 in the equation, then the solution found for X doesn’t hold anymore and must be recomputed in order for the equation to equate again.

Let’s take the above and explain in accessible terms how it translates into the -for the sake of this article, simplified- equation used for Bitcoin mining.

The number “5” is the first KNOWN in the above equation. For the equation used for Bitcoin mining, the first KNOWN is the numerical representation of all the data in the Blockchain database. The second KNOWN in the above equation is “0”. In the equation used for Bitcoin mining, the second KNOWN is also ZERO (this is not completely accurate, but for the sake of simplicity, let’s suppose it’s zero), which is simply a requirement for the equation to be equal to a fixed point.

Now, what’s the sense of all this? Well, if someone changes the content of the Bitcoin Blockchain database, then its numerical representation changes and by consequence, the solution that was found for X for the equation to be equal to zero doesn’t hold any more! As the solution for X was published to all the participants in the network, everybody notices that X doesn’t solve the equation anymore and thus everybody is alerted that something changed in the content of the database. At that moment, everybody reverts to the version of the database that is unchanged.

The whole system is a simple way to create an unchangeable database!

So mining is nothing else than the computation of the UNKNOWN X that solves the equation to be equal to ZERO. Once the UNKNOWN is found and published for everyone in the peer to peer network, then the content of the database becomes “LOCKED” and unchangeable!

The real function used in Bitcoin mining is a cryptographic function called HASH in which the numerical representation of the whole Blockchain database enters as KNOWN and the UNKNOWN X is called the NONCE. Instead for the function to equate to zero, it has to be lesser than a certain threshold number called the difficulty or target.