What is a computer, really?
Before registers and pipelines mean anything, start with the one idea underneath all of them - a machine built from switches that only ever does exactly what it's told.
A very literal friend
Imagine you have a friend who is incredibly fast and never gets tired, but understands only the simplest possible instructions, and does exactly what you say, with zero imagination. Tell them "if the light is on, flip this other switch" and they will do precisely that, forever, without ever asking why.
That friend is a computer. Every video, game, and app you've ever used is, underneath, millions of tiny switches being flipped on and off, billions of times a second, following a very literal set of instructions. Nothing more mysterious is happening. This entire course is about understanding, layer by layer, how "flip this switch" turns into "play this song."
The switch is everything
A computer is built from a component called a transistor, which is really just a tiny electrically-controlled switch. It has two states:
- On — current flows through it (we'll call this state
1) - Off — current doesn't flow through it (we'll call this state
0)
That's it. That is the entire physical alphabet a computer speaks: on or off, 1 or 0. We call each single switch a bit (short for "binary digit"). Everything else in this course — numbers, letters, images, instructions, your entire operating system — is just a clever arrangement of millions of these on/off switches.
Why only two states instead of, say, ten (like our decimal digits)? Because building a reliable switch that can tell "on" from "off" is easy — you just need a clear enough voltage difference. Building a switch that reliably tells apart ten different voltage levels, without noise ever confusing two of them, is dramatically harder and far more expensive. Two states is the simplest, cheapest, most reliable choice, so that's what won.
From one switch to a computer
A single switch can only tell you one bit of information. To build something useful, computers combine switches in three big steps, and this course follows exactly that path, module by module:
- Combine switches into logic gates — a handful of transistors wired together perform tiny decisions like AND, OR, and NOT. (Module 1)
- Combine gates into an ALU and a datapath — enough gates wired together can add numbers, compare them, and move data between storage locations. This becomes the CPU, the "brain" that does the actual computing. (Modules 2–3)
- Combine CPUs with memory and pipelines — a single instruction rarely finishes in one step, so real machines overlap work (pipelining) and organize storage into a hierarchy (cache, RAM, disk) to keep the fast CPU fed with data, and talk to the outside world through I/O devices. (Modules 4–6)
transistor (switch) → logic gate → ALU / datapath → CPU → full computer system
1 bit decision arithmetic pipelining, memory, I/O
The three things every computer has
No matter how simple or advanced, every computer is built from exactly three kinds of parts:
- CPU (Central Processing Unit) — does the actual work: arithmetic, decisions, moving data around. This is the "brain."
- Memory — stores instructions and data, both while running (RAM) and permanently (disk/SSD). This is the "notebook."
- I/O (Input/Output) devices — keyboards, screens, network cards, anything that lets the computer talk to the outside world. These are the "eyes, ears and mouth."
These three parts constantly talk to each other over shared electrical pathways called buses, which we'll meet properly once we get inside the CPU.
A tiny bit of math already
Even at this "just switches" level, there's one piece of math worth knowing early: with switches (bits), you can represent exactly distinct patterns, because each switch independently doubles how many combinations exist.
One switch gives you 2 patterns (0 or 1). Two switches give you patterns (00, 01, 10, 11). Eight switches — a byte — give you distinct patterns, which is exactly why a single byte can represent 256 different values, like the 256 shades used for one color channel in an image.
Common mistakes
- Thinking "computer" means "laptop." A microwave's timer chip, a car's engine controller, and a supercomputer are all computers by this definition — machines executing instructions using switches.
- Assuming more complex electronics means smarter behavior. A computer never "understands" anything. It blindly follows instructions. All apparent intelligence is a result of very carefully designed instructions, not the machine having any insight of its own.
- Confusing "binary" with "complicated." Binary is chosen specifically because it's the simplest, most reliable choice — not because engineers enjoy making things hard to read.
Summary
A computer is a machine built from millions of simple electrical switches (transistors), each holding one bit of information: on (1) or off (0). With bits you can represent distinct patterns, which is the seed of everything from numbers to instructions. Every computer, no matter how advanced, is built from exactly three parts — CPU, memory, and I/O — that talk to each other over buses. The rest of this course builds upward from this single idea: switches become gates, gates become an ALU and datapath, and a properly organized CPU plus memory plus I/O becomes the machine you're reading this on right now.