Worth about 18 of the 75 marks on a typical Paper 1, together with Data representation the biggest topic.
1. The CPU and microprocessors
The central processing unit (CPU) processes the instructions and data that are input into a computer so that the result can be output. A microprocessor is a type of integrated circuit on a single chip; the CPU of most devices is a microprocessor.
2. Von Neumann architecture
In a Von Neumann computer, program instructions and data are stored together in the same memory (RAM). The CPU fetches both from memory along the same buses.
| Component | Type | Purpose |
|---|---|---|
| Arithmetic logic unit (ALU) | Unit | Carries out calculations and logic comparisons |
| Control unit (CU) | Unit | Decodes instructions and sends control signals to manage the cycle |
| Program counter (PC) | Register | Holds the address of the next instruction to be fetched |
| Memory address register (MAR) | Register | Holds the address of the memory location being read from or written to |
| Memory data register (MDR) | Register | Holds the data or instruction fetched from memory, or about to be written to it |
| Current instruction register (CIR) | Register | Holds the instruction currently being decoded and executed |
| Accumulator (ACC) | Register | Holds the result of calculations from the ALU |
| Address bus | Bus | Carries addresses from the CPU to memory (one direction only) |
| Data bus | Bus | Carries data and instructions between the CPU and memory (both directions) |
| Control bus | Bus | Carries control signals, such as read, write and clock pulses (both directions) |
3. The fetch–decode–execute cycle
- Fetch: the address in the PC is copied to the MAR (along the address bus). The instruction at that address is sent to the MDR (along the data bus). The PC is incremented by 1. The instruction is copied from the MDR to the CIR.
- Decode: the control unit decodes the instruction in the CIR to work out what to do.
- Execute: the instruction is carried out, for example the ALU does a calculation and stores the result in the accumulator, or data is loaded from or stored in memory.
The cycle then repeats for the next instruction. Step through it below with a three-line program.
Try it: step through the fetch–decode–execute cycle
The program adds the numbers at addresses 5 and 6 and stores the answer at address 7.
| Address | Contents |
|---|
4. Cores, cache and clock
| Factor | What it is | Effect on performance |
|---|---|---|
| Cores | Each core is a processing unit that can run its own FDE cycle | More cores can process more instructions at the same time, if the software can use them |
| Cache | Small, very fast memory inside or near the CPU that stores frequently used instructions and data | A larger cache means fewer trips to slower RAM, so instructions are fetched faster |
| Clock | Sends regular pulses that set the pace of the CPU; clock speed is the number of FDE cycles per second (Hz) | A faster clock carries out more cycles, and so more instructions, per second |
The effects have limits: doubling the cores does not always double the speed, and a faster clock produces more heat.
5. Instruction sets
An instruction set is the list of all the commands a CPU can process. These commands are machine code. Different CPU designs have different instruction sets, so a program compiled for one may not run on another.
6. Embedded systems
An embedded system is a computer system built into a larger device to perform one dedicated function. A general-purpose computer, such as a PC or laptop, can perform many different functions.
- Examples: domestic appliances (washing machines, microwaves), cars (engine management, airbags), security systems, lighting systems, vending machines.
- Characteristics: small, low power, cheap to mass-produce, often controlled by sensors, and their program (firmware) rarely changes.
7. Input devices
An input device sends data into the computer so it can be processed.
| Device | How it works |
|---|---|
| Barcode scanner | Shines light on the bars; black bars absorb it and white bars reflect it. The reflected pattern is converted to a number |
| QR code scanner | A camera captures the 2D square pattern, which can hold much more data than a barcode, such as a web address |
| Digital camera | Light passes through the lens onto a sensor made of millions of light-sensitive pixels, which is converted into a digital image |
| Keyboard | Each key press completes a circuit; the key’s character code is sent to the computer |
| Microphone | Sound waves vibrate a diaphragm, creating an electrical signal that is converted to digital |
| Optical mouse | An LED lights the surface and a sensor takes many images per second; changes between images show the movement |
| 2D scanner | Light scans a flat document; the reflected light is captured to create a digital image |
| 3D scanner | Lasers or light scan an object from many angles to create a digital 3D model of its shape |
Touch screens
| Type | How it works | Pros and cons |
|---|---|---|
| Resistive | Two layers are pressed together; the point of contact is detected | Cheap, works with gloves or a stylus; less clear, no multi-touch |
| Capacitive | Detects the change in electrical charge when a finger touches the screen | Clear, multi-touch, durable; does not work with ordinary gloves |
| Infra-red | A grid of infra-red beams across the screen; a touch breaks the beams | Works with any object, good for large screens; can be triggered by accident |
8. Output devices
An output device turns processed data into a form people (or machines) can use.
| Device | How it works |
|---|---|
| Actuator | Converts an electrical signal into movement, such as a motor opening a valve |
| DLP projector | Millions of tiny mirrors tilt to reflect light towards or away from the lens to form the image |
| LCD projector | Bright light passes through LCD panels that block or let through light to form the image |
| Inkjet printer | Nozzles spray tiny droplets of ink onto the paper as the print head moves across it |
| Laser printer | A laser creates an electrostatic image on a rotating drum; toner sticks to it, is transferred to paper and fused with heat |
| 3D printer | Builds a solid object layer by layer from a digital design, for example from melted plastic |
| LED screen | Each pixel is made of LEDs that give off light |
| LCD screen | Liquid crystals block or let through light from a backlight (usually LEDs) to form each pixel |
| Speaker | A digital signal is converted to analogue; it moves a cone that vibrates the air to make sound |
9. Sensors
A sensor measures a physical property and sends the data to a computer. In exam answers, choose the sensor that fits the context and say how it is used there.
| Sensor | Measures | Example use |
|---|---|---|
| Acoustic | Sound | Detecting breaking glass in a security system |
| Accelerometer | Acceleration and movement | Detecting a phone being tilted, or a car crash for airbags |
| Flow | Rate of flow of a liquid or gas | Monitoring water flow in pipes |
| Gas | Level of a gas, e.g. carbon dioxide | Smoke or carbon monoxide alarms |
| Humidity | Water vapour in the air | Greenhouse climate control |
| Infra-red | Infra-red radiation (heat) | Detecting a person for automatic doors or alarms |
| Level | Level of a liquid | Fuel or water tank monitoring |
| Light | Light level | Street lights turning on at dusk |
| Magnetic field | Magnetic fields | Detecting a door or window opening |
| Moisture | Water content, e.g. of soil | Automatic watering of crops |
| pH | Acidity or alkalinity | Monitoring soil or a swimming pool |
| Pressure | Pressure or force | Detecting weight on a car seat or in a burglar alarm mat |
| Proximity | How near an object is | Parking sensors |
| Temperature | Temperature | Central heating thermostat |
10. Primary storage: RAM and ROM
Primary storage is memory that the CPU can access directly.
| RAM (random access memory) | ROM (read only memory) | |
|---|---|---|
| Volatile? | Yes: data is lost when the power is off | No: data stays when the power is off |
| Can it be changed? | Read and write | Read only |
| What it stores | The programs and data currently in use, including the operating system | The start-up instructions (bootstrap) the computer needs to boot |
A computer needs both: ROM to start up, and RAM to hold whatever it is working on.
11. Secondary storage
Secondary storage is not directly accessed by the CPU. It is non-volatile, so it is used to store data permanently.
| Type | How it works | Examples |
|---|---|---|
| Magnetic | Spinning platters divided into tracks and sectors; a read/write head uses electromagnets to magnetise areas. Has moving parts | Hard disk drive (HDD) |
| Optical | A laser burns pits and lands into the disc surface; reflected laser light is read back | CD, DVD, Blu-ray |
| Solid-state (flash) | NAND or NOR flash memory: transistors act as control gates and floating gates that trap charge. No moving parts | SSD, SD card, USB drive |
12. Virtual memory
When RAM is full, the operating system uses part of secondary storage as virtual memory. Pages of data that are not currently needed are moved from RAM to virtual memory, and moved back when they are needed.
It stops the computer crashing or refusing to open programs when RAM runs out, but it is much slower than RAM, so heavy use slows the computer down.
13. Cloud storage
Cloud storage keeps your data on remote physical servers owned by a provider, accessed over the internet, rather than on local storage.
| Advantages | Disadvantages |
|---|---|
| Access from any device with an internet connection | No internet connection means no access |
| No need to buy and maintain your own storage hardware | Ongoing subscription cost |
| Easy to increase capacity when needed | You rely on the provider’s security and could lose data if they are hacked or close |
| Provider usually handles backups | Uploading and downloading large files can be slow |
14. Network hardware
- Network interface card (NIC): needed for a computer to connect to a network.
- MAC address: a unique address given to the NIC when it is manufactured. Usually written in hexadecimal as six pairs (e.g. 00:1A:2B:3C:4D:5E). The first half is the manufacturer code; the second half is the serial code.
- IP address: given to a device by the network it joins. It can be static (stays the same) or dynamic (changes each time it connects).
- Router: sends data to a specific destination on a network, can assign IP addresses to devices, and connects a local network to the internet.
| IPv4 | IPv6 | |
|---|---|---|
| Size | 32 bits | 128 bits |
| Written as | 4 denary numbers (0–255) separated by dots, e.g. 192.168.0.12 | 8 groups of 4 hex digits separated by colons, e.g. 2001:0db8:85a3:0000:0000:8a2e:0370:7334 |
| Number of addresses | About 4.3 billion: running out | Vastly more, enough for every device |
15. Examiner tips
- Describe the whole fetch stage. “The CPU fetches the instruction” scores little; name the PC, MAR, MDR, CIR and the buses in order.
- Don’t describe the execute stage when asked about fetch, and vice versa.
- MDR holds the data fetched from memory, not “the data from the MAR”. The MAR holds an address.
- Say which way cache changes performance. “A larger cache improves performance because…”, not just “cache affects speed”.
- Clock speed is cycles per second, not “the speed the CPU runs at”.
- An embedded system has one dedicated function. A smartphone or laptop is general purpose.
- Use the context with sensors. In a greenhouse question, say what the sensor measures there and what happens next.
- RAM is primary storage, not secondary, and it is volatile.
- Be precise about the cloud. Not “access anywhere”, but “access from any device with an internet connection”.
- SSD answers: “no moving parts” is the key point for durability, speed and power use.
16. Practice questions
Practice: answer and check instantly
Type a short answer, then press Check or Enter.
Show answer
The program counter (PC).
Show answer
The address bus: addresses only go from the CPU to memory.
Show answer
The current instruction register (CIR).
Show answer
A moisture sensor measures the water content of the soil.
Show answer
An accelerometer detects the sudden change in speed.
Show answer
ROM (read only memory).
Show answer
128 bits, written as 8 groups of 4 hex digits.
Show answer
Optical storage, such as CD, DVD and Blu-ray.
Exam-style questions
9. Describe the fetch stage of the fetch–decode–execute cycle. [4]
Show mark guide
Any four: the address in the PC is copied to the MAR · the address is sent along the address bus · the instruction at that address is sent along the data bus to the MDR · the PC is incremented · the instruction is copied from the MDR to the CIR.
10. A school is deciding whether to store students’ work in the cloud. Explain two advantages for the school. [4]
Show mark guide
Two points, each with an explanation, e.g. students can access their work from any device with an internet connection [1], so they can work from home [1] · the school does not need to buy and maintain its own servers [1], which saves money and space [1] · the provider handles backups [1], so work is less likely to be lost [1].
17. Topic test: predict your grade
Topic test: predict your grade
15 questions, about 10 minutes. Answer them all, then press Mark my test.
Frequently asked questions
What is the fetch-decode-execute cycle?
The CPU fetches the next instruction from memory using the address in the program counter, decodes it in the control unit, and then executes it, often using the ALU. The cycle repeats for every instruction.
What is the difference between RAM and ROM?
RAM is volatile read-write memory that holds the data and programs currently in use. ROM is non-volatile and read-only, and holds start-up instructions such as the bootstrap loader.
What affects CPU performance?
Clock speed, the number of cores and the size of the cache all affect performance. More cores only help if the software can use them in parallel.