Mission 1 · Spec 3.4.1 & 3.4.2
Hardware, software and logic gates
The difference between hardware and software, then the logic gates every processor is built from: NOT, AND, OR and XOR.
- Starter 5 min
- Learn 10 min
- Lab 20 min
- Quiz 10 min
- Exam 10 min
Two keys to launch
A rocket should only launch if both commanders turn their keys. A fire alarm should sound if either of two smoke detectors goes off. How would you describe each rule using a single word?
Reveal
The rocket is AND: both inputs must be on. The alarm is OR: at least one input must be on. Circuits built from these rules are called logic gates, and billions of them make up a processor.
Key ideas
Hardware
The physical components of a computer system: the parts you can touch.
Software
The programs that run on the hardware. Hardware needs software to do anything useful, and software needs hardware to run on.
| Gate | Output is 1 when… | Expression |
|---|---|---|
| NOT | the input is 0 | Q = A |
| AND | both inputs are 1 | Q = A.B |
| OR | at least one input is 1 | Q = A + B |
| XOR | the inputs are different | Q = A ⊕ B |
A truth table lists every combination of inputs. With 2 inputs there are 4 rows; with 3 inputs there are 8. Count up in binary so you never miss a row.
Gate playground
Flip the inputs and watch the current flow.Circuit builder
Three inputs, two layers of gates. Complete the truth table.Exam-style questions
1. Complete the truth table for an XOR gate.
[1 mark]Mark scheme
- Outputs 0, 1, 1, 0 for inputs 00, 01, 10, 11 (1)
2. Write the Boolean expression for a circuit where A and B go into an AND gate, C goes into a NOT gate, and both results go into an OR gate.
[2 marks]Mark scheme
- A.B (1)
- + C, giving Q = A.B + C (1)
3. A heater should turn on (H = 1) when it is cold (C = 1) and the window is not open (W = 0). Draw a logic circuit for this.
[2 marks]Mark scheme
- W passes through a NOT gate (1)
- C and NOT W are the inputs to an AND gate whose output is H (1)
TUTOR NOTES
- Misconception: OR means "one or the other but not both". That's XOR. OR includes both.
- Exam habit: add intermediate columns (e.g. A.B) to a 3-input truth table. It earns method marks and prevents slips.
- Notation: AQA uses . for AND, + for OR, a bar for NOT and ⊕ for XOR.
- Extension: build XOR using only AND, OR and NOT gates.
Mission 2 · Spec 3.4.3 & 3.4.4
Software, languages and translators
System and application software, what the operating system does, low-level and high-level languages, and the three translators.
- Starter 5 min
- Learn 10 min
- Lab 20 min
- Quiz 10 min
- Exam 10 min
Who's in charge?
You're listening to music, downloading a file and typing an essay at the same time, on one computer. Something decides which program gets the processor, which gets memory, and which can use the speakers. What is it?
Reveal
The operating system. It is system software that manages the hardware and gives every application a fair share of the processor, memory and devices.
Key ideas
System software
Runs and manages the computer itself: the operating system and utility programs.
Application software
Lets users carry out tasks: word processors, games, web browsers.
The operating system manages…
the processor(s), memory, input/output devices, applications, and security (user accounts and access).
Utility programs
Help maintain the computer: e.g. encryption, defragmentation, data compression, backup.
Low-level languages
Machine code is binary instructions the CPU runs directly. Assembly language uses short mnemonics (e.g. LDA, ADD) that map one-to-one to machine code. Both are specific to one type of processor.
✓ Fast, direct control of hardware, small programs
✗ Hard to write and debug; not portable
High-level languages
Python, C#, VB.NET: close to English, and one statement can become many machine code instructions.
✓ Easier to write, read and debug; portable
✗ Must be translated; less control over hardware
| Translator | Translates | How |
|---|---|---|
| Assembler | Assembly language → machine code | Each mnemonic becomes one machine code instruction |
| Compiler | High-level → machine code | The whole program at once, producing an executable file. Reports all errors after translating. |
| Interpreter | High-level → executed line by line | Translates and runs one line at a time. Stops at the first error. No executable is produced. |
Compiler vs interpreter race
Software sorter
What the OS manages
Exam-style questions
1. Describe two differences between a compiler and an interpreter.
[4 marks]Mark scheme
- A compiler translates the whole program at once (1); an interpreter translates and runs one line at a time (1)
- A compiler produces an executable file (1); an interpreter does not, so the source code is needed every time (1)
- A compiler reports errors after translating the whole program (1); an interpreter stops at the first error (1)
- Max 4
2. Give two reasons why a programmer might choose to write a program in assembly language.
[2 marks]Mark scheme
- Direct control over hardware / specific memory locations (1)
- The program can be faster / take up less memory (1)
- For embedded systems / device drivers with limited resources (1)
- Max 2
3. State two functions of an operating system.
[2 marks]Mark scheme
- Any two from: manages the processor(s), manages memory, manages I/O devices, manages applications, manages security (1 each)
TUTOR NOTES
- Misconception: compilers are "faster". Compiled programs run faster; compiling itself takes time.
- Misconception: assembly language is machine code. It must be assembled first.
- Misconception: the OS is an application. It is system software.
- Extension: why is Python usually interpreted during development, but games are shipped compiled?
Mission 3 · Spec 3.4.5
Inside the CPU
The Von Neumann architecture, the parts of the CPU, the fetch-execute cycle and what makes a processor faster.
- Starter 5 min
- Learn 10 min
- Lab 20 min
- Quiz 10 min
- Exam 10 min
The world's fastest chef
A chef reads a recipe one step at a time: read the step, work out what it means, do it, move to the next. What in a computer does the same job, and how could you make the kitchen faster?
Reveal
The CPU repeats fetch, decode, execute billions of times a second. Faster chef = higher clock speed. More chefs = more cores. Ingredients on the worktop instead of in the storeroom = bigger cache.
Key ideas
In the Von Neumann architecture, program instructions and data are both stored in the same main memory, and the CPU fetches them one at a time.
ALU
Arithmetic Logic Unit: carries out calculations and logical comparisons.
Control unit
Decodes instructions and sends control signals to coordinate the other components.
Clock
Sends a regular pulse that synchronises the CPU. Clock speed is measured in hertz (e.g. 3.5 GHz).
Registers
Tiny, very fast storage locations inside the CPU that hold data and instructions currently being used.
Buses
Connections that carry addresses, data and control signals between the CPU and memory.
Main memory
Stores the programs and data currently in use, so the CPU can fetch them.
What affects performance?
- Clock speed: more cycles per second, so more instructions per second.
- Number of cores: each core can process instructions at the same time, but only if the task can be split up.
- Cache size: cache is very fast memory in the CPU holding frequently used data. More cache means fewer slow trips to RAM.
Fetch-execute simulator
Step through a real program, micro-step by micro-step.Build a faster CPU
Exam-style questions
1. Describe the fetch-execute cycle.
[3 marks]Mark scheme
- The next instruction is fetched from main memory (1)
- The instruction is decoded by the control unit (1)
- The instruction is executed (e.g. by the ALU), and the cycle repeats (1)
2. Explain why increasing the number of cores may not always make a program run faster.
[2 marks]Mark scheme
- Some programs / tasks cannot be split into parts that run in parallel (1)
- Each step may depend on the result of the previous one, so only one core is used (1)
3. State the purpose of the ALU and the control unit.
[2 marks]Mark scheme
- ALU: performs arithmetic and logical operations (1)
- Control unit: decodes instructions / coordinates the CPU by sending control signals (1)
TUTOR NOTES
- Misconception: doubling cores doubles speed. Only for tasks that split perfectly.
- Misconception: cache is part of RAM. It is separate, faster memory on or near the CPU.
- Lab prompt: in the performance lab, compare 8 cores at 2 GHz with 2 cores at 4 GHz for the spreadsheet task.
- Extension: why can't we just keep increasing clock speed? (Heat.)
Mission 4 · Spec 3.4.5
Memory, storage and embedded systems
RAM, ROM and cache; why we need secondary storage; magnetic, optical, solid state and cloud storage; and computers hidden inside everyday devices.
- Starter 5 min
- Learn 10 min
- Lab 20 min
- Quiz 10 min
- Exam 10 min
The power cut
You're writing an essay and the power goes off. When the computer restarts, your unsaved work is gone, but your saved files and the operating system are still there. Why?
Reveal
Unsaved work was in RAM, which is volatile: it loses its contents without power. Saved files are on secondary storage, and the start-up instructions are in ROM. Both are non-volatile.
Key ideas
| RAM | ROM | Cache | |
|---|---|---|---|
| Volatile? | Yes | No | Yes |
| Can be changed? | Read and write | Read only | Read and write |
| Holds | Programs and data in use | Start-up (boot) instructions | Frequently used instructions and data |
Why secondary storage? Main memory is volatile and too small and expensive to hold everything. Secondary storage is non-volatile, so files and software are kept when the power is off.
Magnetic (HDD)
Spinning platters and a moving read/write head. Large capacity, cheap per GB, but has moving parts so can be damaged and is slower.
Solid state (SSD, flash)
No moving parts, uses flash memory. Fast, robust, silent and light, but more expensive per GB.
Optical (CD, DVD, Blu-ray)
A laser reads pits and lands on the disc. Cheap and portable, but small capacity, slow and easily scratched.
Cloud storage
Files stored on remote servers, accessed over the internet. Access from anywhere, easy sharing and backups; needs a connection and you rely on the provider for security.
Embedded system: a computer system built into a larger device to do a dedicated job, e.g. a washing machine controller or a car's engine management system. Usually small, low-power and with its program in ROM.
Pick the storage
Choose the most suitable type for each scenario.Fastest to slowest
Embedded or not?
Exam-style questions
1. Describe two differences between RAM and ROM.
[4 marks]Mark scheme
- RAM is volatile (1); ROM is non-volatile (1)
- RAM can be written to and read from (1); ROM is read only (1)
- RAM holds programs and data currently in use (1); ROM holds start-up / boot instructions (1)
- Max 4
2. A photographer is choosing between a hard disk drive and a solid state drive for a laptop used on location. Recommend one and justify your choice.
[3 marks]Mark scheme
- Recommends SSD (1)
- No moving parts, so more robust / less likely to be damaged when carried (1)
- Faster access, so large photo files load quickly / lighter / uses less power (1)
3. What is an embedded system? Give one example.
[2 marks]Mark scheme
- A computer system with a dedicated function within a larger mechanical or electrical system (1)
- Any valid example, e.g. washing machine, microwave, car engine management (1)
TUTOR NOTES
- Misconception: "RAM is storage". It's main memory; storage means secondary storage.
- Misconception: SSDs are magnetic. They use flash memory (solid state).
- Exam habit: in "recommend" questions, link each feature to the scenario, not just list features.
- Extension: why do laptops still sometimes use HDDs?