A computer looks like a magic box until you notice that every single one does the same four things. Something goes in, something happens to it, something comes out, and some of it gets kept. A laptop takes keystrokes, turns them into a document, shows it on a screen, and saves it to a drive. A car's engine computer takes sensor readings, calculates a fuel mixture, opens an injector, and logs a fault code. Same four stages, wildly different hardware. Learning to see any device as input-process-output-storage is the single most useful habit in this course, because it tells you where to look when something breaks.
The four stages, precisely
- Input — any device that converts something in the physical world into electrical signals the computer can read: keyboard, mouse, microphone, camera, temperature sensor, button.
- Process — the CPU carries out instructions, using RAM as its working space. This is where arithmetic, comparison and decision-making happen.
- Output — any device that converts electrical signals back into something a person or machine can act on: monitor, speaker, printer, LED, motor.
- Storage — non-volatile memory that keeps data when the power is off: SSD, hard drive, SD card, USB stick, cloud.
Hardware and software
Hardware is anything you could drop on your foot — the physical components. Software is the set of instructions that tells the hardware what to do. Neither is useful alone: a computer with no software is an expensive paperweight, and software with no hardware is just a file. Firmware sits between them: software that is stored permanently inside a hardware device, like the code in your router or the UEFI chip on a motherboard.
- Operating system (Windows, macOS, Linux, Android)
- Device drivers — translate between the OS and one piece of hardware
- Utilities — backup, antivirus, disk tools
- Its job: manage the computer itself
- Browser, word processor, game, IDE
- Runs on top of the OS and asks it for resources
- Written for a user's task, not for the machine
- Its job: get work done for a person
Where the categories get slippery
Some devices are both input and output. A touchscreen is an input (you touch it) and an output (it displays). A network card sends and receives. A hard drive is storage, but from the CPU's point of view it is also an I/O device, because the CPU cannot read it directly — it has to ask a controller. When a question asks you to classify a device, name the direction the data is flowing in that particular situation.
| Device | Classification | Why |
|---|---|---|
| Microphone | Input | Converts sound pressure into an electrical signal |
| Touchscreen | Input and output | Senses touch position and displays an image |
| Solid state drive | Storage (and I/O) | Keeps data without power; CPU reaches it through a controller |
| RAM | Neither — it is part of Process | Working memory for the CPU, not a peripheral, and volatile |
| Servo motor | Output | Turns an electrical signal into physical movement |
| Network card | Input and output | Data flows both directions |
Zooming into the process stage gives you the von Neumann architecture, which almost every computer built since 1945 follows. Its defining idea is the stored program: instructions and data live in the same memory, in the same format. That is why a computer is general-purpose — load different bits into memory and it becomes a different machine. A pocket calculator has its program burned in; a computer reads its program from memory like any other data, which is exactly why software exists as an industry.