3.1 Computer Architecture
The CPU (central processing unit) carries out all the processing. In Von Neumann architecture, both instructions and data are stored in the same memory and are fetched one at a time over the same bus.
| Component | Function |
|---|---|
| Control Unit (CU) | Fetches and decodes instructions, controls the flow of data between components and tells other parts what to do |
| Arithmetic Logic Unit (ALU) | Performs arithmetic (add, subtract) and logical (AND, OR, NOT, comparisons) operations |
| Registers | Very fast storage inside the CPU |
| Cache | Fast memory close to the CPU holding frequently used instructions and data, reducing access time to RAM |
| Register | Holds |
|---|---|
| Program Counter (PC) | The address of the next instruction to be fetched |
| Memory Address Register (MAR) | The address of the location being read from or written to |
| Memory Data Register (MDR) | The data or instruction just fetched from memory, or about to be written |
| Current Instruction Register (CIR) | The instruction currently being decoded and executed |
| Accumulator (ACC) | The results of calculations carried out by the ALU |
Buses
- Address bus — carries the address of the memory location from the CPU to memory (one direction only).
- Data bus — carries data and instructions between the CPU and memory (both directions).
- Control bus — carries control signals such as read, write and clock pulses.
Fetch–decode–execute cycle
- Fetch — the address in the PC is copied to the MAR; the instruction at that address is fetched into the MDR; the PC is incremented.
- Decode — the instruction in the CIR is decoded by the CU to work out what must be done.
- Execute — the instruction is carried out; the ALU performs any calculation and the result is stored in the accumulator.
- The cycle repeats with the next instruction.
What makes a CPU faster?
- Clock speed (GHz) — more cycles per second means more instructions completed per second.
- Number of cores — each core can process a different instruction at the same time, allowing multitasking.
- Cache size — a larger cache keeps more frequently used data close to the CPU.
- Also: a wider data bus, more registers, pipelining.
3.2 Input and Output Devices
| Device | Use | Why chosen |
|---|---|---|
| Keyboard | Entering text and numbers | Fast and accurate for large amounts of text |
| Mouse / touchpad | Pointing, selecting, dragging | Easy navigation of a graphical interface |
| Touchscreen | Direct input on phones, kiosks, tablets | Intuitive; no separate device needed; can also display output |
| Scanner | Converting paper documents into digital images | Keeps a permanent digital copy that can be edited |
| Digital camera | Capturing images and video | Instant, high quality, easy to transfer |
| Microphone | Capturing sound | Needed for recording, video calls and voice control |
| Sensor | Detecting physical conditions (temperature, light, pressure, moisture, motion) | Used in automated systems to provide data to a microprocessor |
| Device | Use | Notes |
|---|---|---|
| Monitor / LCD screen | Displaying soft copy output | Needs no consumables; can show moving images |
| Printer (laser / inkjet) | Producing hard copy | Laser is fast and cheap per page for bulk text; inkjet is better for photos |
| 3D printer | Building a solid object layer by layer | Used for prototypes and custom parts |
| Speaker / headphones | Outputting sound | Needed for music, alerts and accessibility |
| Projector | Displaying to a large audience | Good for classrooms and presentations |
| Actuator | Converting a signal into movement (motor, valve, heater) | The output part of an automated system |
3.3 Memory and Storage
| Memory | Volatile? | Function |
|---|---|---|
| RAM | Yes — contents lost when power is off | Holds the operating system, open programs and data currently in use; read and write |
| ROM | No — contents kept permanently | Holds the bootstrap/start-up instructions (BIOS) that load the operating system; read only |
| Virtual memory | No | An area of secondary storage used when RAM is full; pages are swapped in and out, which is much slower than RAM |
Secondary storage is needed because RAM is volatile and limited. It holds the operating system, software, user files and backups permanently. The three types are magnetic (hard disk), optical (CD/DVD/Blu-ray) and solid state (SSD, USB flash, SD card).
Embedded systems
An embedded system is a computer built into another device to perform a dedicated function, usually with a microprocessor, memory and firmware stored in ROM. Examples: washing machines, car engine management, central heating controllers, digital watches, microwave ovens. They are cheap, small, low power and reliable, but cannot easily be upgraded and are hard to repair.
Exam trap
RAM is not the same as storage. Saying "the file is saved in RAM" loses marks — files are saved in secondary storage. RAM only holds what is currently in use.
Five-minute drill
- State the purpose of the program counter.
- Name the three buses and state the direction of data on each.
- Explain two reasons why a larger cache improves performance.
- Give two differences between RAM and ROM.
- Name a suitable sensor and output device for an automatic door.
Describe the fetch–decode–execute cycle.
- Fetch: the address in the PC is copied to the MAR (1); the instruction is fetched from memory into the MDR and then the CIR (1); the PC is incremented (1).
- Decode: the CU decodes the instruction in the CIR (1).
- Execute: the instruction is carried out, with the ALU performing any calculation and the result stored in the accumulator (1).
A car manufacturer uses embedded systems for engine management. Explain two benefits and one drawback of using an embedded system in a car.
- Benefit: it performs a dedicated function and can respond to sensor data in real time (1), improving efficiency and safety (1).
- Benefit: it is small and cheap to include in every vehicle (1).
- Drawback: it is difficult to upgrade or repair (1); a fault can be hard to diagnose and the firmware cannot easily be changed (1).