# Anatomy of Bitcoin &amp; Blockchain

How Bitcoin's blockchain is built, from the 80\-byte block header and Merkle tree to the SHA\-256 hashing and nonce guessing that secure each new block\.

By Numa

Topic: Computing, AI &amp; Electronics

[Open the interactive Jig](https://ask.jig.com/j/KafmWLeuWOFU)

## Transcript

### 1. A chain of blocks

Bitcoin is money kept in a shared record book called a blockchain\. Each block is like a page of that book\. Every page is sealed with a digital fingerprint and linked to the page before it\.

Bitcoin began on 3 January 2009 with block 0, the genesis block\.

### 2. Inside a block

Let's open one block\. On top sits a small header, the block's label\. Below it is a list of transactions: records of who paid whom\. A new block is added about every 10 minutes\.

### 3. The header: 80 bytes

The header is tiny: just 80 bytes, shorter than this sentence\. It holds six fields: a version, the previous block's fingerprint, the Merkle root, the time, the difficulty target and a number called the nonce\.

### 4. SHA\-256: a fingerprint machine

A hash function turns any input into a fixed\-size fingerprint\. SHA\-256 always gives 256 bits, shown as 64 characters\. The same input always gives the same hash, and you cannot run it backwards\. Add one tiny mark and watch the whole fingerprint change\.

Inside, SHA\-256 stirs each chunk of data through 64 rounds of mixing\.

### 5. The Merkle tree

Every transaction gets its own hash\. Neighbouring hashes are paired and hashed again, row by row, until one hash is left: the Merkle root, stored in the header\. Change any transaction and the root changes too\.

### 6. Linked by fingerprints

Each header holds the hash of the block before it\. So every block points back to its parent, all the way to the genesis block\. That backward link is what makes it a chain\.

Displayed block hashes begin with zeros: that is the proof of work you will try next\.

### 7. Mining: a guessing game

To add a block, a miner changes the nonce and hashes the header again and again\. The hash must fall below a target, so it starts with enough zeros\. There is no shortcut, only guessing\. Our toy target needs just three zeros\.

Real Bitcoin's target is far harder: the network makes hundreds of billions of billions of guesses every second\.

### 8. Try to cheat

Imagine someone secretly edits a payment in block 1\. Its hash changes, so block 2's saved link no longer matches, and every later block breaks too\. Thousands of computers keep their own copy and simply reject the fake\.

### 9. Rewards and the 21 million cap

The miner who finds a block earns brand\-new bitcoins\. The reward began at 50 and halves every 210,000 blocks, about every four years\. Since April 2024 it is 3\.125, so there will never be more than 21 million bitcoins\.

The smallest piece, one satoshi, is a hundred\-millionth of a bitcoin\.
