Pathwise

Technology and code · 12 Lessons

How Computers Work

From a single bit to a running program: the processor, memory, storage and the operating system, in animated diagrams you step through one frame at a time.

For curious people who use a computer every day and want to know what is actually going on inside, and for new programmers who want the picture under their code. No maths beyond adding, no programming needed. You start with switches that are on or off, build them into logic gates and an adder, then follow a tiny program into the processor as it fetches, decodes and executes one instruction after another. Every lesson has an animated diagram you step through: bits, gates, registers, the fetch-decode-execute cycle, RAM, cache, the disk, processes and virtual memory. You finish able to explain, step by step, what happens between double-clicking an app and seeing it on screen, and why some things on a computer are fast and others are slow.

By the end you can

From switches to arithmetic

The parts of a computer in one lesson, then the two ideas everything rests on: everything is stored as bits, and simple gates made of switches can do arithmetic on them.

  1. Inside the box: the parts of a computer

    Meet the five parts every computer has, from a laptop to a phone, and follow one key press from your finger to a letter on the screen.

  2. Bits and binary: counting with switches

    Learn to count in binary with eight light switches, see why a byte holds 0 to 255, and find out how letters, colours and photos all become ones and zeros.

  3. Logic gates: switches that can add

    See how a transistor works as a tiny switch, how a few of them make NOT, AND and OR gates, and how two gates together add 1 + 1.

The processor

What is inside a CPU, how a program becomes numbers it can read, and the three-step loop it repeats billions of times a second.

  1. The CPU: registers, the ALU and the clock

    Look inside the processor: tiny super-fast registers, an arithmetic unit made of gates, a control unit that directs them, and a clock that ticks billions of times a second.

  2. Machine code: programs as numbers

    Follow one line of code as a compiler turns it into simple instructions, then into the plain numbers a processor actually reads from memory.

  3. Fetch, decode, execute: the loop that runs everything

    Step through the three-beat cycle a processor repeats for every instruction, see how the program counter keeps its place, and how a jump makes loops and decisions possible.

Memory and storage

RAM as a long row of numbered boxes, the small fast caches that hide how slow it is, and the disk that remembers everything after the power goes off.

  1. RAM: a row of numbered boxes

    Picture memory as billions of numbered one-byte boxes, see how the processor writes and reads one by its address, and why everything in RAM vanishes when the power goes.

  2. Cache: keeping the hot data close

    Find out why RAM is hundreds of ticks away from the processor, how small, fast caches hide that wait, and why reading data in order is so much faster than jumping around.

  3. Storage and files: memory that survives

    Compare SSDs and hard disks, see how a file system turns names like photo.jpg into blocks on the disk, and why a program must be copied into RAM before it can run.

The operating system

How one processor runs many programs at once, how each program gets its own private memory, and the whole journey from a double-click to a running app.

  1. Processes: one CPU, many programs

    Meet the operating system and the process, and see how a scheduler switches a core between programs so fast that they all seem to run at once.

  2. Virtual memory: every program gets its own map

    See how each process gets its own private address space, how page tables translate its addresses into real RAM, and what happens when RAM runs out.

  3. Putting it together: from a double-click to a running app

    Follow one app from the moment you double-click it, through the disk, RAM, the operating system and the processor, to the first thing it draws on your screen.

Keep it, don't just read it

Pathwise brings each idea back just before you'd forget it, with a quick question. Free on Android and on the web, in English and Persian.

Cafe Bazaar Myket Open the web app