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
- Read and write small numbers in binary and explain how text and pictures become bits
- Show how logic gates add two numbers and how a CPU runs a program through the fetch-decode-execute cycle
- Explain the memory hierarchy, from registers and cache to RAM and the disk, and why each level is faster or slower
- Describe what the operating system does when a program starts: processes, time slicing and virtual memory
From switches to arithmetic
- 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.
- 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.
- 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
- 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.
- 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.
- 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: 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.
- 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.
- 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
- 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.
- 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.
- 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.