# What Is Bitcoin Mining?

By now you probably know that most cryptocurrency coins are mined by computers, but how does this mining process work? Is it like mining for gold or any other minable material? Or is something different going on here?

Bitcoin is mined by using specialized computers. It used to be the case that anyone could mine Bitcoin on their home computers, and you could argue that this is technically true today; however, the average user is at a serious disadvantage today. Mining Bitcoin is now predominantly done using computers with expensive and specialized equipment called ASICs. ASIC chips consume huge amounts of electricity in order to mine Bitcoin and will mine the block much quicker than the average computer user.

Bitcoin mining helps secure the network and processes the transactions on the network. When you pay for something with your debit card, the bank will check that you have the money in your account to make the payment; the bank is the centralized authority here. With Bitcoin, the process is decentralized, so there isn’t one computer that belongs to a company that will verify your account, but rather thousands of computers who all have access to the ledger. This ledger is called ‘blockchain.’

For every block of transactions that a computer (miner) authorizes, they will be paid out a small amount of Bitcoin. In order to authorize these transaction blocks, the computer needs to work out a complex mathematical problem. This is why more powerful computers are preferred since they can try more solutions in a shorter period of time, increasing the chance that they will find the right solution in a timely manner. Once a solution to the block has been found, this is being broadcast to the entire network and is not an authorized part of the blockchain. Currently, miners can expect to be rewarded 12.5 Bitcoins per block, and a block is mined every 10 minutes or so. This reward halves every 210,000 blocks so while it is currently at 12.5 Bitcoin, originally the reward was 50 Bitcoin.

## What Complex Mathematical Problems is the Bitcoin Miner Authorizing?

The key to answering this question is hashing. Hashing means taking an input which can be of any length and returning an output that is a fixed length. For Bitcoin, the transactions are put into a hashing algorithm and return an output that is a fixed length.

Hashing algorithms used in cryptocurrency will have certain properties and one of the most important is that they should be deterministic. This means that the input will correspond to a particular output, so if you put the same data into the algorithm repeatedly, you will get the same output. This would make transaction hashes easy to solve if they were only a few numbers longer; but they’re not, and that’s where the complexity comes in.

Another key aspect of cryptographic algorithms is that it should be infeasible (but not impossible) to determine the input, and this is done by creating a large hashing number as the output. Bitcoin uses the SHA-256 hash algorithm which means that the output will always have a length of 256 bits, regardless of how large or small the input value for the transaction was. Because the output hash is so large, it becomes impossible to simply work out the input data from it. This is another reason by the hashes can’t be solved using brute force, it would take several lifetimes in order to stumble upon the correct guess.

Now you probably wondering which hash they are trying to solve and what ‘solving’ it means. As the name suggests, a blockchain contains a chain of blocks that are connected together with one block determined the hashes for the following blocks. Each block in the blockchain contains a unique block header in the form of a hash. This block header also contains a target hash. In order for the blockchain to process the latest block and verify the block header, a target hash need to solved by the miners. Miners solve the target hash by producing a value that is less than or equal to one accepted by the most recent block in the network.

Because there are so many options for what value will be accepted (anywhere between 0 and 256 bits with smaller values having more 0s at the beginning) any one computer is unlikely to find the value. This is why Bitcoin relies on a network with thousands and thousands of computer each trying to solve the block at the same time – one of these computers will solve the block in around 10 minutes and be awarded in Bitcoin.

People often think that the point of Bitcoin mining is getting the Bitcoin reward; however, this is not the only reason mining exists. Mining is an essential part of the Bitcoin network and needs to be done to verify transactions. Offering a Bitcoin reward for mining is more of an incentive than the reason to do it. Even if no reward was offered, mining would still need to take place.

Sharing Is Caring: