What a Computer Really Does
Learn the input, process, output and storage model, the stored-program idea, and why every computer is a very fast, very literal rule follower.
Welcome back!
Step 1 of 12Learn
A billion tiny decisions
Tap a key on your phone and a letter appears in a message. It feels instant and simple. Underneath, the phone noticed a change in an electrical field on the glass, turned the touch position into numbers, ran a program that matched those numbers to a key, looked up which letter that key means, drew the shapes of that letter pixel by pixel, and pushed millions of color values to the screen. All of that happened in a few thousandths of a second.
A computer is not smart in the way people are. It does one kind of thing: it follows instructions that move and transform numbers. What makes it powerful is speed and reliability. A modern processor can carry out billions of simple steps every second without getting tired or bored, and it does exactly what it is told, every time.
This course opens the box layer by layer. You'll see how everything a computer handles becomes bits, how tiny switches called transistors combine into logic, how the processor runs a program one instruction at a time, why memory comes in layers from tiny and fast to huge and slow, and how software and the operating system tie it all together. No electronics or programming background is needed.
Step 2 of 12Learn
Input, process, output, storage
Every computer, from a smartwatch to a data center server, fits one simple model:
- Input: data comes in. Keyboards, touchscreens, microphones, cameras, sensors and network connections are input devices.
- Processing: the central processing unit (CPU) follows instructions to transform the data: add numbers, compare values, decide what to do next.
- Output: results go out to a screen, speaker, printer, motor or another computer over a network.
- Storage: data and programs are kept for later. Memory (RAM) holds what is being worked on right now and forgets it when power is lost. Storage such as an SSD keeps files when the power is off.
Take a digital thermostat. Input: a temperature sensor reports 18 °C. Processing: a tiny program compares 18 with the target of 21. Output: it switches the heater on. Storage: the target temperature and your weekly schedule sit in memory that survives a power cut.
The same four boxes describe a laptop running a video call. The difference is scale: more inputs, a faster processor, more memory, and far more complex programs.
Step 3 of 12Practice · Sort into groups
Sort each part of a laptop by its main role in the input-process-output-storage model.
Tap an item, then tap its group (or drag it there).
Step 4 of 12Diagram
The input-process-output-storage model
Every computer, from a smartwatch to a server, follows this path. Storage sits alongside, feeding and saving data.
Tap a shape with to see more.
- Input
Data comes in: touch, sound, sensors, network.
- Processing
The CPU follows instructions to transform the data.
- Output
Results go out: screen, speaker, network, motors.
- Storage
Data and programs are kept for later, even with the power off.
Step 5 of 12Learn
The stored-program idea
Early electronic computers in the 1940s were programmed by rewiring them. To change the task, engineers moved cables and flipped switches, which could take days.
The breakthrough was the stored-program concept: put the instructions in the same memory as the data, as numbers. Now a computer can switch tasks just by loading different numbers into memory. The machine doesn't care whether a number means a price, a pixel color or an instruction such as add these two values; meaning comes from how the number is used.
This design is usually called the von Neumann architecture. Its key parts are a processor, a memory that holds both programs and data, and connections (buses) between them. Almost every general-purpose computer today still follows it.
One consequence is worth remembering. Because programs are just data, a computer can load, copy, download and even generate programs. That flexibility is why you can install a new app in seconds. It is also why malware exists: a malicious program is simply data that gets treated as instructions.
Step 6 of 12Practice · True or false
In a stored-program computer, instructions and data are kept in the same memory, both encoded as numbers.
Step 7 of 12Note
Step 8 of 12Learn
Layers of abstraction
No single person thinks about a computer at every level at once. Instead, computer science stacks layers of abstraction, where each layer hides the details of the one below it:
- Physics and transistors: electrons and tiny switches.
- Logic gates: switches combined to compute AND, OR and NOT.
- Circuits: gates combined into adders, memory cells and the processor.
- Machine code: the numeric instructions the processor understands.
- Operating system: software that manages hardware and runs programs.
- Applications: the browser, game or spreadsheet you actually use.
A web developer writing a button doesn't think about electrons, and a chip designer doesn't think about your spreadsheet. Each layer offers a simpler set of tools to the layer above. When you say the computer saved my file, you are speaking at the top layer, but billions of transistor switches made it happen.
The rest of this course climbs these layers from the bottom up, starting with the most basic unit of all: the bit.
Step 9 of 12Practice · Put in order
Put these layers of a computer in order from the lowest (closest to physics) to the highest (closest to the user).
Drag the items, or use the arrow buttons, to put them in order.
- Circuits such as adders
- Transistors
- Logic gates
- Operating system
- Applications
- Machine code instructions
Step 10 of 12Diagram
Layers of abstraction
Each layer hides the details of the one below. Tap a layer.
Tap a shape with to see more.
- Applications
What you see: browsers, games, messages.
- Operating system
Shares the hardware among programs.
- Machine code
The instruction set the processor understands.
- Circuits
Adders, memory cells, the processor itself.
- Logic gates
AND, OR, NOT.
- Transistors
Tiny electrical switches.
Step 11 of 12Tap to reveal
Computers you might not notice
In your car
A modern car contains dozens of small computers called electronic control units. One manages fuel injection many times per second, another runs the anti-lock brakes, others handle airbags, windows and the dashboard. They talk to each other over an internal network.
In your kitchen
Microwaves, washing machines and smart fridges contain microcontrollers: a tiny CPU, memory and input/output pins on a single cheap chip. They read buttons and sensors, run a fixed program and switch motors or heaters.
In your bank card
The chip on a payment card is a small computer with its own processor and secure memory. When you tap or insert it, it runs a cryptographic program to prove the card is genuine without revealing its secret key.
Step 12 of 12Practice · Choose one
A smart doorbell detects motion, records a short video, saves it and sends you a phone alert. Which part of that is mainly processing?
Lesson complete!