What is blockchain?

Blockchain is a distributed database technology. It stores data in blocks, with each block recording information over a certain period and containing specific values from the previous block, linking blocks together like a chain to form a blockchain.

What is Bitcoin?

Bitcoin is a decentralized accounting system. Traditional finance is accounted for by banks, with all information controlled by banks. Bitcoin, on the other hand, is an accounting method jointly participated in by many nodes in the network, possessing transparency and being difficult to tamper with.

What is the relationship between Bitcoin and blockchain?

Blockchain is the underlying technology of Bitcoin, and Bitcoin is the first successful application of blockchain technology.

How is the total amount of Bitcoin calculated?

Bitcoin packages every ten minutes, with the initial packaging reward being 50 BTC. Every four years is a cycle, with the packaging reward halving each cycle. Thus, it can be calculated using the formula: 50*6*24*365*4*(1+1/2+(1/2)^2......=21 million.

What is mining?

Taking Bitcoin as an example, a block is generated every ten minutes, and the packaging can only be undertaken by one person, who can then receive the packaging reward. So how is it confirmed who is responsible for packaging?

This requires everyone to solve a very difficult mathematical problem, and the first person to solve it has the right to package the block. This process of computation is called mining.

How difficult are the mathematical problems in mining?

Bitcoin uses the SHA-256 hash function. No matter what content is input, the algorithm will output a 256-bit binary number. A slight change in the content may result in a completely different output. The computation involves performing two hash operations on a string, requiring that the generated hash value has the first n bits as 0 (n is used to adjust the difficulty of the computation).

The string is composed of the hash value of the previous block's header + timestamp + ........ + random number. To produce a valid output, one must try changing the random number one by one. The first computed hash value will serve as the header of the next block.