Central processing unit: fetches, decodes and executes instructions.
ALU
Arithmetic logic unit: performs calculations and logical comparisons.
Control unit (CU)
Directs the flow of data and coordinates the fetch–decode–execute cycle.
Register
A very small, very fast storage location inside the CPU.
Cache
Small, fast memory between the CPU and RAM that stores frequently used data.
Key registers: PC (program counter: address of the next instruction), MAR (memory address register), MDR (memory data register), IR (current instruction), accumulator (results).
Fetch–decode–execute: PC → MAR; instruction fetched from RAM into MDR, then IR; PC incremented; CU decodes; ALU/CU executes; results stored.
Primary memory: RAM (volatile, read/write, programs in use) and ROM (non-volatile, firmware). Secondary storage: HDD (magnetic), SSD (flash, faster, no moving parts), optical, cloud.
Performance depends on clock speed, number of cores, cache size and memory bandwidth. GPUs have many simple cores for parallel tasks (graphics, machine learning).
Compression: lossless (no data lost, e.g. ZIP, PNG) vs lossy (some data removed, smaller files, e.g. JPEG, MP3).
Worked example
Explain why adding cache memory can speed up a computer.
Cache is much faster than RAM and sits close to the CPU.
Frequently used instructions and data are kept in cache, so the CPU waits less for memory (fewer slow RAM accesses).
Programs often reuse the same data (locality), so many requests are cache hits.
Exam tip: In FDE questions, mention each register by name and in the right order: PC, MAR, MDR, IR.
A1.2Data representation and logic
Key terms
Bit / byte
A single binary digit / a group of 8 bits.
Hexadecimal
Base 16 (0–9, A–F); one hex digit represents 4 bits.
Character encoding
Mapping characters to binary codes, e.g. ASCII (7/8 bits) or Unicode (many languages, emojis).
Logic gate
A circuit that produces an output from binary inputs (AND, OR, NOT, NAND, NOR, XOR).
Hex: split binary into groups of 4: 1011 0110 = B6₁₆. Hex is used for colours (#FF8800), memory addresses and MAC addresses.
Images: pixels × colour depth (bits per pixel); sound: sample rate × bit depth × duration. File size = number of items × bits per item.
Gates: AND (1 only if both 1), OR (1 if either 1), NOT (inverts), NAND (NOT AND), NOR (NOT OR), XOR (1 if inputs differ).
Truth tables list every combination of inputs: n inputs give \(2^{n}\) rows.
Worked example
Convert 205 to binary and hexadecimal.
205 = 128 + 64 + 8 + 4 + 1 → 1100 1101₂.
Split into nibbles: 1100 = C, 1101 = D → CD₁₆.
Exam tip: Always convert through binary in nibbles of 4: it avoids mistakes between decimal and hex.
A1.3Operating systems and control systems
Key terms
Operating system
Software that manages hardware and provides services to programs and users.
Interrupt
A signal that makes the CPU stop its current task to deal with a higher-priority event.
Scheduling
Deciding which process uses the CPU and for how long.
Control system
A system that uses sensors, a controller and actuators to keep a variable at a set value.
OS functions: memory management (allocation, virtual memory, paging), process management and scheduling, file management, device drivers and I/O, security (user accounts, permissions), user interface.
Scheduling algorithms: first come first served, round robin (equal time slices), priority, shortest job first. Aims: fairness, responsiveness, throughput.
Interrupts vs polling: polling repeatedly checks devices (wasteful); interrupts let the device signal when it needs attention.
Control systems use feedback: a sensor reads the output, the controller compares it with the set point, and an actuator corrects it (thermostat, automatic doors, cruise control).
Worked example
Describe how a greenhouse control system keeps the temperature at 25 °C.
A temperature sensor sends readings (via an ADC) to the microprocessor.
The processor compares each reading with the 25 °C set point.
If it is too cold it switches on a heater; if too hot it opens a window or starts a fan (actuators). This repeats continuously: a feedback loop.
Exam tip: In control-system answers, name sensor, processor decision and actuator, and say that the process loops.
A1.4Translation of programs
Key terms
Compiler
Translates a whole high-level program into machine code before it runs.
Interpreter
Translates and executes a program one statement at a time.
Assembler
Translates assembly language into machine code.
Bytecode
Intermediate code run by a virtual machine (e.g. Java's JVM).
Compiler: produces an executable that runs fast and does not need the source; errors are reported after the whole program is compiled.
Interpreter: easier debugging (stops at the first error), but slower and the interpreter is needed each time.
Java compiles to bytecode, which the JVM interprets or just-in-time compiles: portable across platforms. Python is usually interpreted (via bytecode).
Low-level languages (machine code, assembly) are hardware-specific; high-level languages are portable and easier to read.
Worked example
A developer is writing a game that must run as fast as possible. Should they compile or interpret it? Explain.
Compile: the code is translated once into optimized machine code.
At run time there is no translation overhead, so execution is faster.
The executable can be distributed without the source code.
Exam tip: Compare translators on speed of execution, error reporting, portability and whether source code must be shared.