# How a CPU Works

How a CPU's transistors, clock and cores fetch, decode and execute instructions, from the silicon inside the chip to a single addition\.

By curious\-heron\-4ccc66c1

Topic: Computing, AI &amp; Electronics

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

## Transcript

### 1. Meet the CPU

This square chip is the CPU, the Central Processing Unit\. It follows a program’s instructions one tiny step at a time, billions of times every second\. Let’s open it up and see how\.

The CPU is one chip on the board, not the whole computer\. Memory sticks, like the two beside it, are separate\.

### 2. Lift the lid

The shiny metal lid spreads heat away so the chip stays cool\. Underneath sits the real processor: a thin slice of silicon smaller than your fingernail\. Tap the lid to close or open it\.

One modern eight\-core chip slice measures about 11 by 7 millimetres\.

### 3. Billions of tiny switches

The silicon is packed with transistors: tiny switches with no moving parts that turn electricity on or off\. On means 1 and off means 0\. Every number, word and picture becomes patterns of 1s and 0s\.

The first microprocessor, in 1971, had 2,300 transistors\. This kind of chip slice has about 8\.3 billion\.

### 4. Inside one core

Each of these eight cores is a complete little processor\. The control unit directs the work, the ALU does the maths, registers hold the numbers in use right now, and caches keep data close by\. Tap a part to light it up\.

The big shared block in the middle of the chip is more cache, used by all eight cores\.

### 5. The clock keeps the beat

A clock signal ticks like a metronome, and every tick moves the work forward one step\. Here it is slowed right down\. A 4 gigahertz CPU ticks 4 billion times every second\.

A faster clock is not the whole story: more cores and smarter designs also make a CPU quicker\.

### 6. Fetch and decode

First the core fetches the next instruction from its cache\. A small counter remembers which instruction comes next\. Then the control unit decodes it into what to do, add, and what to use, the numbers a and b\.

### 7. Execute and store

The numbers are loaded into registers, and the ALU, the Arithmetic Logic Unit, adds them\. The answer goes back into a register, then out to memory\. Press the button to run the whole cycle\.

Fetch, decode, execute, store\. Then the cycle starts again with the next instruction\.

### 8. Many cores, very fast

Every core repeats this simple cycle billions of times a second, all at the same time\. Each step is simple; the magic is the speed\. Drag to look around the chip\.

Memory outside the chip is slower, so the cache keeps a copy of the data the CPU is likely to need next\.
