The Machine
Begin with the machine itself. A computer is a machine that follows instructions. That is the whole definition. It does not think, it does not understand, it does not want anything. It takes one instruction, does it, and moves to the next.
The machine runs on electricity. Inside it, everything comes down to tiny electrical switches. A switch is either on or off, current flowing or not flowing. Engineers write these two states as digits: a switch that is off is a 0, and a switch that is on is a 1. There are billions of these switches inside the box in front of you, and every single thing the machine does is built out of them being flipped on and off, very fast.
That can sound impossible. How do you get a screen full of words out of switches? The answer takes this whole course to give properly. For now, hold on to the plain version: switches, on or off, billions of them, flipped in careful patterns.
Four parts
You do not need to know what every chip in the machine does. Four parts matter here.
- The processor is the part that follows instructions. It reads one instruction, carries it out, and moves to the next, over and over, for as long as the power is on. Everything the machine appears to do is really the processor doing this.
- Memory is the processor's workspace. It is very fast, and the processor uses it for whatever it is working on right now. Memory has one big weakness: when the power goes off, it forgets everything. It is a desk, not a filing cabinet.
- Storage is the shelf. It is much slower than memory, but it keeps what it holds when the power goes off. Anything the machine still knows after you turn it off and on again was sitting in storage.
- Input and output are how the machine meets you. Input is anything coming in, like the keys you press on the keyboard. Output is anything going out, like the letters that appear on the screen.
That is the loop of everything you will ever do with a computer. You press keys, that is input. The processor follows instructions, using memory as its desk and storage as its shelf. Something shows up on the screen, that is output.
Where this course goes
Every layer of this course is one of these four parts, seen closer up. You will look at what the processor's instructions actually are, how memory is handed out and protected, how storage is organized into files, and at the very end, how output really works, all the way down to driving a display over a wire. The machine will not change. Your view of it will just get sharper.
Key terms
- computer — a machine that follows instructions, built from electrical switches.
- processor — the part that reads instructions and carries them out, one after another.
- memory — the fast workspace; it forgets everything when the power goes off.
- storage — the slow shelf; it remembers even with the power off.
- input/output — what comes into the machine (like keystrokes) and what goes out (like the screen).