← Learn

How a Computer Works

CPUPC0x02R1R2ALU
01000011ADD R1, R2
Memory010010100x00001011000x01110100110x02011100000x03000111010x04101001100x05

Before we start

Every click becomes a number.

Underneath every animation you've just scrolled through, a computer is doing something almost embarrassingly simple, over and over, billions of times a second. Let's look inside.

Step 1

Everything is a number

Text, images, instructions — a computer stores all of it as bits: switches that are either on or off, 1 or 0. Group eight of them together and you get a byte. That's the only language the hardware actually speaks.

Step 2

Memory: numbered mailboxes

RAM is a huge row of numbered slots, each holding one byte. Every slot has an address, like a house number — so the CPU can ask for exactly the byte it wants, instead of searching for it.

Step 3

Fetch

A special register called the Program Counter always points at the address of the next instruction. The CPU reads — fetches — whatever's stored there and pulls it into itself to work on.

Step 4

Decode

That fetched byte is just a number, but it's a number with a meaning: an instruction like "add these two values" or "copy this into memory." The control unit decodes it — figures out what it's actually being asked to do.

Step 5

Execute

Now the CPU actually does the thing. For arithmetic, that's the ALU — the Arithmetic Logic Unit — pulling values out of tiny on-chip registers, doing the math, and holding onto the result.

Step 6

Write back

The result doesn't do much good sitting inside the CPU, so it gets written back out — into a register for the next instruction to use, or out to memory to be read later.

Step 7

Again. And again.

The Program Counter moves to the next address, and the whole cycle — fetch, decode, execute, write back — repeats. A modern CPU does this a few billion times every single second.

Step 8

That's what "running" means

Every button you've clicked, every pixel that moved, everything in this whole series — underneath it, this is genuinely all that's happening. Just this loop, running fast enough to feel like magic.

Scroll

That's it

Still bored?

Pick another topic →