Many marks in IB Computer Science are lost on things you half know: which register holds the next address, which normal form removes transitive dependencies, how precision differs from recall. Flashcards turn half knowing into instant recall , and that is what these 888 free IB Computer Science flashcards are for. Every card is written for the 2025 guide, first examined in 2027.
Below is one deck for every subtopic of A1 to A4, B1, B3 and B4, each with a summary of what it tests and a link to the full revision guide. The cards mix definitions, comparisons, explanations, processes, scenarios and 119 exam-style questions with marks, and almost every card ends with an exam tip.
Topic
Decks
Cards
HL-only cards
A1 Computer fundamentals
A1.1 to A1.4
199
55
A2 Networks
A2.1 to A2.4
171
55
A3 Databases
A3.1 to A3.4
184
69
A4 Machine learning
A4.1 to A4.4
168
107
B1 Computational thinking
B1.1
35
0
B3 Object-oriented programming
B3.1 and B3.2
82
39
B4 Abstract data types
B4.1
49
49
Total
20 decks
888
374
How to use these flashcards Flip a card: tap or click it to see the answer.
Move through the deck: use the arrow buttons under the card to go to the previous or next card.
Keyboard: press Tab to reach the deck, then use the arrow keys.
Code: the B3.1, B3.2 and B4.1 decks have a Python/Java switch for the language you are examined in.
HL badge: every HL-only card is marked HL. SL students can skip those cards.
No account: there is no sign-up and nothing is saved.
How to revise with them. Treat each card as a tiny test. Say the answer out loud before you flip, because naming the exact term is what earns the mark. Jot down the questions you miss and revisit them tomorrow, then a few days later.
Finish each session with some exam-style cards. "Explain why a CPU with a larger cache may run programs faster [3 marks]" needs three linked points, one per mark:
A larger cache holds more of the data in use.
So more requests are cache hits.
So there are fewer slow trips to RAM, and less waiting.
A1 Computer fundamentals flashcards A1 is the hardware and systems foundation of Paper 1: the CPU, binary and logic, the operating system and, at HL, translation. Its four decks hold 199 cards.
A1.1 Computer hardware and operation This deck takes the CPU apart: the ALU and control unit, the PC, IR, MAR, MDR and accumulator, and what each bus carries. It follows an instruction through fetch, decode and execute, then covers RAM, ROM and cache, secondary storage from SSDs to NAS, lossy and lossless compression (including run-length encoding) and the SaaS, PaaS and IaaS cloud models. HL cards compare CPUs with GPUs and count clock cycles in a pipeline. The deck has 68 cards, 10 of them HL.
Read the full A1.1 revision guide for a worked fetch, decode and execute example.
A1.1 Computer hardware and operation 68 cards · 10 HL
A1.1.1 Definition Which kinds of operation does the arithmetic logic unit (ALU) carry out? A1.1-001 Tap to flip A1.1.1 Definition Which kinds of operation does the arithmetic logic unit (ALU) carry out? It performs arithmetic operations (such as addition and subtraction) and logical operations (such as AND, OR and NOT), including comparisons like testing whether one value is greater than another. Results usually go to the accumulator. Exam tip For two marks, give both halves: arithmetic and logic. Memory hook: the ALU is the CPU's calculator.A1.1-001 Tap to flip back
1 / 68
A1.1.1 Definition What does the control unit (CU) do? A1.1-002 Tap to flip A1.1.1 Definition What does the control unit (CU) do? It decodes instructions held in the IR and sends control signals that direct and coordinate the other components (ALU, registers, memory, buses), using the clock to time each step of the fetch, decode and execute cycle. Exam tip Decoding belongs to the CU; calculating belongs to the ALU. The CU is the conductor: it directs but never does the arithmetic.A1.1-002 Tap to flip back
2 / 68
A1.1.1 Definition What does the program counter (PC) hold? A1.1-003 Tap to flip A1.1.1 Definition What does the program counter (PC) hold? The memory address of the next instruction to be fetched. At the start of each fetch it is copied to the MAR, then incremented to point to the following instruction. A jump instruction overwrites it. Exam tip PC holds the ADDRESS of the NEXT instruction; the IR holds the CURRENT instruction itself. Swapping them is a classic lost mark.A1.1-003 Tap to flip back
3 / 68
A1.1.1 Definition What is held in the instruction register (IR)? A1.1-004 Tap to flip A1.1.1 Definition What is held in the instruction register (IR)? The instruction currently being decoded and executed . It is copied in from the MDR during the fetch and stays in the IR while the control unit decodes it into its opcode and operand(s). Exam tip The IR holds an instruction, never the address of the next one: that is the PC's job.A1.1-004 Tap to flip back
4 / 68
A1.1.1 Definition What is stored in the memory address register (MAR)? A1.1-005 Tap to flip A1.1.1 Definition What is stored in the memory address register (MAR)? The address of the memory location about to be read from or written to . It may be an instruction's address (copied from the PC) or a data address, and is passed to memory along the address bus . Exam tip MAR = WHERE. The PC only ever points to the next instruction; the MAR holds whichever address is being accessed right now.A1.1-005 Tap to flip back
5 / 68
A1.1.1 Definition What is stored in the memory data register (MDR)? A1.1-006 Tap to flip A1.1.1 Definition What is stored in the memory data register (MDR)? It holds the data or instruction just read from memory , or waiting to be written to memory , at the address in the MAR. It connects to the data bus and acts as a buffer between the CPU and slower memory. Exam tip MDR = WHAT (the contents, never the address). Older books call it the memory buffer register (MBR).A1.1-006 Tap to flip back
6 / 68
A1.1.1 Definition What is the purpose of the accumulator (AC)? A1.1-007 Tap to flip A1.1.1 Definition What is the purpose of the accumulator (AC)? A register inside the CPU that holds the intermediate and final results of the ALU's arithmetic and logic operations. Keeping working values in the CPU means fewer slow memory accesses are needed. Exam tip Two-mark pattern: what it stores (ALU results) plus why that helps (fewer trips out to memory).A1.1-007 Tap to flip back
7 / 68
A1.1.1 Definition What does the address bus carry, and in which direction? A1.1-008 Tap to flip A1.1.1 Definition What does the address bus carry, and in which direction? Memory addresses , sent from the MAR to say which location in memory to read or write. It is one-directional (CPU to memory). Its width (number of lines) fixes how many locations can be addressed.Exam tip Each extra address line doubles the addressable memory: n lines can select 2^n different locations.A1.1-008 Tap to flip back
8 / 68
A1.1.1 Definition What does the data bus carry, and in which direction? A1.1-009 Tap to flip A1.1.1 Definition What does the data bus carry, and in which direction? The actual data and instructions moving between the CPU (via the MDR), memory and input/output devices. It is bidirectional : towards the CPU on a read, away from it on a write. Its width sets how many bits move per transfer. Exam tip There is one line per bit, not per byte: a 64-bit data bus moves 64 bits in a single transfer.A1.1-009 Tap to flip back
9 / 68
A1.1.1 Definition What does the control bus carry? A1.1-010 Tap to flip A1.1.1 Definition What does the control bus carry? Control and timing signals that coordinate the system, such as memory read , memory write , the clock signal and interrupt requests . The CU sends most of them; some, like interrupts and acknowledgements, travel back to the CPU.Exam tip Bus roles in one line: the address bus says WHERE, the data bus carries WHAT, the control bus says WHAT TO DO and WHEN.A1.1-010 Tap to flip back
10 / 68
A1.1.1 Definition What is a co-processor? A1.1-011 Tap to flip A1.1.1 Definition What is a co-processor? A specialised processor that supplements the CPU by offloading particular tasks, such as graphics (GPU), floating-point maths (FPU) or signal processing (DSP), leaving the CPU free for general-purpose work. Exam tip The GPU is the best-known co-processor. DSP stands for digital signal processor.A1.1-011 Tap to flip back
11 / 68
A1.1.1 Compare How does a multi-core processor differ from a single-core processor? A1.1-012 Tap to flip A1.1.1 Compare How does a multi-core processor differ from a single-core processor? A single-core processor has one core, so it executes one instruction stream at a time ; multitasking means switching rapidly between tasks. A multi-core processor has two or more independent cores on one chip , each with its own ALU, CU and registers. A multi-core processor can run several threads truly in parallel , so multitasking and parallel workloads run faster. Exam tip Extra cores help only when there are several threads or programs to run: a single-threaded program still uses just one core.A1.1-012 Tap to flip back
12 / 68
A1.1.1 Explain In a labelled diagram of a CPU linked to memory, how are the registers, units and buses connected? A1.1-013 Tap to flip A1.1.1 Explain In a labelled diagram of a CPU linked to memory, how are the registers, units and buses connected? PC → MAR , and the MAR feeds the address bus to memory.Memory ↔ data bus ↔ MDR (two-way). MDR → IR → CU , where the instruction is decoded.The CU sends control signals to the ALU and registers, and to memory along the control bus . The ALU combines values from the AC and the MDR and writes its result back to the AC . Exam tip Draw the CU, ALU and registers inside the CPU, memory outside, and buses crossing between them. Arrows must show the direction of flow.A1.1-013 Tap to flip back
13 / 68
A1.1.1 Exam question [4 marks] Explain how the control unit and the ALU work together when the CPU carries out an instruction to add two numbers. A1.1-014 Tap to flip A1.1.1 Exam question [4 marks] Explain how the control unit and the ALU work together when the CPU carries out an instruction to add two numbers. The CU decodes the instruction in the IR, identifying the opcode (add) and its operands. The CU sends control signals to the ALU selecting the addition operation. The CU routes the operands into the ALU (e.g. from the AC and the MDR ). The ALU performs the addition and places the result in the accumulator . The CU then coordinates the next step : storing the result or fetching the next instruction. Exam tip Explain needs cause and effect: say what the CU does SO THAT the ALU can act. Never credit the CU with the calculating.A1.1-014 Tap to flip back
14 / 68
A1.1.2 Definition What is the role of a graphics processing unit (GPU)? A1.1-015 Tap to flip A1.1.2 Definition What is the role of a graphics processing unit (GPU)? A specialised processor (co-processor) built to render graphics , e.g. calculating the colour of millions of pixels every frame in a video game, and to accelerate other highly parallel tasks like machine learning. It offloads this work from the CPU. Exam tip 'Use a GPU' earns nothing on its own: always say WHY (many cores working in parallel) and link it to the task.A1.1-015 Tap to flip back
15 / 68
A1.1.2 Explain Why does the architecture of a GPU make it suitable for complex computations such as matrix maths? A1.1-016 Tap to flip A1.1.2 Explain Why does the architecture of a GPU make it suitable for complex computations such as matrix maths? It has hundreds or thousands of small, simple cores rather than a few complex ones. It uses massively parallel processing (SIMD) : the same instruction applied to many data items at once. High-bandwidth dedicated memory (VRAM) keeps all those cores supplied with data.So big jobs such as matrix and vector maths split into many independent calculations that run simultaneously, giving high throughput . Exam tip SIMD = single instruction, multiple data. Hook: one teacher giving the same instruction to a whole class at once.A1.1-016 Tap to flip back
16 / 68
A1.1.2 Apply it An animation studio renders 3D films and runs physics simulations of smoke and water. Why should it invest in powerful GPUs? A1.1-017 Tap to flip A1.1.2 Apply it An animation studio renders 3D films and runs physics simulations of smoke and water. Why should it invest in powerful GPUs? Rendering : lighting, shadows and textures are calculated for millions of pixels per frame; each pixel is independent , so thousands of cores work in parallel .Simulation : the same physics equations are applied to millions of particles at once, an ideal SIMD workload.Large VRAM holds big models and textures close to the cores. Result: far shorter render and simulation times than a CPU alone. Exam tip Scientific simulations work the same way: weather and climate models apply identical equations to millions of grid points.A1.1-017 Tap to flip back
17 / 68
A1.1.2 Exam question [3 marks] A team is training an image-recognition neural network on millions of photos. Explain why GPUs are recommended rather than CPUs alone. A1.1-018 Tap to flip A1.1.2 Exam question [3 marks] A team is training an image-recognition neural network on millions of photos. Explain why GPUs are recommended rather than CPUs alone. Training involves huge numbers of matrix multiplications , which split into many independent calculations . A GPU has thousands of cores that perform these in parallel (SIMD), whereas a CPU has only a few cores. The large dataset multiplies the work, so CPU-only training would take far too long; GPUs cut training time dramatically. High-bandwidth VRAM keeps the cores fed with data.Exam tip Link the feature to the task: 'many cores, so the matrix operations run in parallel' beats 'GPUs have many cores'.A1.1-018 Tap to flip back
18 / 68
A1.1.3 Compare HL How do the design philosophies of a CPU and a GPU differ, and how does this affect what each is used for? A1.1-019 Tap to flip A1.1.3 Compare HL How do the design philosophies of a CPU and a GPU differ, and how does this affect what each is used for? A CPU is a general-purpose processor optimised for low latency : it finishes individual tasks quickly and handles complex control flow (branches, decisions). A GPU is optimised for high throughput : it completes huge amounts of parallel work, even though each item is not especially fast. So the CPU runs the operating system , general applications and branching logic, while the GPU handles graphics, machine learning and simulations . Exam tip Exam shorthand: CPUs are optimised for latency, GPUs for throughput. Never just write 'GPUs are faster'.A1.1-019 Tap to flip back
19 / 68
A1.1.3 Compare HL Compare the core architecture and processing power of a CPU with those of a GPU. A1.1-020 Tap to flip A1.1.3 Compare HL Compare the core architecture and processing power of a CPU with those of a GPU. A CPU has a few powerful, complex cores (high clock speed, branch prediction, out-of-order execution), whereas a GPU has hundreds to thousands of simpler cores . So a CPU has higher single-thread performance , completing one sequence of instructions quickly. A GPU has far higher total throughput on parallel workloads but is slow on sequential, branch-heavy code. Exam tip GPU cores are not simply 'weaker': they are specialised for repeating the same operation on lots of data.A1.1-020 Tap to flip back
20 / 68
A1.1.3 Compare HL How does memory access differ between a CPU and a GPU? A1.1-021 Tap to flip A1.1.3 Compare HL How does memory access differ between a CPU and a GPU? A CPU relies on large multi-level caches (L1, L2, L3) for low-latency access to data from system RAM, which suits unpredictable access patterns. A GPU uses dedicated high-bandwidth memory (VRAM) with smaller caches, optimised for throughput : streaming large blocks of data to thousands of cores. In short: the CPU gets the first item fast; the GPU moves a huge volume per second. Exam tip Latency is the delay before data arrives; bandwidth is how much arrives per second. CPUs prioritise latency, GPUs bandwidth.A1.1-021 Tap to flip back
21 / 68
A1.1.3 Compare HL Compare the power efficiency of CPUs and GPUs. A1.1-022 Tap to flip A1.1.3 Compare HL Compare the power efficiency of CPUs and GPUs. On parallel workloads a GPU does more work per watt , because it spreads the job across many simple, lower-clocked cores. However, a high-end GPU draws more total power and produces more heat than a typical CPU. For serial or light workloads the CPU is more efficient: the task cannot use the GPU's parallelism, so the extra power buys little. Exam tip Use the phrase 'performance per watt'. Which chip is more efficient depends on the workload, not just the hardware.A1.1-022 Tap to flip back
22 / 68
A1.1.3 Exam question [4 marks] HL Explain how a CPU and a GPU share the work in a computer running a 3D game. A1.1-023 Tap to flip A1.1.3 Exam question [4 marks] HL Explain how a CPU and a GPU share the work in a computer running a 3D game. Task division : the CPU runs sequential, decision-heavy work (game logic, input) and offloads parallel work (rendering pixels) to the GPU.Data sharing : models and textures are copied from RAM into VRAM , or kept in shared memory on integrated GPUs.Coordinating execution : the CPU issues commands to the GPU, carries on, then synchronises to use the results.So both work simultaneously , each on what it does best. Exam tip Copying data between RAM and VRAM takes time, so offloading only pays off when the parallel job is large.A1.1-023 Tap to flip back
23 / 68
A1.1.4 Definition What is the purpose of RAM? A1.1-024 Tap to flip A1.1.4 Definition What is the purpose of RAM? RAM is primary memory that holds the operating system, programs and data currently in use , which the CPU accesses directly. It is volatile (contents lost when power is off) and can be read and written . Exam tip Memory hook: RAM is the workbench. Whatever the CPU is working on right now has to be on it.A1.1-024 Tap to flip back
24 / 68
A1.1.4 Definition What is the purpose of ROM? A1.1-025 Tap to flip A1.1.4 Definition What is the purpose of ROM? ROM stores the firmware needed to start up the computer, such as the BIOS/UEFI boot instructions that check the hardware and load the operating system. It is non-volatile (keeps its contents without power) and read-only in normal use. Exam tip Forgetting that ROM is non-volatile is a common slip. Its job is booting, so it sits outside the speed hierarchy.A1.1-025 Tap to flip back
25 / 68
A1.1.4 Definition What is cache memory and where is it located? A1.1-026 Tap to flip A1.1.4 Definition What is cache memory and where is it located? A small, very fast , volatile memory on or very close to the CPU , between the registers and RAM. It holds copies of frequently or recently used instructions and data so the CPU can get them without waiting for slower RAM. Exam tip 'Cache is faster' alone scores one mark at most: also say where it sits and what it holds.A1.1-026 Tap to flip back
26 / 68
A1.1.4 Explain Why is primary memory arranged as a hierarchy of registers, cache and RAM? A1.1-027 Tap to flip A1.1.4 Explain Why is primary memory arranged as a hierarchy of registers, cache and RAM? There is a trade-off between speed, capacity and cost : the fastest memory costs most per byte, so only small amounts are practical. Registers : the smallest, fastest storage, inside the CPU , holding the values being processed now.Cache : larger and slower, holding frequently used data.RAM : much larger but slower, holding everything currently running.Keeping the most-used data closest to the CPU gives near-register speed at near-RAM cost. Exam tip Moving away from the CPU, each level is bigger, slower and cheaper per byte.A1.1-027 Tap to flip back
27 / 68
A1.1.4 Compare How do L1, L2 and L3 cache differ? A1.1-028 Tap to flip A1.1.4 Compare How do L1, L2 and L3 cache differ? L1 : the smallest and fastest , built into each core (often split into instruction and data caches).L2 : larger but slower than L1, usually one per core .L3 : the largest and slowest cache level, usually shared by all cores , yet still much faster than RAM.All three are volatile . Exam tip Avoid quoting exact sizes or speeds: they vary between chips. The ordering is what earns marks.A1.1-028 Tap to flip back
28 / 68
A1.1.4 Compare What is the difference between a cache hit and a cache miss? A1.1-029 Tap to flip A1.1.4 Compare What is the difference between a cache hit and a cache miss? Cache hit : the data or instruction the CPU requests is found in cache , so it is supplied very quickly.Cache miss : it is not in that cache , so the CPU checks the next level down (L2, then L3, then RAM) and copies it into cache, causing a delay .The higher the hit rate , the less time the CPU spends waiting. Exam tip Textbook search order: registers, L1, L2, L3, then RAM. Strictly, instructions name registers directly, so a memory request starts at L1.A1.1-029 Tap to flip back
29 / 68
A1.1.4 Exam question [3 marks] Distinguish between RAM and ROM in a desktop computer. A1.1-030 Tap to flip A1.1.4 Exam question [3 marks] Distinguish between RAM and ROM in a desktop computer. RAM is volatile (loses its contents when power is off), whereas ROM is non-volatile . RAM can be read and written , whereas ROM is read-only in normal use. RAM holds the programs and data currently in use , whereas ROM holds fixed start-up firmware (e.g. BIOS). RAM usually has a much larger capacity than ROM. Exam tip Every point must name both memories. Two separate descriptions ('RAM is volatile. ROM stores the BIOS.') score poorly.A1.1-030 Tap to flip back
30 / 68
A1.1.4 Exam question [3 marks] Explain why a CPU with a larger cache may run programs faster than an otherwise identical CPU. A1.1-031 Tap to flip A1.1.4 Exam question [3 marks] Explain why a CPU with a larger cache may run programs faster than an otherwise identical CPU. A larger cache can hold more of the instructions and data a program uses frequently. So more requests are cache hits and fewer are cache misses . Each miss forces a much slower access to RAM , so a higher hit rate means the CPU spends less time waiting . Instructions and data arrive sooner, so the program runs faster . Exam tip Build a chain: bigger cache, more hits, fewer slow RAM accesses, less waiting. Each link is a mark.A1.1-031 Tap to flip back
31 / 68
A1.1.4 Compare How does storing a computer's boot firmware on a ROM chip compare with storing it in flash memory? A1.1-032 Tap to flip A1.1.4 Compare How does storing a computer's boot firmware on a ROM chip compare with storing it in flash memory? Both are non-volatile , so the firmware survives power-off.ROM is read-only , whereas flash can be electrically erased and rewritten , so the firmware can be updated. ROM is harder to corrupt or tamper with ; flash can be damaged by a failed update or malware. ROM does not wear out , whereas flash survives only a limited number of write cycles . Flash can offer more capacity . Exam tip Modern UEFI firmware is usually stored in flash, which is why motherboards can receive firmware updates.A1.1-032 Tap to flip back
32 / 68
A1.1.5 Definition What are the opcode and the operand of a machine-code instruction? A1.1-033 Tap to flip A1.1.5 Definition What are the opcode and the operand of a machine-code instruction? The opcode specifies which operation to perform (e.g. LOAD, ADD, STORE, JUMP). The operand gives the data to use, or the address where that data is held. Exam tip In ADD 25, ADD is the opcode; 25 is the operand, either the value itself or the address holding the value.A1.1-033 Tap to flip back
33 / 68
A1.1.5 Process What happens, register by register, during the fetch stage of the instruction cycle? A1.1-034 Tap to flip A1.1.5 Process What happens, register by register, during the fetch stage of the instruction cycle? The address in the PC is copied to the MAR . The MAR's address goes along the address bus , and a read signal is sent on the control bus . The instruction at that address returns on the data bus into the MDR . The instruction is copied from the MDR to the IR . The PC is incremented to point to the next instruction. Exam tip Name the registers in order: PC, MAR, MDR, IR. Asked which bus carries the PC's contents to the MAR? IB credits the address bus.A1.1-034 Tap to flip back
34 / 68
A1.1.5 Process What happens during the decode stage of the instruction cycle? A1.1-035 Tap to flip A1.1.5 Process What happens during the decode stage of the instruction cycle? The control unit examines the instruction held in the IR . It splits it into the opcode (the operation) and the operand(s) (data or address). It works out what the operation needs , e.g. whether more data must be fetched from memory. It generates the control signals that set up the ALU, registers and buses for execution. Exam tip In a decode answer, fetch points (PC, address bus) and execute points (the ALU calculating) earn nothing.A1.1-035 Tap to flip back
35 / 68
A1.1.5 Process What happens during the execute stage of the instruction cycle? A1.1-036 Tap to flip A1.1.5 Process What happens during the execute stage of the instruction cycle? Arithmetic or logic : the ALU performs the operation and the result goes to the accumulator .Load : data at the operand's address is read into the MDR, then the AC.Store : the address goes to the MAR , the data to the MDR , a write signal is sent and the data bus carries it to memory.Jump : the PC is overwritten with a new address.The cycle then repeats . Exam tip Older mark schemes describe the cycle as fetch, decode, execute and store: remember that results are written back.A1.1-036 Tap to flip back
36 / 68
A1.1.5 Apply it Address 20 holds 7, address 21 holds 5. After LOAD 20, ADD 21, STORE 22, what do the AC and address 22 contain? A1.1-037 Tap to flip A1.1.5 Apply it Address 20 holds 7, address 21 holds 5. After LOAD 20, ADD 21, STORE 22, what do the AC and address 22 contain? LOAD 20 : 7 is copied from memory (via the MDR) into the AC . AC = 7.ADD 21 : 5 is fetched and the ALU adds it to the AC. AC = 12 .STORE 22 : the AC value is written to memory via the MDR. Address 22 = 12 .Each instruction passed through its own fetch, decode and execute, with the PC moving on by one each time. Exam tip The operands here are addresses, not values: ADD 21 adds the CONTENTS of address 21, which is 5.A1.1-037 Tap to flip back
37 / 68
A1.1.5 Exam question [4 marks] Explain the roles of the address, data and control buses when the CPU fetches an instruction from memory. A1.1-038 Tap to flip A1.1.5 Exam question [4 marks] Explain the roles of the address, data and control buses when the CPU fetches an instruction from memory. The address bus carries the instruction's address from the MAR to memory, one way only . The control bus carries a memory read signal (timed by the clock ) so memory knows what to do. Memory returns the instruction on the data bus . It is received into the MDR and then copied to the IR . The data bus is bidirectional : on a store it carries data from the MDR to memory. Exam tip Name each bus and what it carries. A vague 'the buses move data and addresses around' earns very little.A1.1-038 Tap to flip back
38 / 68
A1.1.6 Definition HL What is pipelining in a processor? A1.1-039 Tap to flip A1.1.6 Definition HL What is pipelining in a processor? Splitting instruction processing into stages and overlapping them, so that while one instruction executes, the next is being decoded and another fetched. Several instructions are in progress at once , raising throughput . Exam tip Pipelining never makes a single instruction faster; it raises the number of instructions finished per second.A1.1-039 Tap to flip back
39 / 68
A1.1.6 Process HL Describe the four stages of a processor pipeline. A1.1-040 Tap to flip A1.1.6 Process HL Describe the four stages of a processor pipeline. Fetch : the next instruction is read from memory (or cache).Decode : the CU identifies the opcode and operands.Execute : the ALU (or another unit) carries out the operation.Write-back : the result is written to a register or memory .In any clock cycle, each stage is working on a different instruction . Exam tip Laundry hook: wash, dry, fold. While load 1 is drying, load 2 is washing, so no machine sits idle.A1.1-040 Tap to flip back
40 / 68
A1.1.6 Compare HL How does pipelining differ from using multiple cores, and how do the two combine in a modern processor? A1.1-041 Tap to flip A1.1.6 Compare HL How does pipelining differ from using multiple cores, and how do the two combine in a modern processor? Pipelining overlaps the stages of successive instructions within one core (one instruction stream).Multi-core places several independent cores on one chip; each has its own registers, ALU and usually L1 cache, so each runs its own thread .The cores work in parallel , running separate tasks at the same time. In a modern CPU each core has its own pipeline , so the two gains combine. Exam tip Pipelining = overlap inside a core. Multi-core = several cores side by side. Pipelining does not 'create' multi-core processing.A1.1-041 Tap to flip back
41 / 68
A1.1.6 Apply it HL A four-stage pipeline takes one clock cycle per stage. How many cycles do 10 instructions need with and without pipelining? A1.1-042 Tap to flip A1.1.6 Apply it HL A four-stage pipeline takes one clock cycle per stage. How many cycles do 10 instructions need with and without pipelining? Without pipelining : each instruction takes 4 cycles in turn, so 10 × 4 = 40 cycles .With pipelining : the first instruction finishes after 4 cycles, then one completes every cycle , so 4 + 9 = 13 cycles .Each instruction still takes 4 cycles, but throughput is about three times higher . Exam tip With many instructions the speed-up approaches the number of stages (here 4), ignoring any stalls.A1.1-042 Tap to flip back
42 / 68
A1.1.6 Exam question [4 marks] HL A quad-core CPU has a pipeline in each core. Describe how this design improves overall performance. A1.1-043 Tap to flip A1.1.6 Exam question [4 marks] HL A quad-core CPU has a pipeline in each core. Describe how this design improves overall performance. Each core's pipeline overlaps fetch, decode, execute and write-back , so several instructions are in progress. Once full, a pipeline can complete about one instruction per clock cycle , raising throughput. The four cores work independently , each fetching and executing its own thread . They run in parallel , so up to four threads progress simultaneously. The gain depends on the work being divisible into threads ; sequential parts still use one core. Exam tip 'Processed at the same time' with no detail earns little: say WHAT overlaps (stages) and WHAT runs in parallel (threads).A1.1-043 Tap to flip back
43 / 68
A1.1.7 Definition What is secondary storage and why does a computer need it? A1.1-044 Tap to flip A1.1.7 Definition What is secondary storage and why does a computer need it? Non-volatile , high-capacity storage that keeps programs and data long term , even when the power is off. The CPU cannot work on it directly: data must first be loaded into RAM . Examples: SSD, HDD, flash drive.Exam tip RAM is volatile and relatively small, so without secondary storage every file would vanish at shutdown.A1.1-044 Tap to flip back
44 / 68
A1.1.7 Compare How does internal secondary storage differ from external secondary storage? A1.1-045 Tap to flip A1.1.7 Compare How does internal secondary storage differ from external secondary storage? Internal storage is fitted inside the device (e.g. SSD, HDD, eMMC) and holds the OS, applications and user files.External storage connects from outside (USB, Thunderbolt or a network) and is portable or shared : external SSDs and HDDs, optical discs, flash drives, memory cards, NAS.External drives use the same technologies but serve for backup, file transfer and extra capacity ; an external HDD gives cheap, high-capacity backups. Exam tip An external SSD or HDD works exactly like the internal version; only the casing and connection differ.A1.1-045 Tap to flip back
45 / 68
A1.1.7 Compare Compare an internal SSD with an internal HDD. A1.1-046 Tap to flip A1.1.7 Compare Compare an internal SSD with an internal HDD. An HDD stores data magnetically on spinning platters read by a moving read/write head ; an SSD uses NAND flash memory with no moving parts . SSDs are much faster (quicker boot and loading) and more durable if knocked. HDDs are cheaper per GB and offer larger capacities . SSDs are silent and use less power, but flash cells allow only a limited number of writes . Exam tip Explain WHY the SSD is faster: no head has to physically move across a disk to reach the data.A1.1-046 Tap to flip back
46 / 68
A1.1.7 Definition What is an eMMC, and where is it typically used? A1.1-047 Tap to flip A1.1.7 Definition What is an eMMC, and where is it typically used? An embedded multimedia card : flash storage plus its controller, soldered onto the motherboard . It is cheap and compact but has lower capacity and is slower than an SSD . Found in phones, tablets and budget laptops . Exam tip Soldered on means it usually cannot be upgraded or replaced, unlike most SSDs.A1.1-047 Tap to flip back
47 / 68
A1.1.7 Definition How does an optical drive store and read data? A1.1-048 Tap to flip A1.1.7 Definition How does an optical drive store and read data? A laser reads (and can write) CD, DVD or Blu-ray discs. Data is held as pits and lands along a spiral track; pits scatter the light while lands reflect it, and a sensor turns these changes into binary . Exam tip Optical discs suit cheap archiving and distribution, but access is slow and discs scratch easily.A1.1-048 Tap to flip back
48 / 68
A1.1.7 Definition What are USB flash drives and memory cards, and when is each used? A1.1-049 Tap to flip A1.1.7 Definition What are USB flash drives and memory cards, and when is each used? Both are small, removable NAND flash storage. A USB flash drive plugs into a USB port to move files between computers . A memory card (e.g. SD, microSD) fits a slot in cameras, phones, drones and other small devices. Exam tip Their small size is also a drawback: easily lost, a security risk if they hold unencrypted confidential data.A1.1-049 Tap to flip back
49 / 68
A1.1.7 Definition What is network attached storage (NAS)? A1.1-050 Tap to flip A1.1.7 Definition What is network attached storage (NAS)? A storage device containing one or more drives that connects to a network (e.g. via the router) rather than to one computer, giving centralised storage shared by many users and devices , often using RAID to survive a drive failure. Exam tip NAS needs a working network and some setup, and costs more than a single external drive.A1.1-050 Tap to flip back
50 / 68
A1.1.7 Apply it A videographer edits large 4K files on a laptop while travelling and needs extra storage. Which external drive should they choose, and why? A1.1-051 Tap to flip A1.1.7 Apply it A videographer edits large 4K files on a laptop while travelling and needs extra storage. Which external drive should they choose, and why? An external SSD : Fast transfer speeds , so large video files open and save quickly enough to edit directly from the drive.No moving parts , so it is shock resistant when carried around.Small and portable , usually powered over USB.An external HDD is cheaper per GB but slower and more fragile; a flash drive is usually too small and slow. Exam tip Justify with the scenario's needs (speed, portability, durability), not just a list of SSD features.A1.1-051 Tap to flip back
51 / 68
A1.1.7 Apply it Which storage suits each: a budget tablet, an office whose staff share files, and cheap backups of 4 TB of photos? A1.1-052 Tap to flip A1.1.7 Apply it Which storage suits each: a budget tablet, an office whose staff share files, and cheap backups of 4 TB of photos? Budget tablet : eMMC , cheap, compact and soldered on, with enough speed and capacity for apps and media.Shared office files : a NAS , centralised storage every staff device reaches over the network, often with RAID so one drive failure loses nothing.4 TB backup : an external HDD , the lowest cost per GB at high capacity; speed matters little for backups.Exam tip Justify each choice with the deciding factor from the scenario: cost, capacity, speed, portability, durability or sharing.A1.1-052 Tap to flip back
52 / 68
A1.1.8 Definition What is data compression and why is it used? A1.1-053 Tap to flip A1.1.8 Definition What is data compression and why is it used? Reducing the size of a file (the number of bits needed to store it) so that it takes up less storage space and can be transmitted faster , using less bandwidth and often costing less to store or send.Exam tip 'Makes the file smaller' earns one mark at most: add the consequence (faster transfer, less storage, lower bandwidth).A1.1-053 Tap to flip back
53 / 68
A1.1.8 Definition What is lossless compression? A1.1-054 Tap to flip A1.1.8 Definition What is lossless compression? Compression that removes redundancy (e.g. repeated patterns) without discarding any information, so decompression reconstructs the original exactly , bit for bit. Used where every bit matters: text, program code, executables, spreadsheets . Examples: ZIP, PNG, RLE. Exam tip Lossless removes REDUNDANCY, not detail. Saying it removes 'unnecessary data' sounds lossy and can cost the mark.A1.1-054 Tap to flip back
54 / 68
A1.1.8 Definition What is lossy compression? A1.1-055 Tap to flip A1.1.8 Definition What is lossy compression? Compression that permanently removes some data , usually detail people barely notice, so the decompressed file is only an approximation of the original. Files become much smaller . Used for images, audio and video (e.g. JPEG, MP3, MPEG). Exam tip Lossy is irreversible: discarded data cannot be recovered, so keep an uncompressed master copy.A1.1-055 Tap to flip back
55 / 68
A1.1.8 Definition How does run-length encoding (RLE) compress data? A1.1-056 Tap to flip A1.1.8 Definition How does run-length encoding (RLE) compress data? It replaces each run of identical consecutive values with a count and the value , e.g. AAAAABBB becomes 5A3B. Nothing is discarded, so it is lossless . It works best on data with long runs , such as simple graphics. Exam tip Memory hook: RLE records 'how many, then what'.A1.1-056 Tap to flip back
56 / 68
A1.1.8 Definition What is transform coding? A1.1-057 Tap to flip A1.1.8 Definition What is transform coding? A lossy technique that converts data into another form , typically the frequency domain using a discrete cosine transform (DCT) , then discards or reduces the precision of the components humans notice least. Used in JPEG, MP3 and MPEG . Exam tip Reducing precision is called quantisation. RLE is lossless; transform coding is lossy. Do not mix them up.A1.1-057 Tap to flip back
57 / 68
A1.1.8 Apply it Using run-length encoding, compress this row of pixels (W = white, B = black): WWWWWWWBBBWWWWWB A1.1-058 Tap to flip A1.1.8 Apply it Using run-length encoding, compress this row of pixels (W = white, B = black): WWWWWWWBBBWWWWWB 7W3B5W1B7 white, 3 black, 5 white, then 1 black. 16 symbols become 8, halving the size. Decoding gives back the exact original row, so no data is lost (lossless ). Exam tip Write the count even for a single pixel (1B), so every run is stored in the same count-then-value form.A1.1-058 Tap to flip back
58 / 68
A1.1.8 Explain Why can run-length encoding make some files larger instead of smaller? A1.1-059 Tap to flip A1.1.8 Explain Why can run-length encoding make some files larger instead of smaller? RLE stores a count plus a value for every run. If the data has few repeated values (short runs), each single value becomes two items, e.g. ABCD becomes 1A1B1C1D, doubling the size. RLE only helps when the data has long runs . Exam tip This is why RLE suits simple icons and cartoons, not photographs whose colours change from pixel to pixel.A1.1-059 Tap to flip back
59 / 68
A1.1.8 Exam question [4 marks] A music streaming service must decide whether to compress its songs with lossy or lossless compression. Discuss which it should use. A1.1-060 Tap to flip A1.1.8 Exam question [4 marks] A music streaming service must decide whether to compress its songs with lossy or lossless compression. Discuss which it should use. Lossy files are much smaller , so songs stream using less bandwidth , with less buffering and lower mobile data use.Lossy mainly removes sounds people can barely hear , so most listeners notice little difference. Lossless keeps the exact original quality , valued by listeners with high-end equipment.But lossless files are several times larger, raising storage and bandwidth costs . Conclusion : use lossy by default, perhaps offering lossless as a premium option.Exam tip Discuss needs both sides and a conclusion tied to the scenario. One-sided answers are capped.A1.1-060 Tap to flip back
60 / 68
A1.1.9 Definition What does cloud computing mean? A1.1-061 Tap to flip A1.1.9 Definition What does cloud computing mean? Using computing resources (servers, storage, databases, software) delivered over the internet on demand from a provider's data centres, usually paying only for what is used instead of buying and maintaining your own hardware. Exam tip Key characteristics: on-demand self-service, network access, scaling up or down, and pay-per-use.A1.1-061 Tap to flip back
61 / 68
A1.1.9 Definition What is software as a service (SaaS)? A1.1-062 Tap to flip A1.1.9 Definition What is software as a service (SaaS)? Complete, ready-to-use applications delivered over the internet , usually through a web browser and paid by subscription. The provider manages everything (hardware, OS, software, updates); the user just uses the app and their data. Examples: Gmail, Google Docs, Canva. Exam tip Hook: SaaS is a restaurant meal: you just turn up and eat, while the provider runs the kitchen, staff and clean-up.A1.1-062 Tap to flip back
62 / 68
A1.1.9 Definition What is platform as a service (PaaS)? A1.1-063 Tap to flip A1.1.9 Definition What is platform as a service (PaaS)? A cloud platform for developers to build, test, deploy and run their own applications . The provider manages the hardware, OS, runtime , databases and scaling; the customer manages only their code and data . Examples: Google App Engine, Heroku. Exam tip Hook: PaaS is a fully equipped kitchen. You cook your own recipe without maintaining the ovens.A1.1-063 Tap to flip back
63 / 68
A1.1.9 Definition What is infrastructure as a service (IaaS)? A1.1-064 Tap to flip A1.1.9 Definition What is infrastructure as a service (IaaS)? Renting virtualised computing resources (virtual servers, storage, networking) over the internet. The provider manages the physical hardware ; the customer installs and manages the operating system , software and data. Examples: AWS EC2, Azure virtual machines. Exam tip Hook: IaaS is an empty kitchen. You install everything yourself: most control, most responsibility.A1.1-064 Tap to flip back
64 / 68
A1.1.9 Compare How do SaaS, PaaS and IaaS differ in control, flexibility and who manages what? A1.1-065 Tap to flip A1.1.9 Compare How do SaaS, PaaS and IaaS differ in control, flexibility and who manages what? IaaS : most control and flexibility ; the customer manages the OS, runtime, applications and data, while the provider manages hardware and virtualisation.PaaS : medium ; the customer manages applications and data, and the provider also runs the OS and runtime.SaaS : least control ; the provider manages everything and the customer just uses the software.More control means more responsibility and expertise needed. Exam tip Rule of thumb: as you give up control, you gain convenience. Control order: IaaS > PaaS > SaaS.A1.1-065 Tap to flip back
65 / 68
A1.1.9 Explain How does the choice of SaaS, PaaS or IaaS affect resource management and resource availability for an organisation? A1.1-066 Tap to flip A1.1.9 Explain How does the choice of SaaS, PaaS or IaaS affect resource management and resource availability for an organisation? Resource management : in SaaS the provider handles servers, updates and capacity; in PaaS the provider scales the platform while the customer manages the app; in IaaS the customer configures, patches and scales its own servers.Resource availability : all three can scale on demand , but depend on the provider's uptime and an internet connection .IaaS lets customers add exactly the resources they choose , e.g. GPUs or extra storage. Exam tip More control brings more work: in IaaS, a misconfigured or unpatched server is the customer's problem, not the provider's.A1.1-066 Tap to flip back
66 / 68
A1.1.9 Apply it An online retailer runs a custom system needing a specific OS, and traffic triples every December. Which cloud model suits it, and why? A1.1-067 Tap to flip A1.1.9 Apply it An online retailer runs a custom system needing a specific OS, and traffic triples every December. Which cloud model suits it, and why? IaaS :It can choose and configure its own operating system and software, which SaaS and PaaS do not allow. It can add virtual servers for the December peak and release them afterwards, paying only for what it uses. No physical hardware is bought for a short peak. Trade-off: its IT team must manage and secure those servers. Exam tip Spot the clue: needing control of the OS points to IaaS; just needing a ready-made app points to SaaS.A1.1-067 Tap to flip back
67 / 68
A1.1.9 Exam question [4 marks] A start-up is developing a mobile app with a small team. Explain two reasons why it might choose PaaS rather than running its own servers. A1.1-068 Tap to flip A1.1.9 Exam question [4 marks] A start-up is developing a mobile app with a small team. Explain two reasons why it might choose PaaS rather than running its own servers. No infrastructure to manage : the provider runs servers, OS and updates, so developers can focus on writing code .Built-in tools for development, testing and deployment, so the app reaches users sooner.Automatic scaling , so the app copes if users suddenly grow, without buying hardware.Low upfront cost (pay as you go), so the start-up protects its limited budget.Cloud-hosted, so the team can collaborate from anywhere. Exam tip 'Explain two' means only the first two reasons are marked: give two, each with its 'so...' consequence.A1.1-068 Tap to flip back
68 / 68
Tip: click the card, then use the arrow keys to flip and move through the deck.
A1.2 Data representation and computer logic Much of this deck is practice: binary, denary and hexadecimal conversions in every direction, image file sizes from resolution and colour depth, and how sampling rate and bit depth shape a sound file. The logic half covers all seven gates, truth tables, Karnaugh maps, Boolean algebra laws including De Morgan's, and logic diagrams built from an expression. All 51 cards are for SL and HL.
Read the full A1.2 revision guide for worked conversions using place values and nibbles.
A1.2 Data representation and computer logic 51 cards
A1.2.1 Definition What is the binary number system, and what are the place values of an 8-bit binary number? A1.2-001 Tap to flip A1.2.1 Definition What is the binary number system, and what are the place values of an 8-bit binary number? Base 2 : it uses only the digits 0 and 1 (bits). Each place value is a power of 2 , doubling from right to left: 128, 64, 32, 16, 8, 4, 2, 1 (2^7 down to 2^0).Exam tip Place values start at 1 on the right. Writing them from the left is the commonest cause of wrong conversions.A1.2-001 Tap to flip back
1 / 51
A1.2.1 Definition What is the hexadecimal number system? A1.2-002 Tap to flip A1.2.1 Definition What is the hexadecimal number system? Base 16 : it uses the digits 0 to 9 then A to F , where A = 10, B = 11 ... F = 15 . Place values are powers of 16: 1, 16, 256, 4096 from the right.Exam tip Sixteen digits run from 0 to 15, so F = 15, never 16.A1.2-002 Tap to flip back
2 / 51
A1.2.1 Process Convert the binary number 11010010 to decimal. A1.2-003 Tap to flip A1.2.1 Process Convert the binary number 11010010 to decimal. Write the place values above the bits, then add the place values under each 1 : 128, 64, 32, 16, 8, 4, 2, 1 1, 1, 0, 1, 0, 0, 1, 0 128 + 64 + 16 + 2 = 210 Exam tip Quick check: a binary number ending in 0 is even, so its decimal value must be even too.A1.2-003 Tap to flip back
3 / 51
A1.2.1 Process Convert the decimal number 77 to an 8-bit binary number. A1.2-004 Tap to flip A1.2.1 Process Convert the decimal number 77 to an 8-bit binary number. Divide by 2 repeatedly and record the remainders:77 ÷ 2 = 38 r 1; 38 ÷ 2 = 19 r 0; 19 ÷ 2 = 9 r 1; 9 ÷ 2 = 4 r 1; 4 ÷ 2 = 2 r 0; 2 ÷ 2 = 1 r 0; 1 ÷ 2 = 0 r 1. Read the remainders from the bottom up : 1001101. Pad with a leading zero to 8 bits: 01001101 . Exam tip If a register size is given, write exactly that many bits: missing leading zeros can cost a mark.A1.2-004 Tap to flip back
4 / 51
A1.2.1 Process Convert the hexadecimal number 3C7 to decimal. A1.2-005 Tap to flip A1.2.1 Process Convert the hexadecimal number 3C7 to decimal. Multiply each digit by its place value (powers of 16) and add:3 × 256 = 768 C (12) × 16 = 192 7 × 1 = 7 768 + 192 + 7 = 967 Exam tip Turn letters into numbers first (C = 12). Show the working: [2] questions often give a method mark.A1.2-005 Tap to flip back
5 / 51
A1.2.1 Process Convert the decimal number 300 to hexadecimal. A1.2-006 Tap to flip A1.2.1 Process Convert the decimal number 300 to hexadecimal. Divide by 16 repeatedly and record the remainders:300 ÷ 16 = 18 r 12 (C ) 18 ÷ 16 = 1 r 2 1 ÷ 16 = 0 r 1 Read the remainders from the bottom up : 12C (check: 256 + 32 + 12 = 300). Exam tip A remainder from 10 to 15 must be written as one letter (A to F), never as two digits.A1.2-006 Tap to flip back
6 / 51
A1.2.1 Process Convert the binary number 1011011 to hexadecimal. A1.2-007 Tap to flip A1.2.1 Process Convert the binary number 1011011 to hexadecimal. Split into nibbles (groups of 4 bits) from the right : 101 | 1011. Pad the left group with zeros: 0101 | 1011.Convert each nibble: 0101 = 5, 1011 = B. Answer: 5B (both are 91 in decimal). Exam tip Always group from the right. Grouping from the left (1011 | 011) gives the wrong answer.A1.2-007 Tap to flip back
7 / 51
A1.2.1 Process Convert the hexadecimal number E4 to binary for an 8-bit register. A1.2-008 Tap to flip A1.2.1 Process Convert the hexadecimal number E4 to binary for an 8-bit register. Replace each hex digit with its 4-bit pattern and join them: E (14) = 1110 4 = 0100 Answer: 11100100 Exam tip Keep every nibble at four bits: writing 4 as 100 would give 1110100, a different number.A1.2-008 Tap to flip back
8 / 51
A1.2.1 Exam question [2 marks] Outline why hexadecimal is often used instead of binary when displaying values such as memory addresses. A1.2-009 Tap to flip A1.2.1 Exam question [2 marks] Outline why hexadecimal is often used instead of binary when displaying values such as memory addresses. Shorter : 16 = 2^4, so one hex digit represents 4 bits (a nibble) and a byte needs only two hex digits.Easier for people to read , remember and copy, so fewer errors than long strings of 0s and 1s.Converts directly to binary, nibble by nibble, unlike decimal.Common uses: colour codes (#FF8000), memory addresses and MAC addresses . Exam tip Hex is a shorthand for people: the computer still stores and processes the values in binary.A1.2-009 Tap to flip back
9 / 51
A1.2.2 Explain Why do computers represent all data in binary? A1.2-010 Tap to flip A1.2.2 Explain Why do computers represent all data in binary? Computers are built from transistors that act as switches with two states (on/off, high/low voltage). Two states map directly to 1 and 0 and are easy to tell apart reliably , even with electrical noise. Storage also uses two states, such as magnetic polarity or a charged or uncharged flash cell. Exam tip Every data type ends up as bits; only the encoding rule changes.A1.2-010 Tap to flip back
10 / 51
A1.2.2 Definition What are a bit, a nibble and a byte? A1.2-011 Tap to flip A1.2.2 Definition What are a bit, a nibble and a byte? Bit : one binary digit (0 or 1), the smallest unit of data.Nibble : 4 bits (one hex digit).Byte : 8 bits .Larger units (KB, MB, GB, TB) each step up by 1024 (2^10), often rounded to 1000. Exam tip One byte = two nibbles = exactly two hex digits.A1.2-011 Tap to flip back
11 / 51
A1.2.2 Definition What is an unsigned integer, and what range of values can it hold in n bits? A1.2-012 Tap to flip A1.2.2 Definition What is an unsigned integer, and what range of values can it hold in n bits? A whole number of zero or more , stored as a fixed-length binary number that uses every bit for its value. n bits give 2^n values, from 0 to 2^n − 1 (10 bits: 1024 values, 0 to 1023). Exam tip Every integer of one type gets the same number of bits, padded with leading zeros. A value above 2^n − 1 overflows.A1.2-012 Tap to flip back
12 / 51
A1.2.2 Process How is a negative integer stored using two's complement? A1.2-013 Tap to flip A1.2.2 Process How is a negative integer stored using two's complement? The most significant bit has a negative place value (-8 in 4 bits, -128 in 8 bits), so a leading 1 means negative. To store -5 in 4 bits: write +5 (0101), invert every bit (1010), then add 1 : 1011 . n bits hold -2^(n-1) to 2^(n-1) - 1 (4 bits: -8 to 7). Exam tip Check by adding place values: 1011 = -8 + 2 + 1 = -5. 1000 is -8, not 8.A1.2-013 Tap to flip back
13 / 51
A1.2.2 Definition What is a character set, and how does it let a computer store text? A1.2-014 Tap to flip A1.2.2 Definition What is a character set, and how does it let a computer store text? An agreed mapping that gives every character a unique binary code : 'A' is 65 (01000001) in ASCII. A string is stored as the sequence of its characters' codes , one after another, so 'Hi' is 72 then 105. Exam tip Upper and lower case have different codes: 'A' is 65 but 'a' is 97.A1.2-014 Tap to flip back
14 / 51
A1.2.2 Compare Compare ASCII and Unicode as character sets. A1.2-015 Tap to flip A1.2.2 Compare Compare ASCII and Unicode as character sets. Size : ASCII is a 7-bit code with 128 characters (extended ASCII: 8 bits, 256), whereas Unicode has over a million possible codes.Coverage : ASCII holds only English letters, digits, punctuation and control codes, whereas Unicode covers all writing systems , symbols and emoji.Storage : ASCII fits one byte per character, whereas Unicode often needs more (UTF-8 uses 1 to 4 bytes ).Similarity : Unicode's first 128 codes match ASCII .Exam tip Asked how many bits ASCII uses? Say 7 (128 characters), usually stored in a byte, and mention 8-bit extended ASCII.A1.2-015 Tap to flip back
15 / 51
A1.2.2 Exam question [3 marks] Explain why a chat app used in many countries stores text in Unicode rather than ASCII. A1.2-016 Tap to flip A1.2.2 Exam question [3 marks] Explain why a chat app used in many countries stores text in Unicode rather than ASCII. ASCII has only 128 codes (256 extended), enough for English letters, digits and punctuation. Chinese and Japanese need thousands of characters , which cannot fit in one byte ; scripts such as Arabic are not in ASCII at all. Unicode gives every character in every writing system , including emoji, a unique code , using more bits per character . It is one agreed standard , so a message displays the same on every device . Exam tip Tie every point to the scenario: many languages, many scripts, many different devices.A1.2-016 Tap to flip back
16 / 51
A1.2.2 Definition What is colour depth in a bitmap image? A1.2-017 Tap to flip A1.2.2 Definition What is colour depth in a bitmap image? The number of bits used to store the colour of each pixel . n bits give 2^n colours . In 24-bit RGB, 8 bits each store the red, green and blue intensity, giving 2^24 = 16,777,216 colours. Exam tip Pure blue in 24-bit RGB is 00000000 00000000 11111111: no red, no green, full blue.A1.2-017 Tap to flip back
17 / 51
A1.2.2 Compare How does resolution differ from colour depth, and how does each affect an image's file size? A1.2-018 Tap to flip A1.2.2 Compare How does resolution differ from colour depth, and how does each affect an image's file size? Resolution is the number of pixels (width × height): more pixels show more detail .Colour depth is the bits per pixel : more bits allow more colours .Raising either one increases file size : uncompressed size in bits = width × height × colour depth . A header also stores the width, height and colour depth so the pixel bits can be decoded. Exam tip Classic mix-up: resolution is how many pixels; colour depth is how many bits each pixel uses.A1.2-018 Tap to flip back
18 / 51
A1.2.2 Apply it An uncompressed 800 × 600 pixel image uses 24-bit colour. What is its file size in bytes? A1.2-019 Tap to flip A1.2.2 Apply it An uncompressed 800 × 600 pixel image uses 24-bit colour. What is its file size in bytes? Pixels: 800 × 600 = 480,000 Bits: 480,000 × 24 = 11,520,000 Bytes: 11,520,000 ÷ 8 = 1,440,000 bytes (about 1.4 MB) Shortcut: 24 bits = 3 bytes, so 480,000 × 3. Exam tip Divide by 8 to turn bits into bytes: forgetting this is the most common slip in size calculations.A1.2-019 Tap to flip back
19 / 51
A1.2.2 Process How is an analogue sound wave converted into binary data? A1.2-020 Tap to flip A1.2.2 Process How is an analogue sound wave converted into binary data? Sampling : the wave's amplitude is measured at regular intervals .The sampling rate (Hz) is the number of samples per second, e.g. 44,100 for CD audio. Quantisation : each sample is rounded to the nearest available level.The bit depth sets how many levels exist (16 bits = 65,536); each sample is stored in that many bits. Samples are stored in order for each channel. Exam tip Sampling rate is how often you measure; bit depth is how precisely you measure each sample.A1.2-020 Tap to flip back
20 / 51
A1.2.2 Exam question [4 marks] Explain how increasing the sampling rate and the bit depth affects a digital audio recording. A1.2-021 Tap to flip A1.2.2 Exam question [4 marks] Explain how increasing the sampling rate and the bit depth affects a digital audio recording. Higher sampling rate : amplitude is measured more often , so the stored wave is closer to the original and higher frequencies are captured. Higher bit depth : more amplitude levels , so each sample is more precise (less rounding error). Both increase file size , because size = sampling rate × bit depth × channels × seconds. So quality improves but more storage and bandwidth are needed; beyond human hearing the gain is small. Exam tip A higher sampling rate does not make sound louder. Good answers cover both quality and file size.A1.2-021 Tap to flip back
21 / 51
A1.2.2 Explain How is a video stored in binary? A1.2-022 Tap to flip A1.2.2 Explain How is a video stored in binary? As a sequence of frames , each a still bitmap image of pixels. The frame rate (frames per second, fps) sets how many frames play each second. A sampled audio track is stored alongside and kept in sync with the frames. Size grows with resolution × colour depth × frame rate × duration, so video is usually compressed by a codec. Exam tip One second of uncompressed 1920 × 1080, 24-bit video at 30 fps is about 187 million bytes.A1.2-022 Tap to flip back
22 / 51
A1.2.2 Explain Explain the impact of binary encoding on how data is stored and retrieved. A1.2-023 Tap to flip A1.2.2 Explain Explain the impact of binary encoding on how data is stored and retrieved. Storage : each extra bit doubles the number of values (more range, colours or sound levels) but makes every item take more space , so designers trade quality against size.Retrieval : the same bit pattern can mean different things : 01000001 is the integer 65 or the character 'A'.So the data type, file format or header must say how to interpret the bits; the wrong encoding gives garbled output. Exam tip Strange symbols in a document usually mean the bytes are fine but were read with the wrong encoding.A1.2-023 Tap to flip back
23 / 51
A1.2.3 Definition What is a logic gate? A1.2-024 Tap to flip A1.2.3 Definition What is a logic gate? An electronic component, built from transistors , that applies a Boolean operation to one or more binary inputs and gives a single binary output . Exam tip 1 means true or on (high voltage); 0 means false or off (low voltage).A1.2-024 Tap to flip back
24 / 51
A1.2.3 Definition State the output rule for the AND, OR and NOT gates. A1.2-025 Tap to flip A1.2.3 Definition State the output rule for the AND, OR and NOT gates. AND : outputs 1 only when all inputs are 1 .OR : outputs 1 when at least one input is 1 .NOT (inverter): takes one input and outputs the opposite value.Exam tip Memory hook: AND asks 'are all inputs on?', OR asks 'is any input on?'A1.2-025 Tap to flip back
25 / 51
A1.2.3 Compare How does a NAND gate differ from a NOR gate? A1.2-026 Tap to flip A1.2.3 Compare How does a NAND gate differ from a NOR gate? NAND (NOT AND): output is 0 only when all inputs are 1 ; otherwise 1.NOR (NOT OR): output is 1 only when all inputs are 0 ; otherwise 0.Two-input rows 00, 01, 10, 11: NAND gives 1, 1, 1, 0; NOR gives 1, 0, 0, 0. Exam tip Examiners have rejected 'the opposite of OR' for NOR: state the exact output condition or give the truth table.A1.2-026 Tap to flip back
26 / 51
A1.2.3 Compare How does an XOR gate differ from an XNOR gate? A1.2-027 Tap to flip A1.2.3 Compare How does an XOR gate differ from an XNOR gate? XOR (exclusive OR): output 1 when the inputs are different .XNOR (equivalence): output 1 when the inputs are the same ; it is XOR with the output inverted .Rows 00, 01, 10, 11: XOR gives 0, 1, 1, 0; XNOR gives 1, 0, 0, 1. Exam tip XOR is not OR: with both inputs at 1, OR outputs 1 but XOR outputs 0.A1.2-027 Tap to flip back
27 / 51
A1.2.3 Explain What role do logic gates play in binary computing? A1.2-028 Tap to flip A1.2.3 Explain What role do logic gates play in binary computing? Gates are the building blocks of all digital circuits . Each turns 0/1 input signals into a 0/1 output by a fixed rule, and combinations of gates let hardware make decisions , do arithmetic and store bits . Everything a processor does comes down to huge numbers of gate operations. Exam tip Linking idea: an IF statement with AND/OR conditions is ultimately evaluated by gates inside the CPU.A1.2-028 Tap to flip back
28 / 51
A1.2.3 Apply it A staircase light has a switch at the top (A) and the bottom (B). Flipping either switch must change the light. Which gate fits? A1.2-029 Tap to flip A1.2.3 Apply it A staircase light has a switch at the top (A) and the bottom (B). Flipping either switch must change the light. Which gate fits? XOR : light = A XOR B. It is on when the switches are in different positions (01 or 10) and off when they match (00 or 11). Flipping either single switch changes whether they differ, so it toggles the light.Exam tip Spot XOR in wording such as 'one or the other but not both' or 'when the inputs differ'.A1.2-029 Tap to flip back
29 / 51
A1.2.3 Exam question [3 marks] Describe three applications of logic gates in computer systems. A1.2-030 Tap to flip A1.2.3 Exam question [3 marks] Describe three applications of logic gates in computer systems. Adders in the ALU : XOR and AND gates form half and full adders that add binary numbers .Memory : gates form flip-flops , each storing one bit ; these make up registers and cache.Control and decisions : gates in the control unit decode instructions and compare values to choose what happens next.Control systems : alarms and automatic doors combine sensor signals with gates.Exam tip Name the circuit and its job ('adders add binary numbers in the ALU'), not just 'used in the CPU'.A1.2-030 Tap to flip back
30 / 51
A1.2.4 Definition What is a truth table, and how many rows does it need for n inputs? A1.2-031 Tap to flip A1.2.4 Definition What is a truth table, and how many rows does it need for n inputs? A table listing every possible combination of inputs with the resulting output of a gate, circuit or expression. n inputs need 2^n rows (3 inputs = 8), listed in binary counting order from 000 to 111. Exam tip 2^n counts input combinations (rows), not possible outputs.A1.2-031 Tap to flip back
31 / 51
A1.2.4 Definition In Boolean notation, what do A.B, A + B and Ā mean, and in what order are operators evaluated? A1.2-032 Tap to flip A1.2.4 Definition In Boolean notation, what do A.B, A + B and Ā mean, and in what order are operators evaluated? A.B = A AND BA + B = A OR BĀ (bar over A) = NOT A; A ⊕ B = A XOR BOrder of evaluation: brackets, then NOT, then AND, then OR Exam tip A OR B AND C means A OR (B AND C). Working strictly left to right loses truth-table rows.A1.2-032 Tap to flip back
32 / 51
A1.2.4 Apply it Buzzer Z sounds when engine E is on and either seatbelt S is unfastened or door D is open. When is Z = 1? A1.2-033 Tap to flip A1.2.4 Apply it Buzzer Z sounds when engine E is on and either seatbelt S is unfastened or door D is open. When is Z = 1? Z = E AND (S OR D) : the brackets matter.Taking 1 to mean 'condition true' for each input, Z = 1 for inputs (E, S, D) = 101, 110 and 111 ; the other five rows give 0. Exam tip First fix what 1 means for each input. If S = 1 meant 'belt fastened', you would need NOT S.A1.2-033 Tap to flip back
33 / 51
A1.2.4 Apply it Inputs A and B feed a NAND gate and an OR gate, whose outputs feed an AND gate. Which single gate is equivalent? A1.2-034 Tap to flip A1.2.4 Apply it Inputs A and B feed a NAND gate and an OR gate, whose outputs feed an AND gate. Which single gate is equivalent? Truth table, rows AB → (NAND, OR) → output: 00 → (1, 0) → 0 01 → (1, 1) → 1 10 → (1, 1) → 1 11 → (0, 1) → 0 Outputs 0, 1, 1, 0 match XOR in every row , so the circuit is equivalent to one XOR gate . Exam tip Circuits are equivalent only if outputs match for every input combination. One different row proves they are not.A1.2-034 Tap to flip back
34 / 51
A1.2.4 Process How do you write a Boolean expression from a truth table? A1.2-035 Tap to flip A1.2.4 Process How do you write a Boolean expression from a truth table? Find every row where the output is 1 . For each, AND the inputs together, using NOT for any input that is 0. OR these terms together (a sum of products ).Example: 1s at AB = 01 and 10 give (NOT A AND B) OR (A AND NOT B), which is A XOR B . Exam tip The sum of products is correct but rarely the simplest: simplify it with Boolean laws or a K-map.A1.2-035 Tap to flip back
35 / 51
A1.2.4 Exam question [4 marks] Construct a truth table for X = (A AND NOT B) OR (B XOR C). A1.2-036 Tap to flip A1.2.4 Exam question [4 marks] Construct a truth table for X = (A AND NOT B) OR (B XOR C). Inputs ABC in binary order, [1] per two correct rows: 000 → 0, 001 → 1 010 → 1, 011 → 0 100 → 1, 101 → 1 110 → 1, 111 → 0 Working columns: A AND NOT B is 1 only for 100 and 101; B XOR C is 1 for 001, 010, 101 and 110. Exam tip Add a column for each bracket. If the final column is wrong, correct working columns can still earn marks.A1.2-036 Tap to flip back
36 / 51
A1.2.4 Definition What is a Karnaugh map (K-map)? A1.2-037 Tap to flip A1.2.4 Definition What is a Karnaugh map (K-map)? A grid version of a truth table , with one cell per input combination, arranged so that adjacent 1s can be grouped to find a simpler expression . Sizes: 2 inputs 2 × 2, 3 inputs 2 × 4, 4 inputs 4 × 4. Exam tip K-maps and Boolean simplification are core content at both SL and HL.A1.2-037 Tap to flip back
37 / 51
A1.2.4 Definition What is Gray code, and why are Karnaugh map rows and columns labelled with it? A1.2-038 Tap to flip A1.2.4 Definition What is Gray code, and why are Karnaugh map rows and columns labelled with it? An ordering in which each value differs from the next by only one bit : 00, 01, 11, 10 . On a K-map it makes neighbouring cells differ in one variable (including across the edges), so grouping them removes that variable. Exam tip Never label K-map columns 00, 01, 10, 11: that is binary order, and your groups would be wrong.A1.2-038 Tap to flip back
38 / 51
A1.2.4 Process What are the rules for grouping 1s on a Karnaugh map and reading off the simplified expression? A1.2-039 Tap to flip A1.2.4 Process What are the rules for grouping 1s on a Karnaugh map and reading off the simplified expression? Group only 1s , in rectangles of 1, 2, 4 or 8 cells (no diagonals). Make groups as large as possible and use as few as possible. Groups may overlap and wrap around the edges. Every 1 must be in at least one group.In each group, keep variables that stay the same and drop those that change; each group is an AND term, and the terms are ORed. Exam tip The four corners of a 4 × 4 map are all neighbours, so they can form one group.A1.2-039 Tap to flip back
39 / 51
A1.2.4 Apply it Use a Karnaugh map to simplify the expression that outputs 1 only for inputs ABC = 000, 010, 100, 101 and 110. A1.2-040 Tap to flip A1.2.4 Apply it Use a Karnaugh map to simplify the expression that outputs 1 only for inputs ABC = 000, 010, 100, 101 and 110. Columns BC = 00, 01, 11, 10. Row A=0: 1, 0, 0, 1. Row A=1: 1, 1, 0, 1. Quad : columns 00 and 10 in both rows (wrap-around ); only C = 0 stays fixed → NOT C .Pair : A=1 at BC = 00 and 01; A = 1 and B = 0 stay fixed → A AND NOT B .Result: NOT C OR (A AND NOT B) Exam tip The left and right columns are neighbours (00 and 10 differ by one bit), so groups can wrap around.A1.2-040 Tap to flip back
40 / 51
A1.2.4 Apply it Simplify (A AND B) OR (A AND NOT B) using Boolean algebra. A1.2-041 Tap to flip A1.2.4 Apply it Simplify (A AND B) OR (A AND NOT B) using Boolean algebra. Distributive law: = A AND (B OR NOT B)Complement law: B OR NOT B = 1, so = A AND 1Identity law: A AND 1 = A The output never depends on B, so a plain wire from A replaces four gates. Exam tip Write one law per line, then check the result with a truth table: both output columns must match in every row.A1.2-041 Tap to flip back
41 / 51
A1.2.5 Definition What is a logic diagram? A1.2-042 Tap to flip A1.2.5 Definition What is a logic diagram? A drawing that uses standard gate symbols joined by lines to show how gates are connected in a circuit. Labelled inputs enter on the left , signals flow left to right , and the labelled output leaves on the right. Exam tip Label every input and the output, and use a dot where one wire branches to two gates.A1.2-042 Tap to flip back
42 / 51
A1.2.5 Compare How are the standard symbols for the seven logic gates drawn and told apart? A1.2-043 Tap to flip A1.2.5 Compare How are the standard symbols for the seven logic gates drawn and told apart? AND : 'D' shape with a flat back .OR : curved back and pointed front .NOT : triangle with a small circle (bubble) at the output.XOR : OR shape with an extra curved line across the inputs.NAND, NOR, XNOR : the AND, OR and XOR shapes with an output bubble .Exam tip A bubble always means 'then invert'. Draw flat and curved backs clearly so AND and OR cannot be confused.A1.2-043 Tap to flip back
43 / 51
A1.2.5 Apply it A circuit sends A OR B and NOT C into a NAND gate. What is the output when A = 0, B = 1 and C = 0? A1.2-044 Tap to flip A1.2.5 Apply it A circuit sends A OR B and NOT C into a NAND gate. What is the output when A = 0, B = 1 and C = 0? Trace left to right , writing the value on each wire: OR gate: 0 OR 1 = 1 NOT gate: NOT 0 = 1 NAND gate: inputs 1 and 1 → 0 Output = 0 , because NAND gives 0 only when all its inputs are 1. Exam tip Never jump straight to the output: label each intermediate wire with its value first.A1.2-044 Tap to flip back
44 / 51
A1.2.5 Apply it Heater H runs when cold (T = 1) unless a window is open (W = 1) or the system is off (S = 1). Design the circuit. A1.2-045 Tap to flip A1.2.5 Apply it Heater H runs when cold (T = 1) unless a window is open (W = 1) or the system is off (S = 1). Design the circuit. H = T AND NOT (W OR S) , which is T AND (W NOR S) .Circuit: a NOR gate with inputs W and S; an AND gate with inputs T and the NOR output, giving H. Equivalent by De Morgan: T AND NOT W AND NOT S (two NOT gates feeding the AND). Exam tip 'Unless' usually means AND NOT. Always check what 1 means for each input before choosing gates.A1.2-045 Tap to flip back
45 / 51
A1.2.5 Exam question [4 marks] Construct a logic diagram for Z = (A NOR B) OR (B AND NOT C). A1.2-046 Tap to flip A1.2.5 Exam question [4 marks] Construct a logic diagram for Z = (A NOR B) OR (B AND NOT C). [1] per correct gate with the correct inputs: NOR gate with inputs A and B .NOT gate on input C .AND gate with inputs B and NOT C (B branches to two gates).OR gate fed by the NOR and AND outputs, giving Z .Label A, B and C on the left and Z on the right. Exam tip Work inside out: one gate per bracket first, then the gate that joins them. Use standard symbols only.A1.2-046 Tap to flip back
46 / 51
A1.2.5 Explain How does a half adder use logic gates to add two bits? A1.2-047 Tap to flip A1.2.5 Explain How does a half adder use logic gates to add two bits? Inputs A and B , two outputs: Sum = A XOR B (1 when exactly one input is 1)Carry = A AND B (1 only when both are 1)So 1 + 1 gives Sum 0, Carry 1 (binary 10). Full adders, which also take a carry in, are chained to add whole binary numbers in the ALU . Exam tip A half subtractor is similar: Difference = X XOR Y, Borrow = (NOT X) AND Y.A1.2-047 Tap to flip back
47 / 51
A1.2.5 Definition State the commutative, idempotent and involution laws of Boolean algebra. A1.2-048 Tap to flip A1.2.5 Definition State the commutative, idempotent and involution laws of Boolean algebra. Commutative : order is irrelevant: A AND B = B AND A; A OR B = B OR A.Idempotent : combining a variable with itself changes nothing: A AND A = A; A OR A = A.Involution : double negation cancels: NOT (NOT A) = A.Exam tip Associative law too: brackets can move when the operators match, so (A AND B) AND C = A AND (B AND C).A1.2-048 Tap to flip back
48 / 51
A1.2.5 Definition State De Morgan's laws. A1.2-049 Tap to flip A1.2.5 Definition State De Morgan's laws. NOT (A AND B) = NOT A OR NOT B NOT (A OR B) = NOT A AND NOT B So NAND equals OR with both inputs inverted; NOR equals AND with both inputs inverted. Exam tip Memory hook: break the bar, change the sign. Split the NOT over each variable and swap AND with OR.A1.2-049 Tap to flip back
49 / 51
A1.2.5 Definition State the identity, null, complement and absorption laws of Boolean algebra. A1.2-050 Tap to flip A1.2.5 Definition State the identity, null, complement and absorption laws of Boolean algebra. Identity : A AND 1 = A; A OR 0 = ANull : A AND 0 = 0; A OR 1 = 1Complement : A AND NOT A = 0; A OR NOT A = 1Absorption : A OR (A AND B) = AExam tip Absorption also works the other way round: A AND (A OR B) = A. The null law is also called annulment.A1.2-050 Tap to flip back
50 / 51
A1.2.5 Apply it Simplify NOT (NOT A OR NOT B) OR (B AND A), naming the Boolean law used at each step. A1.2-051 Tap to flip A1.2.5 Apply it Simplify NOT (NOT A OR NOT B) OR (B AND A), naming the Boolean law used at each step. De Morgan : NOT (NOT A OR NOT B) = NOT NOT A AND NOT NOT BInvolution : = A AND BCommutative : B AND A = A AND B, so the expression is (A AND B) OR (A AND B)Idempotent : = A AND B One AND gate replaces a six-gate circuit. Exam tip Simpler circuits need fewer gates, so they are cheaper, faster and use less power. Check your answer with a truth table.A1.2-051 Tap to flip back
51 / 51
Tip: click the card, then use the arrow keys to flip and move through the deck.
A1.3 Operating systems and control systems SL cards cover the functions of an operating system, compare first-come first-served, round robin, multilevel queue and priority scheduling, and weigh polling against interrupts for devices such as a remote fire sensor. HL cards move on to multitasking, resource contention and deadlock, then control systems: sensors, actuators, transducers and feedback in thermostats, cruise control, lifts and traffic lights. The deck has 58 cards, 23 of them HL.
Read the full A1.3 revision guide for a worked scheduling example.
A1.3 Operating systems and control systems 58 cards · 23 HL
A1.3.1 Definition What is an operating system (OS)? A1.3-001 Tap to flip A1.3.1 Definition What is an operating system (OS)? System software that manages the computer's hardware and software resources and provides services to programs and users. It is the intermediary between applications/users and the hardware , e.g. Windows, macOS, Linux, Android.Exam tip Do not reduce the OS to its user interface: the GUI is only one of many OS functions.A1.3-001 Tap to flip back
1 / 58
A1.3.1 Definition What does it mean to say that an operating system abstracts the hardware? A1.3-002 Tap to flip A1.3.1 Definition What does it mean to say that an operating system abstracts the hardware? The OS hides hardware complexity behind a simpler interface . Applications request services (e.g. 'save this file') through system calls , and the OS and its device drivers handle the hardware detail, so programs and users never control hardware directly. Exam tip Add an example for the second mark: a drive letter or folder icon stands for sectors on a physical disk.A1.3-002 Tap to flip back
2 / 58
A1.3.1 Explain Why is it useful for an operating system to abstract the hardware, and what is the trade-off? A1.3-003 Tap to flip A1.3.1 Explain Why is it useful for an operating system to abstract the hardware, and what is the trade-off? Simpler programming : developers call OS services instead of writing device-level code.Portability : drivers absorb hardware differences, so one app runs on many machines.Protection : apps cannot reach the hardware directly, so they cannot interfere with each other or the OS.Consistency : users see the same interface whatever the hardware.Trade-off : the extra layer adds some overhead and limits fine control of the hardware.Exam tip Like a light switch: you control the lamp without knowing anything about the wiring or the power station.A1.3-003 Tap to flip back
3 / 58
A1.3.1 Exam question [4 marks] Describe the role of the operating system as an intermediary between application software and the hardware. [4] A1.3-004 Tap to flip A1.3.1 Exam question [4 marks] Describe the role of the operating system as an intermediary between application software and the hardware. [4] Applications request services (file access, printing, memory) through system calls , not by using hardware directly. The OS uses device drivers to turn requests into device-specific commands. It allocates resources (CPU time, memory, storage, I/O devices) to each program and settles conflicting requests , e.g. queuing print jobs. It protects programs and data from each other and from unauthorised access. It returns results or error messages to the application. Exam tip One mark per distinct point: name the mechanism (system call, driver, allocation) instead of repeating 'it manages the hardware'.A1.3-004 Tap to flip back
4 / 58
A1.3.2 Definition What does the file system management function of an operating system do? A1.3-005 Tap to flip A1.3.2 Definition What does the file system management function of an operating system do? Controls how data is stored on and retrieved from secondary storage : organising files in a hierarchy of directories (folders) , applying naming rules, allocating disk space and tracking free space , and enforcing permissions (read, write, execute). Exam tip Examples: NTFS (Windows), APFS (macOS), ext4 (Linux). A file allocation table belongs to file management, not memory management.A1.3-005 Tap to flip back
5 / 58
A1.3.2 Definition What is the device management function of an operating system? A1.3-006 Tap to flip A1.3.2 Definition What is the device management function of an operating system? Controlling peripherals through device drivers : software that translates the OS's general commands into the signals a specific device understands . The OS also decides which process may use a device and for how long , and handles device interrupts and errors . Exam tip No driver, no device: a new printer will not work until the OS has its driver installed.A1.3-006 Tap to flip back
6 / 58
A1.3.2 Definition What is scheduling as a function of the operating system? A1.3-007 Tap to flip A1.3.2 Definition What is scheduling as a function of the operating system? Deciding which process gets the CPU, when, and for how long , by choosing among the processes waiting in the ready queue , so that CPU time is shared out to keep the system responsive, efficient and fair . Exam tip Each CPU core runs only one process at any instant; scheduling decides whose turn it is.A1.3-007 Tap to flip back
7 / 58
A1.3.2 Definition What does the security function of an operating system involve? A1.3-008 Tap to flip A1.3.2 Definition What does the security function of an operating system involve? Protecting the system and its data from unauthorised access or damage through user authentication (passwords, biometrics), access control and permissions , process and memory isolation , encryption of stored data, firewalls, security patches and audit logs . Exam tip Authentication checks who you are; authorisation (access control) decides what you are allowed to do. Keep them apart.A1.3-008 Tap to flip back
8 / 58
A1.3.2 Definition What does an operating system's accounting function track, and what is that data used for? A1.3-009 Tap to flip A1.3.2 Definition What does an operating system's accounting function track, and what is that data used for? The OS records the resources each user or process consumes (CPU time, memory, disk space, bandwidth), usually in logs. This data helps analyse performance , find heavy users or bottlenecks, bill for usage and audit suspicious activity. Exam tip Always link accounting to a purpose, such as billing cloud customers or spotting who is hogging the CPU. 'It keeps records' alone is too thin.A1.3-009 Tap to flip back
9 / 58
A1.3.2 Compare How does a graphical user interface (GUI) differ from a command-line interface (CLI) as a way of using the operating system? A1.3-010 Tap to flip A1.3.2 Compare How does a graphical user interface (GUI) differ from a command-line interface (CLI) as a way of using the operating system? A GUI uses windows, icons, menus and a pointer (WIMP) , plus buttons and dialogue boxes, operated by mouse, keyboard or touch, whereas a CLI needs typed commands . A GUI is easier for beginners because options are visible, whereas a CLI requires commands to be memorised. A CLI uses fewer resources and is faster to script for experts, whereas a GUI needs more memory and processing. Exam tip In both cases the OS turns the user's actions into system commands: the interface is just the front door.A1.3-010 Tap to flip back
10 / 58
A1.3.2 Explain What is virtualisation as an operating system function, and why do organisations use it? A1.3-011 Tap to flip A1.3.2 Explain What is virtualisation as an operating system function, and why do organisations use it? Creating virtual versions of hardware so one physical machine runs several virtual machines (VMs) , each with its own OS. A hypervisor shares the real CPU, memory and storage between them. Lower cost : fewer physical servers, less power and space.Isolation : a crash or breach in one VM does not affect the others.Flexibility : VMs are quick to create, copy or restore, e.g. for testing.Exam tip Drawback: if the physical server fails, every VM on it fails too.A1.3-011 Tap to flip back
11 / 58
A1.3.2 Definition What does the networking function of an operating system do? A1.3-012 Tap to flip A1.3.2 Definition What does the networking function of an operating system do? Manages communication with other devices: implements the protocol stack (e.g. TCP/IP), splits outgoing data into packets and reassembles incoming ones , drives the network interface card , configures IP addresses (static or DHCP) and manages connections and firewall rules. Exam tip Applications simply open a connection; the OS does the packet-level work. Abstraction again.A1.3-012 Tap to flip back
12 / 58
A1.3.2 Explain How does an operating system maintain system integrity while background operations, such as updates and services, are running? A1.3-013 Tap to flip A1.3.2 Explain How does an operating system maintain system integrity while background operations, such as updates and services, are running? Process isolation and memory protection : a background service cannot overwrite other processes or the OS.Kernel mode and user mode : only trusted OS code gets direct hardware access.Patch management with rollback : updates fix flaws, and a faulty update can be undone.Integrity checks (checksums, hashes, file-system checks) detect corrupted data.Monitoring and logging record errors and suspicious events.Exam tip System integrity means hardware, software and data keep working correctly, with no unauthorised or accidental changes.A1.3-013 Tap to flip back
13 / 58
A1.3.2 Exam question [4 marks] Several applications are open at once on a laptop. Describe how the operating system handles their memory. [4] A1.3-014 Tap to flip A1.3.2 Exam question [4 marks] Several applications are open at once on a laptop. Describe how the operating system handles their memory. [4] Allocates a block of memory to each process when it loads or requests more.Keeps track of which areas are in use and which are free.Gives each process its own protected address space , so it cannot read or overwrite another's data or the OS. Frees (deallocates) memory when a process ends, so it can be reused.When RAM is full, uses virtual memory : inactive pages move to secondary storage. Exam tip Vague answers such as 'it organises memory' score nothing. Use action verbs: allocate, track, protect, free, page.A1.3-014 Tap to flip back
14 / 58
A1.3.3 Explain What is the aim of a CPU scheduling algorithm, and which measures are used to judge one? A1.3-015 Tap to flip A1.3.3 Explain What is the aim of a CPU scheduling algorithm, and which measures are used to judge one? Aim: allocate CPU time among ready processes to optimise system performance . Throughput : processes completed per unit of time.Waiting and response time : how long processes wait for the CPU or a first response.Turnaround time : from arrival to completion.Fairness : every process gets a share, with no starvation .CPU utilisation and overhead : keep the CPU busy without wasting time on context switches.Exam tip No algorithm wins on every measure: better response time usually costs extra context switches.A1.3-015 Tap to flip back
15 / 58
A1.3.3 Compare What is the difference between preemptive and non-preemptive scheduling? A1.3-016 Tap to flip A1.3.3 Compare What is the difference between preemptive and non-preemptive scheduling? Preemptive : the scheduler can interrupt a running process (when its time slice ends or a higher-priority process arrives) and give the CPU to another, e.g. round robin.Non-preemptive : a process keeps the CPU until it finishes or blocks (e.g. waits for I/O), e.g. first-come first-served.Preemption improves responsiveness but adds context-switch overhead . Exam tip Pre-empt means take the CPU away before the process has finished.A1.3-016 Tap to flip back
16 / 58
A1.3.3 Definition How does first-come, first-served (FCFS) scheduling work? A1.3-017 Tap to flip A1.3.3 Definition How does first-come, first-served (FCFS) scheduling work? Processes run in order of arrival , each until it finishes or blocks, before the next starts. It is non-preemptive : simple with little overhead, but short jobs stuck behind a long one wait a long time (the convoy effect ). Exam tip Convoy effect: cars stuck behind a slow tractor on a single-lane road.A1.3-017 Tap to flip back
17 / 58
A1.3.3 Apply it Under FCFS, jobs P1 (10 ms), P2 (2 ms) and P3 (1 ms) arrive together in that order. What is each job's waiting time? A1.3-018 Tap to flip A1.3.3 Apply it Under FCFS, jobs P1 (10 ms), P2 (2 ms) and P3 (1 ms) arrive together in that order. What is each job's waiting time? P1 waits 0 ms , P2 waits 10 ms , P3 waits 12 ms : an average of about 7.3 ms . The two short jobs spend far longer waiting than running: the convoy effect . Running the shortest first (P3, P2, P1) would cut the average wait to about 1.3 ms , but FCFS ignores job length. Exam tip Waiting time = start time minus arrival time. Scheduling answers must refer to the specific processes given.A1.3-018 Tap to flip back
18 / 58
A1.3.3 Definition How does round robin scheduling work? A1.3-019 Tap to flip A1.3.3 Definition How does round robin scheduling work? Each ready process gets the CPU for a fixed time slice (quantum) in turn. If unfinished when the quantum expires, it is preempted and sent to the back of the ready queue ; the scheduler keeps cycling until all processes finish. Exam tip Older exam papers call this 'time slicing': same idea, same credit.A1.3-019 Tap to flip back
19 / 58
A1.3.3 Explain What are the strengths of round robin scheduling, and why does the length of its quantum matter? A1.3-020 Tap to flip A1.3.3 Explain What are the strengths of round robin scheduling, and why does the length of its quantum matter? Strengths: every process gets an equal share in turn , so it is fair , has no starvation and gives good response times for interactive users. Quantum too short : very frequent context switches , so more CPU time is wasted saving and loading process states.Quantum too long : processes hold the CPU for long stretches, so it behaves like FCFS and responsiveness drops.Exam tip Round robin is the fairest, not the fastest: context switches add overhead and average turnaround can be longer.A1.3-020 Tap to flip back
20 / 58
A1.3.3 Definition How does multilevel queue scheduling work? A1.3-021 Tap to flip A1.3.3 Definition How does multilevel queue scheduling work? The ready queue is divided into separate queues , and each process is permanently assigned to one by type (e.g. system, interactive, background). Each queue uses its own algorithm , and queues are served in fixed priority order or by CPU-time shares. Exam tip Picture airport check-in: separate desks for crew, business and economy, each with its own queue.A1.3-021 Tap to flip back
21 / 58
A1.3.3 Apply it A laptop runs a video call, a word processor and a large background backup at once. Why would multilevel queue scheduling suit this mix? A1.3-022 Tap to flip A1.3.3 Apply it A laptop runs a video call, a word processor and a large background backup at once. Why would multilevel queue scheduling suit this mix? Processes go into separate queues by type : interactive (video call, word processor) and background (backup). The interactive queue gets higher priority and can use round robin , so both apps stay responsive. The background queue can use FCFS , since the backup only needs throughput. Risk: the backup could starve while interactive work keeps arriving, so the lower queue needs a guaranteed share of CPU time . Exam tip Another weakness: assignment is fixed, so a process cannot change queue even if its behaviour changes.A1.3-022 Tap to flip back
22 / 58
A1.3.3 Definition How does priority scheduling work? A1.3-023 Tap to flip A1.3.3 Definition How does priority scheduling work? Each process has a priority , and the CPU goes to the highest-priority ready process , so urgent tasks run first. In the preemptive form, a newly arrived higher-priority process interrupts the running one; in the non-preemptive form, it waits. Exam tip Real-time systems favour priority scheduling because time-critical tasks must never wait behind routine ones.A1.3-023 Tap to flip back
23 / 58
A1.3.3 Definition What is ageing in priority scheduling, and which problem does it solve? A1.3-024 Tap to flip A1.3.3 Definition What is ageing in priority scheduling, and which problem does it solve? Ageing gradually raises the priority of a process the longer it waits . It solves starvation : a low-priority process waiting indefinitely because higher-priority processes keep arriving and taking the CPU. Exam tip Starvation is one process endlessly overlooked; deadlock is processes blocking each other. Do not mix them up.A1.3-024 Tap to flip back
24 / 58
A1.3.3 Compare Compare FCFS, round robin, multilevel queue and priority scheduling on preemption, risk of starvation and overhead. A1.3-025 Tap to flip A1.3.3 Compare Compare FCFS, round robin, multilevel queue and priority scheduling on preemption, risk of starvation and overhead. FCFS : non-preemptive; no starvation, but the convoy effect; lowest overhead.Round robin : preemptive; no starvation; most context-switch overhead.Multilevel queue : depends on each queue's algorithm; lower queues can starve; complex to configure.Priority : preemptive or non-preemptive; low-priority processes can starve unless ageing is used; best for urgent, time-critical work.Exam tip In compare answers, name both approaches in every point: 'FCFS never preempts, whereas round robin preempts at each quantum'.A1.3-025 Tap to flip back
25 / 58
A1.3.3 Exam question [4 marks] Compare round robin and priority scheduling for an operating system serving many interactive users. [4] A1.3-026 Tap to flip A1.3.3 Exam question [4 marks] Compare round robin and priority scheduling for an operating system serving many interactive users. [4] Round robin gives every process an equal time slice in turn , whereas priority scheduling serves the most important process first . Round robin cannot starve a process, whereas priority scheduling can starve low-priority work unless ageing is used. Round robin gives every user a quick response , whereas priority responds fastest only to high-priority tasks. Both are usually preemptive , so both incur context-switch overhead .Exam tip One mark per two-sided point: 'whereas' keeps both algorithms in every sentence. Similarities count too.A1.3-026 Tap to flip back
26 / 58
A1.3.4 Definition What is polling? A1.3-027 Tap to flip A1.3.4 Definition What is polling? A technique in which the CPU repeatedly checks the status of each device at regular intervals , in a software loop, to find out whether it needs attention (e.g. has data ready). Exam tip In polling the CPU asks; the device never signals. Describing the device alerting the CPU earns no polling marks.A1.3-027 Tap to flip back
27 / 58
A1.3.4 Definition What is an interrupt, and what can generate one? A1.3-028 Tap to flip A1.3.4 Definition What is an interrupt, and what can generate one? A signal to the CPU that an event needs immediate attention , so the CPU suspends its current task to deal with it. It can come from hardware (a device needing service) or software (an OS service request or an error). Exam tip Interrupts are not only hardware: software raises them too, e.g. a division by zero or a request to the OS.A1.3-028 Tap to flip back
28 / 58
A1.3.4 Process What steps does the CPU follow to handle an interrupt? A1.3-029 Tap to flip A1.3.4 Process What steps does the CPU follow to handle an interrupt? An interrupt signal arrives; the CPU finishes its current instruction. It saves its state (program counter and registers) so the task can resume later. It identifies the interrupt and runs the matching interrupt service routine (ISR) ; higher-priority interrupts go first. The ISR deals with the event, e.g. reads the key pressed. The CPU restores the saved state and resumes the interrupted task. Exam tip Save, service, restore. Without the saved state, the CPU could not pick up where it left off.A1.3-029 Tap to flip back
29 / 58
A1.3.4 Compare How do polling and interrupts differ in CPU overhead, latency and timing? A1.3-030 Tap to flip A1.3.4 Compare How do polling and interrupts differ in CPU overhead, latency and timing? Overhead : polling wastes CPU cycles checking idle devices, whereas an interrupt uses CPU time only when an event occurs (plus a state save and restore).Latency : interrupts give a fast, controlled response , whereas polling's delay varies up to one polling interval .Timing : interrupts are asynchronous (any moment), whereas polling is synchronous (fixed intervals).Priority : interrupts can be prioritised; polling checks devices in a fixed order.Exam tip Neither is always better: the right choice depends on the device, how often events happen and the power supply.A1.3-030 Tap to flip back
30 / 58
A1.3.4 Compare How do event frequency and event predictability affect the choice between polling and interrupts? A1.3-031 Tap to flip A1.3.4 Compare How do event frequency and event predictability affect the choice between polling and interrupts? Rare or unpredictable events (a key press, an alarm): polling would waste almost every check, so interrupts are more efficient and respond as soon as the event happens.Very frequent or regular events (a sensor sampled at a fixed rate): most polls find data, while interrupting for every event adds save/restore overhead, so polling can be simpler and as efficient.Predictable timing lets polling check at just the right moments.Exam tip Argue from wasted checks versus per-event overhead. The slogan 'interrupts are always better' loses marks.A1.3-031 Tap to flip back
31 / 58
A1.3.4 Compare What security and reliability risks come with using interrupts, and with using polling? A1.3-032 Tap to flip A1.3.4 Compare What security and reliability risks come with using interrupts, and with using polling? Interrupts : a faulty or malicious device or program can flood the CPU with interrupts , keeping it busy servicing them: a denial-of-service attack.Polling : less exposed to flooding because the CPU decides when to check, but short-lived events between checks can be missed , so anomalies may go unnoticed.Device failure : polling notices a sensor that stops responding , whereas with interrupts a dead sensor stays silent unless a timeout is set.Exam tip Silence is only noticed if the CPU is actively asking: a strong point in sensor-network scenarios.A1.3-032 Tap to flip back
32 / 58
A1.3.4 Explain Why do keyboards, network cards and disk drives usually rely on interrupts? A1.3-033 Tap to flip A1.3.4 Explain Why do keyboards, network cards and disk drives usually rely on interrupts? Keyboard and mouse : input is unpredictable and users expect an instant response , so the CPU is interrupted when new input arrives rather than checking constantly.Network card : packets arrive at unpredictable times ; an interrupt on arrival keeps latency low.Disk I/O : disks are slow compared with the CPU , so the CPU does other work and is interrupted when the read or write completes .Exam tip Under very heavy traffic, network drivers may switch to polling, because interrupting for every packet costs more than checking.A1.3-033 Tap to flip back
33 / 58
A1.3.4 Apply it A battery-powered fire detector in a remote forest might sense smoke once a year. Should its embedded processor use polling or interrupts? Justify. A1.3-034 Tap to flip A1.3.4 Apply it A battery-powered fire detector in a remote forest might sense smoke once a year. Should its embedded processor use polling or interrupts? Justify. Interrupts. The event is rare and unpredictable , so polling would waste almost every check. On battery power , the processor can sleep in a low-power state until the smoke sensor's interrupt wakes it, greatly extending battery life. The response is immediate , which matters for a fire. Risk: a failed sensor stays silent, so add a periodic self-test or status report. Exam tip On mains power, energy matters far less, so the case against polling is weaker.A1.3-034 Tap to flip back
34 / 58
A1.3.4 Exam question [5 marks] A hospital monitor samples a pulse sensor many times a second and has an emergency button. Evaluate polling and interrupts for this device. [5] A1.3-035 Tap to flip A1.3.4 Exam question [5 marks] A hospital monitor samples a pulse sensor many times a second and has an emergency button. Evaluate polling and interrupts for this device. [5] Polling suits the pulse sensor : readings are frequent and regular , so most checks find data, avoiding per-event interrupt overhead.Polling also reveals a sensor that stops responding . An interrupt suits the button : presses are rare and unpredictable , so polling would waste checks.The interrupt gives a fast, controlled response , vital in real-time medical use, despite save/restore overhead. Judgement : poll the sensor and give the button a high-priority interrupt .Exam tip Evaluate needs a verdict. One-sided answers are capped, so weigh both methods and finish with a justified recommendation.A1.3-035 Tap to flip back
35 / 58
A1.3.5 Definition HL What is multitasking in an operating system? A1.3-036 Tap to flip A1.3.5 Definition HL What is multitasking in an operating system? The OS running several processes so that they appear to execute at the same time . On a single core it switches the CPU between processes very rapidly (context switching), giving each a short turn, so users notice no gaps. Exam tip On multi-core CPUs some processes truly run in parallel, but there are still far more processes than cores to switch between.A1.3-036 Tap to flip back
36 / 58
A1.3.5 Explain HL How does an operating system allocate memory, storage and devices among competing processes? A1.3-037 Tap to flip A1.3.5 Explain HL How does an operating system allocate memory, storage and devices among competing processes? Memory : each process gets its own address space; paging splits it into fixed-size pages held in RAM frames, and inactive pages move to disk (virtual memory ).Storage : the file system maps files onto disk blocks and controls access to them.Devices : drivers and queues grant a device to one process at a time, preventing conflicts.Quotas and limits : cap each process's usage so none can dominate.Exam tip Link each mechanism to a goal: fairness, efficiency or protection.A1.3-037 Tap to flip back
37 / 58
A1.3.5 Explain HL Why is task scheduling a challenge for an operating system managing many processes at once? A1.3-038 Tap to flip A1.3.5 Explain HL Why is task scheduling a challenge for an operating system managing many processes at once? It must balance fairness (every process gets CPU time) against efficiency and responsiveness (urgent or interactive tasks first). No single algorithm is best for every mix of processes, and the mix changes constantly.Preemption improves responsiveness, but every context switch wastes CPU time.Favouring some processes risks starving others, so strategies such as ageing are needed. Exam tip Show a trade-off rather than a list: shorter time slices improve response but raise overhead.A1.3-038 Tap to flip back
38 / 58
A1.3.5 Definition HL What is resource contention? A1.3-039 Tap to flip A1.3.5 Definition HL What is resource contention? When two or more processes need the same resource at the same time (e.g. a printer, a file or memory) but it cannot serve them all at once , so some must wait while the OS decides the order. Exam tip Contention causes waiting and, at worst, deadlock. For memory it can cause thrashing: constant swapping of pages between RAM and disk.A1.3-039 Tap to flip back
39 / 58
A1.3.5 Definition HL What is deadlock in an operating system? A1.3-040 Tap to flip A1.3.5 Definition HL What is deadlock in an operating system? Two or more processes each hold a resource while waiting for one held by another (a circular wait ), so none can ever proceed . E.g. A holds the printer and wants the scanner; B holds the scanner and wants the printer. Exam tip Like two cars meeting on a one-lane bridge: each waits for the other to reverse, so neither moves.A1.3-040 Tap to flip back
40 / 58
A1.3.5 Explain HL What strategies can an OS use to stop deadlock from happening, or to break one that has already formed? A1.3-041 Tap to flip A1.3.5 Explain HL What strategies can an OS use to stop deadlock from happening, or to break one that has already formed? Prevention : rules that stop a circular wait forming, e.g. a process requests all its resources at once , or resources are requested in a fixed order .Avoidance : check each request in advance and refuse or delay any that could lead to deadlock.Detection : track which process waits for which resource to spot a cycle.Recovery : terminate a process, or preempt a resource and reallocate it.Exam tip Recovery costs work, because a terminated process loses its progress. That is why prevention or avoidance is often preferred.A1.3-041 Tap to flip back
41 / 58
A1.3.5 Exam question [4 marks] HL Explain how an operating system lets several programs appear to run simultaneously on a single-core processor. [4] A1.3-042 Tap to flip A1.3.5 Exam question [4 marks] HL Explain how an operating system lets several programs appear to run simultaneously on a single-core processor. [4] The scheduler gives each process a short time slice , because a core runs only one process at a time. A timer interrupt ends each slice, so no program monopolises the CPU. In a context switch the OS saves the current process's state (registers, program counter) and loads the next one's, so each resumes where it stopped. Each program keeps a separate protected memory area . Fast switching makes programs seem simultaneous . Exam tip Explain means point plus reason: link each mechanism to why it creates the illusion of simultaneous running.A1.3-042 Tap to flip back
42 / 58
A1.3.6 Definition HL What is a control system, and which main components does it use? A1.3-043 Tap to flip A1.3.6 Definition HL What is a control system, and which main components does it use? A system of devices that monitors and regulates the behaviour of another device or process (e.g. temperature, speed, position), using sensors for input, a controller to decide and actuators to act, often with feedback to stay on target. Exam tip An operating system manages a computer; a control system manages part of the physical world.A1.3-043 Tap to flip back
43 / 58
A1.3.6 Process HL Describe the input, process and output stages of a control system. A1.3-044 Tap to flip A1.3.6 Process HL Describe the input, process and output stages of a control system. Input : the setpoint (desired value, e.g. 21 °C) and sensor readings of the current state.Process : the controller compares the reading with the setpoint to find the error , then applies the control algorithm to decide a response.Output : the controller signals actuators (motor, heater, valve) that change the physical system.In a closed loop, the new state is measured again and the cycle repeats. Exam tip Map it: sensor = input, controller = process, actuator = output, feedback = the loop.A1.3-044 Tap to flip back
44 / 58
A1.3.6 Definition HL In a control system, what is feedback and why does it matter? A1.3-045 Tap to flip A1.3.6 Definition HL In a control system, what is feedback and why does it matter? The output is measured by a sensor and fed back as input to the controller, which compares it with the setpoint and adjusts its next output to reduce the error, so the system self-corrects for disturbances like an open window. Exam tip Describing a timer that never checks the result earns no feedback marks: feedback means measuring the actual output.A1.3-045 Tap to flip back
45 / 58
A1.3.6 Compare HL Compare open-loop and closed-loop control systems. A1.3-046 Tap to flip A1.3.6 Compare HL Compare open-loop and closed-loop control systems. Open loop : follows a fixed sequence or timing with no feedback , so it cannot correct errors, e.g. a toaster that heats for a set time.Closed loop : sensors measure the output and feed it back, so the controller keeps adjusting towards the setpoint, e.g. a thermostat.Closed loop is more accurate and copes with disturbances, whereas open loop is simpler and cheaper . Exam tip Ask: does the system ever measure the result of its own action? If not, it is open loop.A1.3-046 Tap to flip back
46 / 58
A1.3.6 Apply it HL Classify each as open-loop or closed-loop: a fan on a timer, cruise control, a garden sprinkler on a fixed schedule, an oven holding 180 °C. A1.3-047 Tap to flip A1.3.6 Apply it HL Classify each as open-loop or closed-loop: a fan on a timer, cruise control, a garden sprinkler on a fixed schedule, an oven holding 180 °C. Fan on a timer : open loop, runs for a set time whatever the room temperature.Cruise control : closed loop, measures actual speed and adjusts the throttle.Sprinkler on a schedule : open loop, waters even if the soil is already wet.Oven holding 180 °C : closed loop, a temperature sensor switches the heater on and off.Exam tip The test is feedback, not automation: a fully automatic device can still be open loop.A1.3-047 Tap to flip back
47 / 58
A1.3.6 Compare HL What is the difference between a sensor and an actuator in a control system? A1.3-048 Tap to flip A1.3.6 Compare HL What is the difference between a sensor and an actuator in a control system? A sensor measures a physical quantity (temperature, light, pressure, speed) and converts it into a signal the controller can process: it is on the input side. An actuator receives a control signal from the controller and produces a physical action (a motor turns, a valve opens, a heater switches on): it is on the output side. E.g. a thermistor senses temperature; a motor opens a greenhouse vent. Exam tip Sensors sense, actuators act. Name the specific sensor type (e.g. infrared, pressure) to earn the extension mark.A1.3-048 Tap to flip back
48 / 58
A1.3.6 Definition HL What is a transducer, and how does it relate to sensors and actuators? A1.3-049 Tap to flip A1.3.6 Definition HL What is a transducer, and how does it relate to sensors and actuators? A device that converts energy or a signal from one form to another . Sensors use input transducers (physical quantity to electrical signal, e.g. a microphone); actuators use output transducers (electrical signal to motion or heat, e.g. a motor). Exam tip Older papers say 'output transducer' where the guide says 'actuator': both mean the device that acts on the world.A1.3-049 Tap to flip back
49 / 58
A1.3.6 Definition HL What is the role of the controller in a control system? A1.3-050 Tap to flip A1.3.6 Definition HL What is the role of the controller in a control system? The device, often a microcontroller or programmable logic controller (PLC) , that receives sensor data, compares it with the setpoint and runs the control algorithm to decide the output, then sends control signals to the actuators . Exam tip Older papers call it the microprocessor or processor; the job is the same: compare, decide, signal.A1.3-050 Tap to flip back
50 / 58
A1.3.6 Definition HL What is a control algorithm? A1.3-051 Tap to flip A1.3.6 Definition HL What is a control algorithm? The rules or formula the controller uses to decide its output from the setpoint and latest sensor reading, e.g. simple on/off logic (heater on below 20 °C) or PID control , responding to the size, history and trend of the error . Exam tip Error = setpoint minus measured value. The algorithm's job is to drive the error towards zero without overshooting.A1.3-051 Tap to flip back
51 / 58
A1.3.6 Exam question [5 marks] HL Describe how a car's cruise control system keeps the vehicle at the speed chosen by the driver. [5] A1.3-052 Tap to flip A1.3.6 Exam question [5 marks] HL Describe how a car's cruise control system keeps the vehicle at the speed chosen by the driver. [5] The driver sets the desired speed: the setpoint (input). A wheel-speed sensor measures the actual speed continuously and sends it to the controller . The controller compares actual and set speed to find the error . The control algorithm decides a correction and signals the throttle actuator to raise or cut engine power. The new speed is measured again (feedback ), so the loop repeats , correcting for hills or wind. Exam tip Cover every link: setpoint, sensor, compare, actuator, repeat. Leaving out the repeat loses the feedback mark.A1.3-052 Tap to flip back
52 / 58
A1.3.7 Explain HL Explain how a home thermostat uses closed-loop control to keep a room at a set temperature. A1.3-053 Tap to flip A1.3.7 Explain HL Explain how a home thermostat uses closed-loop control to keep a room at a set temperature. Sensor : a thermistor measures the room temperature regularly.Controller : compares each reading with the setpoint chosen by the user.Actuator : if the room is too cold, a relay switches the boiler on; once the setpoint is reached, it switches it off.Feedback : the new temperature is measured again, so the system self-corrects when a door opens or the weather changes.Exam tip A building management system scales this up: many sensors and one central controller, balancing comfort against energy cost.A1.3-053 Tap to flip back
53 / 58
A1.3.7 Explain HL How does an autonomous vehicle use sensors, a controller and actuators to drive itself? A1.3-054 Tap to flip A1.3.7 Explain HL How does an autonomous vehicle use sensors, a controller and actuators to drive itself? Sensors : LIDAR , radar, cameras and ultrasonic sensors detect lanes, vehicles, pedestrians and obstacles; GPS and motion sensors track the car's own position.Controller : onboard computers combine the sensor data and run algorithms (often AI) for path planning and obstacle avoidance .Actuators : electronic steering, throttle and brakes carry out the decisions.Feedback : results are sensed continuously, so the car keeps correcting its course and speed.Exam tip Safety is the key evaluation point: a sensor failure or misjudgement can cause harm, so designs use overlapping, redundant sensors.A1.3-054 Tap to flip back
54 / 58
A1.3.7 Apply it HL A junction's traffic lights change on a fixed timer. How would adding vehicle sensors change the control system, and what is the benefit? A1.3-055 Tap to flip A1.3.7 Apply it HL A junction's traffic lights change on a fixed timer. How would adding vehicle sensors change the control system, and what is the benefit? Fixed timer : open loop , the lights change on schedule whether or not cars are waiting.With sensors : inductive loops in the road or cameras detect queuing vehicles, and pedestrian buttons register crossings.The controller lengthens or shortens green phases to match demand and signals the lights (actuators): closed loop . Benefit : shorter waits, less congestion and fuel waste; linked junctions can be coordinated.Exam tip Fixed-cycle traffic lights are not credited as a feedback example; only lights that respond to sensed traffic are.A1.3-055 Tap to flip back
55 / 58
A1.3.7 Explain HL How does an automatic washing machine use sensors and feedback to control a wash cycle? A1.3-056 Tap to flip A1.3.7 Explain HL How does an automatic washing machine use sensors and feedback to control a wash cycle? A water-level sensor reports the level; the controller keeps the inlet valve open until the target is reached. A temperature sensor switches the heater on and off to hold the chosen wash temperature. A load or turbidity (dirt) sensor lets the controller adjust wash time, water and rinses. A vibration sensor detects an unbalanced drum, so the controller slows the drum motor . Exam tip A washing machine mixes both ideas: the programme order is fixed, but each step uses sensor feedback.A1.3-056 Tap to flip back
56 / 58
A1.3.7 Apply it HL Name a sensor and an actuator used in an automatic door, a home security system and an irrigation system. A1.3-057 Tap to flip A1.3.7 Apply it HL Name a sensor and an actuator used in an automatic door, a home security system and an irrigation system. Automatic door : infrared or microwave motion sensor ; an electric motor slides the door open, and a safety beam stops it closing on someone.Home security : PIR motion sensor or door/window contact; a siren , smart lock or alert to the owner.Irrigation : soil-moisture sensor ; a solenoid valve turns the water on or off, so plants are watered only when the soil is dry.Exam tip Mark schemes want the sensor type named, then what it does in context. 'A sensor' alone earns nothing.A1.3-057 Tap to flip back
57 / 58
A1.3.7 Exam question [4 marks] HL Explain how an automatic lift controller uses sensors and actuators to serve passengers safely and efficiently. [4] A1.3-058 Tap to flip A1.3.7 Exam question [4 marks] HL Explain how an automatic lift controller uses sensors and actuators to serve passengers safely and efficiently. [4] Call buttons on each floor and in the car send requests to the controller , whose algorithm assigns the best-placed car, cutting waiting time .Position sensors in the shaft report where the car is, so the controller slows the motor and stops level with the floor.A door sensor (infrared beam) detects someone in the doorway, so the door reopens , preventing injury. A load sensor stops an overloaded lift moving. Exam tip Explain means component plus purpose: say what the controller does with each reading, not just that a sensor exists.A1.3-058 Tap to flip back
58 / 58
Tip: click the card, then use the arrow keys to flip and move through the deck.
A1.4 Translation (HL only) This HL deck is built around one spec point with the command term evaluate: compilers against interpreters. You compare error detection, translation time, execution speed and portability, plus bytecode interpreters and just-in-time compilation. Scenario cards make you choose an approach for rapid prototyping, performance-critical code and cross-platform release, the three cases the guide insists on. All 22 cards are HL.
Read the full A1.4 revision guide for a side-by-side comparison of compilers and interpreters.
A1.4 Translation HL 22 cards
A1.4.1 Definition HL In programming, what is translation? A1.4-001 Tap to flip A1.4.1 Definition HL In programming, what is translation? Converting source code written in a high-level language into machine code (binary instructions) that the processor can execute. It is done by a compiler , an interpreter , or a mix of both (bytecode plus JIT). Exam tip Machine code belongs to one processor's instruction set (e.g. x86 or ARM). That fact is the root of every portability argument.A1.4-001 Tap to flip back
1 / 22
A1.4.1 Definition HL What is a compiler? A1.4-002 Tap to flip A1.4.1 Definition HL What is a compiler? A translator that converts the whole source program into machine code before it runs , producing an executable file . The executable can then be run many times without retranslating and without the compiler being present. Exam tip Memory hook: a compiler translates everything once, then runs; an interpreter translates as it goes, every single time.A1.4-002 Tap to flip back
2 / 22
A1.4.1 Definition HL What is an interpreter? A1.4-003 Tap to flip A1.4.1 Definition HL What is an interpreter? A translator that translates and executes source code one statement at a time while the program is running . It produces no executable file , so the source is translated again every time the program runs. Exam tip This is the classic (pure) interpreter. Python and other 'interpreted' languages usually compile to bytecode first, then interpret that.A1.4-003 Tap to flip back
3 / 22
A1.4.1 Definition HL What is bytecode? A1.4-004 Tap to flip A1.4.1 Definition HL What is bytecode? A compact, intermediate instruction set produced by compiling source code. It is platform-independent and not machine code , so a virtual machine (interpreter or JIT compiler) must execute it. Examples: Java .class files, Python .pyc files. Exam tip Classic slip: calling bytecode machine code. The CPU cannot run bytecode directly; the virtual machine does.A1.4-004 Tap to flip back
4 / 22
A1.4.1 Definition HL What is a bytecode interpreter? A1.4-005 Tap to flip A1.4.1 Definition HL What is a bytecode interpreter? A virtual machine that executes bytecode instruction by instruction on the host computer. The source is first compiled to bytecode , then the VM runs it, e.g. the Java Virtual Machine (JVM) or CPython 's Python Virtual Machine. Exam tip Two steps: compile once to bytecode, then interpret. That is why Python counts as 'interpreted' yet rejects a syntax error before any line runs.A1.4-005 Tap to flip back
5 / 22
A1.4.1 Definition HL What is just-in-time (JIT) compilation? A1.4-006 Tap to flip A1.4.1 Definition HL What is just-in-time (JIT) compilation? Translating bytecode (or source) into native machine code at run time , just before it is needed. Frequently executed (hot) code is compiled once and cached for reuse. Used by the JVM, .NET and modern JavaScript engines. Exam tip JIT is a hybrid: it keeps bytecode's portability but gets close to compiled speed for code that runs repeatedly.A1.4-006 Tap to flip back
6 / 22
A1.4.1 Process HL Describe the main stages a compiler goes through to turn source code into an executable. A1.4-007 Tap to flip A1.4.1 Process HL Describe the main stages a compiler goes through to turn source code into an executable. Lexical analysis : source split into tokens (keywords, identifiers, operators); whitespace and comments removed.Syntax analysis (parsing) : tokens checked against the grammar , building a parse tree .Semantic analysis : checks meaning, e.g. type mismatches , undeclared variables.Optimisation : code made faster or smaller without changing behaviour.Code generation : machine code for the target platform, linked with libraries into an executable.Exam tip The 2025 guide does not name these stages, but past mark schemes credited them (any two) as operations a compiler performs besides translating.A1.4-007 Tap to flip back
7 / 22
A1.4.1 Compare HL How does error detection differ between a compiler and an interpreter? A1.4-008 Tap to flip A1.4.1 Compare HL How does error detection differ between a compiler and an interpreter? A compiler checks the whole program before it runs and reports all the syntax errors it finds together ; no executable is produced until they are fixed. An interpreter finds an error only when it reaches that statement , then stops at the first error ; earlier statements have already run. So the interpreter gives instant feedback , but errors in code that never runs can go unnoticed . Exam tip Common slip: saying the compiler stops at the first error. It is the interpreter. Neither translator catches logic errors.A1.4-008 Tap to flip back
8 / 22
A1.4.1 Compare HL Compare compilers and interpreters in terms of translation time and execution speed. A1.4-009 Tap to flip A1.4.1 Compare HL Compare compilers and interpreters in terms of translation time and execution speed. Compiler : translates the whole program once, up front ; this can take a long time and must be repeated after every change .The executable then runs fast , with no translation at run time . Interpreter : no wait before the program starts, which suits quick edits and tests.But it translates during execution, on every run (and every pass of a loop), so the program runs more slowly . Exam tip Never write just 'compilers are faster'. Say which time: compiling takes longer up front, but compiled code runs faster.A1.4-009 Tap to flip back
9 / 22
A1.4.1 Explain HL Explain why interpreted source code is usually more portable than a compiled executable. A1.4-010 Tap to flip A1.4.1 Explain HL Explain why interpreted source code is usually more portable than a compiled executable. A compiled executable holds machine code for one processor architecture and operating system , so it will not run on other platforms . It must be recompiled and retested for each platform . Interpreted source runs on any platform with a suitable interpreter , because the interpreter handles the hardware differences. Trade-off: every user needs the interpreter installed , and the source code is shared , so it is easier to copy. Exam tip Write 'runs on any machine with the interpreter installed', not just 'runs anywhere'. Examiners want the condition.A1.4-010 Tap to flip back
10 / 22
A1.4.1 Compare HL Compare a bytecode interpreter with a pure interpreter that works directly from source code. A1.4-011 Tap to flip A1.4.1 Compare HL Compare a bytecode interpreter with a pure interpreter that works directly from source code. Translation time : the bytecode route compiles source once, up front ; a pure interpreter starts at once with no compile step .Speed : bytecode is compact and already parsed , so it executes faster than repeatedly analysing source.Errors : compiling to bytecode catches syntax errors before running ; a pure interpreter meets them only when it reaches the line.Portability : both are portable to any machine with the interpreter or VM.Exam tip Compare covers similarities too: shared portability is an easy mark that many students forget.A1.4-011 Tap to flip back
11 / 22
A1.4.1 Process HL Describe how a Java program written on a Windows laptop can run unchanged on a Mac and a Linux server. A1.4-012 Tap to flip A1.4.1 Process HL Describe how a Java program written on a Windows laptop can run unchanged on a Mac and a Linux server. The Java compiler translates the source once into bytecode (.class files). The same bytecode is distributed to every platform. Each platform has its own Java Virtual Machine (JVM) , built for that OS and processor. The JVM interprets the bytecode and JIT-compiles hot code into that machine's native machine code . Exam tip Only the JVM differs between platforms; the bytecode stays the same. Hence Java's slogan: write once, run anywhere.A1.4-012 Tap to flip back
12 / 22
A1.4.1 Explain HL Explain why JIT compilation can run code faster than a bytecode interpreter, and give one drawback. A1.4-013 Tap to flip A1.4.1 Explain HL Explain why JIT compilation can run code faster than a bytecode interpreter, and give one drawback. Hot code is compiled to native machine code once and cached , so a loop reuses it instead of being re-interpreted on every pass . The JIT can optimise using run-time information , such as the actual data types and the exact processor in use. Drawback: a warm-up delay while code is being compiled, plus extra memory for the JIT compiler and the cached code. Exam tip JIT pays off in long-running programs such as servers and IDEs; a short script may finish before the JIT helps.A1.4-013 Tap to flip back
13 / 22
A1.4.1 Compare HL Compare just-in-time (JIT) compilation with ahead-of-time compilation by a traditional compiler. A1.4-014 Tap to flip A1.4.1 Compare HL Compare just-in-time (JIT) compilation with ahead-of-time compilation by a traditional compiler. Translation time : ahead-of-time translates everything before release ; JIT translates during execution , adding start-up overhead .Speed : both run native machine code ; ahead-of-time is fast from the start, JIT approaches native speed once hot code is cached.Errors : an ahead-of-time compiler catches many errors before release ; JIT checks (e.g. bytecode verification) happen at run time .Portability : ahead-of-time needs one executable per platform ; JIT ships one bytecode file for every platform's VM.Exam tip For strict, predictable timing choose ahead-of-time; for portability with near-native speed choose bytecode plus JIT.A1.4-014 Tap to flip back
14 / 22
A1.4.1 Compare HL Compare the typical use-cases of compilers and interpreters, with a reason for each. A1.4-015 Tap to flip A1.4.1 Compare HL Compare the typical use-cases of compilers and interpreters, with a reason for each. Compilers suit software where execution speed matters: operating systems , device drivers, game engines , embedded systems .They also suit commercial products : users get an executable without needing the source code or a translator. Interpreters suit scripting and automation , prototyping , teaching and data-analysis or web scripts .These value a quick edit-and-run cycle and portability more than raw speed. Exam tip Always tie a use-case to its reason: execution speed, development time, portability or protecting the source.A1.4-015 Tap to flip back
15 / 22
A1.4.1 Explain HL Why might a developer use an interpreter while writing a program but a compiler when releasing it? A1.4-016 Tap to flip A1.4.1 Explain HL Why might a developer use an interpreter while writing a program but a compiler when releasing it? While developing, an interpreter runs code immediately with no compile wait , so each small change can be tested quickly. It reports an error as soon as it is reached , which helps debugging step by step. For release, a compiler produces an optimised executable that runs faster . Users can run it without installing a translator , and the source code stays private . Exam tip Past papers have rewarded exactly this pairing: interpreter for coding and debugging, compiler for the distributable version.A1.4-016 Tap to flip back
16 / 22
A1.4.1 Apply it HL A start-up must demo a prototype app in two weeks and changes it daily after user testing. Which translation approach suits it, and why? A1.4-017 Tap to flip A1.4.1 Apply it HL A start-up must demo a prototype app in two weeks and changes it daily after user testing. Which translation approach suits it, and why? An interpreted language (e.g. Python or JavaScript). No compile step : every edit can be run and tested immediately .Errors are reported as soon as they are reached , so debugging is quick. Execution speed matters little for a prototype; development speed matters most.Slow parts can be moved to compiled code later if the app grows. Exam tip Naming 'interpreter' alone earns nothing. The marks come from reasons linked to the scenario: daily changes, tight deadline.A1.4-017 Tap to flip back
17 / 22
A1.4.1 Apply it HL A studio is writing the physics engine for a VR game that must render 90 frames per second. Which translation approach suits it, and why? A1.4-018 Tap to flip A1.4.1 Apply it HL A studio is writing the physics engine for a VR game that must render 90 frames per second. Which translation approach suits it, and why? An ahead-of-time compiled language (e.g. C++ or Rust). Code is already machine code , so there is no run-time translation overhead . The compiler can optimise the whole program for the target processor . Predictable timing : no interpreter overhead or JIT warm-up pauses to cause dropped frames.Longer compile times and platform-specific builds are acceptable for known target hardware. Exam tip Performance-critical in an exam usually means compiled. Justify it with no run-time translation and hardware-specific optimisation.A1.4-018 Tap to flip back
18 / 22
A1.4.1 Apply it HL A firm will release one desktop app for Windows, macOS and Linux and wants a single build. Which translation approach suits it, and why? A1.4-019 Tap to flip A1.4.1 Apply it HL A firm will release one desktop app for Windows, macOS and Linux and wants a single build. Which translation approach suits it, and why? Bytecode run on a virtual machine (e.g. Java on the JVM, C# on .NET), usually with JIT .Source is compiled once to platform-independent bytecode : one build to ship and maintain. Each OS runs its own VM , which deals with the hardware differences. JIT keeps a long-running app close to native speed.Fully compiled code would need separate builds and testing per platform . Exam tip Cross-platform scenario? Think bytecode plus VM. Pure interpretation is also portable but runs slower and exposes the source code.A1.4-019 Tap to flip back
19 / 22
A1.4.1 Exam question [2 marks] HL Outline why a program written in Python has to be translated before a computer can run it. A1.4-020 Tap to flip A1.4.1 Exam question [2 marks] HL Outline why a program written in Python has to be translated before a computer can run it. The processor can only execute machine code : binary instructions from its own instruction set . Python source is human-readable high-level code , so the CPU cannot execute it directly . It must therefore be translated into machine code (by an interpreter, compiler or VM) so the program can run. Exam tip Two marks: why the CPU cannot run it (only understands machine code), and what translation achieves (converts it so it can execute).A1.4-020 Tap to flip back
20 / 22
A1.4.1 Exam question [4 marks] HL A developer notices her program runs faster after compiling it than when interpreted. Explain why compiled code usually executes faster. A1.4-021 Tap to flip A1.4.1 Exam question [4 marks] HL A developer notices her program runs faster after compiling it than when interpreted. Explain why compiled code usually executes faster. Compiled code is translated into machine code before it runs ; an interpreter translates while the program runs . So there is no translation overhead at run time ; an interpreter re-analyses each statement every time it runs . A compiler sees the whole program , so it can optimise it for the target processor . The interpreter itself uses CPU time and memory while the program runs. Optimised code makes better use of the cache . Exam tip Each point needs the contrast: what the compiled version does, whereas what the interpreter does. One-sided points lose marks.A1.4-021 Tap to flip back
21 / 22
A1.4.1 Exam question [4 marks] HL A weather team's simulation code is updated weekly, runs on Windows and Linux, and crunches huge data sets. Evaluate using an interpreted language. A1.4-022 Tap to flip A1.4.1 Exam question [4 marks] HL A weather team's simulation code is updated weekly, runs on Windows and Linux, and crunches huge data sets. Evaluate using an interpreted language. Strength: no compile step , so weekly updates can be tested immediately . Strength: the same source runs on both operating systems wherever the interpreter is installed. Limitation: slower execution , as translation is repeated at run time, costly with huge data sets . Limitation: errors surface only when reached , so a long run may fail part-way . Judgement: suitable if heavy processing uses compiled libraries or a JIT implementation to recover speed. Exam tip Evaluate needs both sides plus a verdict tied to the scenario. A one-sided list, or no conclusion, caps your marks.A1.4-022 Tap to flip back
22 / 22
Tip: click the card, then use the arrow keys to flip and move through the deck.
A2 Networks flashcards Networks is one of the most acronym-heavy topics in Paper 1 (WAN, WAP, VPN, VLAN), so its four decks, 171 cards in all, are where flashcards pay off fastest.
A2.1 Network fundamentals The deck starts with LANs, WANs, PANs and VPNs, then the internet, cloud, distributed systems, edge computing and mobile networks, each with benefits and limitations. Device cards cover routers, switches, modems, gateways, NICs, wireless access points and hardware firewalls, including the TCP/IP layer each works at. Protocol cards contrast TCP with UDP and HTTP with HTTPS, and HL cards add the four TCP/IP layers and encapsulation. The deck has 48 cards, 8 of them HL.
Read the full A2.1 revision guide for a web page request traced down the TCP/IP layers.
A2.1 Network fundamentals 48 cards · 8 HL
A2.1.1 Definition What is a computer network, and what is its main purpose? A2.1-001 Tap to flip A2.1.1 Definition What is a computer network, and what is its main purpose? Two or more devices linked by cable or wirelessly so they can communicate and share data and resources (files, printers, software, an internet connection) instead of each device needing its own. Exam tip 'Connected computers' alone is too thin for the mark. Always add what the connection is for: communication and sharing.A2.1-001 Tap to flip back
1 / 48
A2.1.1 Definition What is a local area network (LAN)? A2.1-002 Tap to flip A2.1.1 Definition What is a local area network (LAN)? A network covering a small area such as one building or site (a school, office or home). Its hardware is usually owned and managed by one organisation , and it offers high data rates with low latency . Exam tip A LAN can be wired, wireless or both. A wireless LAN (WLAN) is still a LAN.A2.1-002 Tap to flip back
2 / 48
A2.1.1 Definition What is a wide area network (WAN), and whose infrastructure does it usually run over? A2.1-003 Tap to flip A2.1.1 Definition What is a wide area network (WAN), and whose infrastructure does it usually run over? A network spanning a large geographical area (cities, countries, continents) that joins separate LANs . It usually runs over leased or public telecoms links and is generally slower , with higher latency , than a LAN. The internet is the largest WAN. Exam tip Organisations usually rent WAN links from telecoms companies rather than owning them. That ownership point is a common mark.A2.1-003 Tap to flip back
3 / 48
A2.1.1 Definition What is a personal area network (PAN)? A2.1-004 Tap to flip A2.1.1 Definition What is a personal area network (PAN)? The smallest network type: it connects one person's own devices within a few metres (about 10 m), usually over short-range, low-power wireless such as Bluetooth . Example: earbuds and a smartwatch linked to a phone. Exam tip P for personal: one owner, arm's reach. A family's home Wi-Fi network is a LAN, not a PAN.A2.1-004 Tap to flip back
4 / 48
A2.1.1 Definition What is a virtual private network (VPN), and why would a remote worker connect through one? A2.1-005 Tap to flip A2.1.1 Definition What is a virtual private network (VPN), and why would a remote worker connect through one? A secure, encrypted tunnel across a public network (the internet) that links a remote device to a private network. The user can reach internal resources as if directly connected , while any intercepted data stays unreadable . Exam tip A VPN is not a separate physical network. It is an encrypted connection laid over the internet, so distance does not matter.A2.1-005 Tap to flip back
5 / 48
A2.1.1 Compare How does a LAN differ from a WAN? A2.1-006 Tap to flip A2.1.1 Compare How does a LAN differ from a WAN? Area: a LAN covers one site; a WAN spans cities or countries.Ownership: LAN hardware is owned by the organisation; WAN links are usually leased from telecoms providers or run over public networks.Performance: a LAN has higher bandwidth and lower latency than a WAN.Cost and security: a LAN is cheaper to run and easier to secure than a WAN.Exam tip Every point must mention both networks. 'A WAN is big' on its own earns nothing in a Distinguish question.A2.1-006 Tap to flip back
6 / 48
A2.1.1 Apply it Name the network type for each: hospital ward computers; fitness band to phone; bank branches in five countries; doctor reaching hospital records from home. A2.1-007 Tap to flip A2.1.1 Apply it Name the network type for each: hospital ward computers; fitness band to phone; bank branches in five countries; doctor reaching hospital records from home. Ward computers: LAN (one site, owned by the hospital, fast). Fitness band to phone: PAN (one person's devices, Bluetooth range). Branches in five countries: WAN (large area, leased links joining LANs). Doctor at home: VPN (encrypted tunnel over the internet into the hospital network). Exam tip Justify each choice with a characteristic such as range, ownership or security. The type name alone rarely earns full marks.A2.1-007 Tap to flip back
7 / 48
A2.1.1 Exam question [3 marks] A company's sales staff often work over hotel Wi-Fi. Explain why the company should make them connect to its network through a VPN. A2.1-008 Tap to flip A2.1.1 Exam question [3 marks] A company's sales staff often work over hotel Wi-Fi. Explain why the company should make them connect to its network through a VPN. Staff need internal files and systems , but hotel Wi-Fi is public and untrusted . The VPN creates an encrypted tunnel across the internet to the company network... ...so any data intercepted on the hotel network is unreadable . Staff authenticate first, then their device works as if on the office LAN , reaching internal resources. Exam tip If asked for a limitation: encryption and the detour via the VPN server slow the connection, and access fails if that server is down.A2.1-008 Tap to flip back
8 / 48
A2.1.2 Compare How are the internet and the World Wide Web (WWW) related, and how do they differ? A2.1-009 Tap to flip A2.1.2 Compare How are the internet and the World Wide Web (WWW) related, and how do they differ? The internet is the global network of interconnected networks (cables, routers, servers) using TCP/IP . Its purpose is worldwide communication and data exchange. The WWW is one service that runs on the internet : pages and resources linked by hyperlinks , located by URLs and fetched with HTTP/HTTPS in a browser. Email, online gaming and video calls use the internet but are not the web. Exam tip Memory hook: the internet is the road network; the web is one kind of traffic travelling on it.A2.1-009 Tap to flip back
9 / 48
A2.1.2 Explain Describe two benefits and two limitations of the internet as a global infrastructure. A2.1-010 Tap to flip A2.1.2 Explain Describe two benefits and two limitations of the internet as a global infrastructure. Benefit: instant global communication and collaboration (email, video calls, shared documents).Benefit: access to vast information and services such as online shopping, learning and banking.Limitation: security threats (malware, hacking, data theft) can reach every connected device.Limitation: speed varies with congestion and local infrastructure, access is unequal (digital divide), and outages disrupt services society depends on.Exam tip Expand each point: name the benefit or limitation, then say who is affected and how.A2.1-010 Tap to flip back
10 / 48
A2.1.2 Definition What is cloud computing, and why do organisations use it? A2.1-011 Tap to flip A2.1.2 Definition What is cloud computing, and why do organisations use it? Using remote servers in data centres , reached over the internet , to store and process data or run software instead of local machines. Purpose: scalable, on-demand computing resources, paid for as used , without owning the hardware. Exam tip Cloud service models (SaaS, PaaS, IaaS) are in A1.1.9. The network angle here: no internet connection means no cloud.A2.1-011 Tap to flip back
11 / 48
A2.1.2 Apply it A school plans to replace its own file servers with a cloud storage service. Describe two benefits and two limitations for the school. A2.1-012 Tap to flip A2.1.2 Apply it A school plans to replace its own file servers with a cloud storage service. Describe two benefits and two limitations for the school. Benefit: no servers to buy, power or maintain; it pays a subscription that scales with student numbers.Benefit: staff and students reach files from anywhere, on any device , with backups handled by the provider.Limitation: work stops if the school's internet connection fails or slows.Limitation: student data is held off-site by a third party , raising privacy and legal concerns, and fees continue every year.Exam tip Tie each point to the school (students, staff, budget). Generic cloud facts score less in scenario questions.A2.1-012 Tap to flip back
12 / 48
A2.1.2 Definition What is a distributed system, and what is its purpose? Give one example. A2.1-013 Tap to flip A2.1.2 Definition What is a distributed system, and what is its purpose? Give one example. Many independent computers (nodes) linked by a network that coordinate by passing messages , so users see one system . Purpose: spread work and data across nodes for more speed and reliability than one machine. Example: a cryptocurrency blockchain . Exam tip In a blockchain every node keeps a copy of the ledger, so there is no central server to fail or attack.A2.1-013 Tap to flip back
13 / 48
A2.1.2 Explain Describe the benefits and limitations of distributed systems. A2.1-014 Tap to flip A2.1.2 Explain Describe the benefits and limitations of distributed systems. Fault tolerance: if one node fails, others carry on, so there is no single point of failure .Scalability: add nodes to handle more users or data.Performance: tasks are split and processed in parallel .Limitation: coordinating nodes and keeping data consistent across copies is complex.Limitation: more machines and links mean a larger attack surface , and messages between nodes add latency .Exam tip Do not confuse with edge computing. Distributed: many nodes acting as one system. Edge: processing placed near the data source.A2.1-014 Tap to flip back
14 / 48
A2.1.2 Compare How does edge computing differ from cloud computing? A2.1-015 Tap to flip A2.1.2 Compare How does edge computing differ from cloud computing? Location: edge processes data at or near where it is produced (on the device or a local server); cloud sends it to distant data centres .Speed: edge gives lower latency , suiting real-time systems; cloud adds a round trip.Bandwidth: edge sends only results, so less data crosses the network.Capacity and management: cloud has huge central power; edge devices have limited power and are many separate devices to secure.Exam tip Edge often works alongside the cloud: urgent decisions are made locally, and summaries go to the cloud for storage and analysis.A2.1-015 Tap to flip back
15 / 48
A2.1.2 Exam question [4 marks] Smart traffic lights process camera images at each junction (edge computing), not in a central data centre. Explain one benefit and one limitation of this. A2.1-016 Tap to flip A2.1.2 Exam question [4 marks] Smart traffic lights process camera images at each junction (edge computing), not in a central data centre. Explain one benefit and one limitation of this. Benefit: images are processed where they are captured, so there is no round trip to a distant server......so the lights react in real time , e.g. turning green for an approaching ambulance. Limitation: every junction needs its own processing hardware ......which raises cost and creates many devices to maintain, update and secure . Exam tip Other valid benefits: far less video sent over the network, and lights keep working if the link to the centre fails.A2.1-016 Tap to flip back
16 / 48
A2.1.2 Definition What is a mobile (cellular) network, and what is its purpose? A2.1-017 Tap to flip A2.1.2 Definition What is a mobile (cellular) network, and what is its purpose? A wireless network whose coverage is split into cells , each served by a base station (mast), with connections handed over between cells as users move. Purpose: voice and internet access on the move over wide areas, e.g. 4G and 5G . Exam tip Handover between cells is what lets a call or download continue while you travel.A2.1-017 Tap to flip back
17 / 48
A2.1.2 Explain Describe the benefits and limitations of mobile networks. A2.1-018 Tap to flip A2.1.2 Explain Describe the benefits and limitations of mobile networks. Benefit: internet access anywhere with coverage , enabling remote work, mobile payments and telemedicine.Benefit: newer generations (5G ) give higher speeds and lower latency , supporting IoT devices.Limitation: dead zones and weak signal in rural areas or inside buildings.Limitation: congestion when many users share one cell, e.g. at a stadium.Limitation: data costs, and wireless signals can be intercepted .Exam tip Limited radio spectrum is the root of congestion: each cell can carry only so much traffic at once.A2.1-018 Tap to flip back
18 / 48
A2.1.3 Definition What does a gateway do in a network? A2.1-019 Tap to flip A2.1.3 Definition What does a gateway do in a network? It connects two networks that use different protocols , translating data between them so they can communicate. Examples: linking an internet phone (VoIP) system to the traditional telephone network, or a home network to the internet. Exam tip The router linking a LAN to the internet is often called the 'default gateway'. The key idea is joining dissimilar networks.A2.1-019 Tap to flip back
19 / 48
A2.1.3 Compare How does a hardware firewall differ from a software firewall? A2.1-020 Tap to flip A2.1.3 Compare How does a hardware firewall differ from a software firewall? A hardware firewall is a dedicated device at the network boundary that inspects all incoming and outgoing packets and allows or blocks them using rules (IP addresses, ports, protocols). It protects every device on the network without using their processing power. A software firewall is a program on one device : it protects only that device but can set rules per application. Exam tip Most home broadband routers include a basic hardware firewall. Firewall rules and other countermeasures return in A2.4.A2.1-020 Tap to flip back
20 / 48
A2.1.3 Definition What is the function of a modem? A2.1-021 Tap to flip A2.1.3 Definition What is the function of a modem? Short for modulator-demodulator . It converts digital data from a computer or router into the signal carried on the line (telephone, cable or satellite), called modulation , and converts incoming signals back into digital data (demodulation ). Exam tip A modem does not read IP addresses or choose routes. It only converts signals; routing is the router's job.A2.1-021 Tap to flip back
21 / 48
A2.1.3 Definition What is a network interface card (NIC), and what does it do? A2.1-022 Tap to flip A2.1.3 Definition What is a network interface card (NIC), and what does it do? The hardware (a card or built-in chip) that connects a device to a network , wired or wireless. It converts data into signals for the medium (electrical, light or radio) and back, and holds the device's unique MAC address . Exam tip Every networked device needs a NIC. A Wi-Fi adapter is simply a wireless NIC.A2.1-022 Tap to flip back
22 / 48
A2.1.3 Definition What is the function of a router? A2.1-023 Tap to flip A2.1.3 Definition What is the function of a router? It forwards packets between different networks (e.g. a LAN and the internet). It reads each packet's destination IP address , checks its routing table and sends the packet along the best available path to the next hop. Exam tip A packet may cross many routers. Each router decides only the next hop, not the whole journey.A2.1-023 Tap to flip back
23 / 48
A2.1.3 Definition What is the function of a network switch? A2.1-024 Tap to flip A2.1.3 Definition What is the function of a network switch? It connects devices within a LAN . It reads the destination MAC address of each incoming frame and forwards it only to the port of the intended device, rather than to every device. Exam tip Older hubs copied every frame to all ports. A switch's targeted forwarding cuts unnecessary traffic and collisions.A2.1-024 Tap to flip back
24 / 48
A2.1.3 Definition What is a wireless access point (WAP)? A2.1-025 Tap to flip A2.1.3 Definition What is a wireless access point (WAP)? A device that lets wireless devices join a wired network . It converts data between radio signals (Wi-Fi) and the wired Ethernet network, and usually encrypts the wireless link (e.g. WPA3). Exam tip A WAP extends a LAN to wireless devices. It does not join separate networks the way a router does.A2.1-025 Tap to flip back
25 / 48
A2.1.3 Compare Compare a router and a switch. A2.1-026 Tap to flip A2.1.3 Compare Compare a router and a switch. Scope: a router links different networks ; a switch links devices within one LAN .Address read: a router uses IP addresses ; a switch uses MAC addresses .Data unit: a router forwards packets ; a switch forwards frames .Decision: a router picks a path from its routing table ; a switch picks a port from its MAC address table .Exam tip Questions sometimes say a switch 'routes' data. Keep your answer precise: switches forward frames, routers route packets.A2.1-026 Tap to flip back
26 / 48
A2.1.3 Compare At which TCP/IP layer does each device mainly work: router, switch, NIC, wireless access point, modem, hardware firewall, gateway? A2.1-027 Tap to flip A2.1.3 Compare At which TCP/IP layer does each device mainly work: router, switch, NIC, wireless access point, modem, hardware firewall, gateway? Network interface layer: switch, NIC, WAP, modem (frames, MAC addresses, signals on the medium).Internet layer: router (IP addresses and routing).Hardware firewall: mainly the internet layer (filters by IP address), also transport (port numbers); advanced firewalls inspect the application layer .Gateway: can span several layers, up to application , because it translates whole protocols.Exam tip The address a device reads gives its layer: MAC address, network interface; IP address, internet; port number, transport.A2.1-027 Tap to flip back
27 / 48
A2.1.3 Exam question [4 marks] Explain how a switch uses its MAC address table so that a frame reaches only the intended device. A2.1-028 Tap to flip A2.1.3 Exam question [4 marks] Explain how a switch uses its MAC address table so that a frame reaches only the intended device. Learning: it records each frame's source MAC address and arrival port in its MAC address table .It reads the incoming frame's destination MAC address . It looks up that address in the table to find the matching port. It forwards the frame only out of that port , so other devices never receive it. If the address is unknown , it floods the frame to all other ports. Exam tip Learning, look-up and selective forwarding each earn separate marks. Name the MAC address table explicitly.A2.1-028 Tap to flip back
28 / 48
A2.1.3 Apply it A home broadband 'router' is really several devices in one box. Name the devices it combines and the job each does. A2.1-029 Tap to flip A2.1.3 Apply it A home broadband 'router' is really several devices in one box. Name the devices it combines and the job each does. Modem: converts between digital data and the provider's line signal.Router: forwards packets between the home LAN and the internet.Switch: Ethernet ports linking wired devices.Wireless access point: lets phones and laptops join over Wi-Fi.Hardware firewall: filters traffic arriving from the internet. The box usually acts as DHCP server and gateway too.Exam tip Asked which device converts the line signal? Answer 'modem'. 'Router' is credited only if you say it is a combined router-modem.A2.1-029 Tap to flip back
29 / 48
A2.1.4 Definition What is a network protocol? A2.1-030 Tap to flip A2.1.4 Definition What is a network protocol? An agreed set of rules that governs how data is formatted, transmitted and received between devices, covering things such as message structure, addressing, timing and error checking . Exam tip 'Set of rules' is what earns the mark. 'A way of communicating' is too vague to score.A2.1-030 Tap to flip back
30 / 48
A2.1.4 Exam question [4 marks] Outline two reasons why devices on a network must follow agreed protocols. A2.1-031 Tap to flip A2.1.4 Exam question [4 marks] Outline two reasons why devices on a network must follow agreed protocols. Interoperability: devices from different manufacturers and operating systems can communicate......because both sides use the same data format , so the receiver can interpret what arrives. Data integrity: protocols define error detection such as checksums......and retransmission of lost or damaged data, so the message arrives complete and correct . Also valid: addressing (reaching the right device), flow control (not overwhelming the receiver), security (encryption). Exam tip Each reason needs an expansion to earn its second mark. 'Protocols make communication possible' alone scores little.A2.1-031 Tap to flip back
31 / 48
A2.1.4 Definition What is the transmission control protocol (TCP)? A2.1-032 Tap to flip A2.1.4 Definition What is the transmission control protocol (TCP)? A transport-layer protocol that is connection-oriented and reliable : it sets up a connection before sending, then delivers data complete, error-checked and in the correct order . Used for web pages, email and file downloads. Exam tip TCP works at the transport layer; IP works at the internet layer. Together they give the TCP/IP name.A2.1-032 Tap to flip back
32 / 48
A2.1.4 Process Describe how TCP makes sure all data arrives correctly and in order. A2.1-033 Tap to flip A2.1.4 Process Describe how TCP makes sure all data arrives correctly and in order. A three-way handshake (SYN, SYN-ACK, ACK) sets up the connection. Data is split into segments , each given a sequence number . The receiver uses a checksum to detect damaged segments and reorders segments by sequence number. The receiver sends acknowledgements (ACKs) for what arrives. Any segment not acknowledged within a time limit is retransmitted . Exam tip Sequence numbers fix the order; ACKs plus retransmission fix losses. Mention both to cover 'complete' and 'in order'.A2.1-033 Tap to flip back
33 / 48
A2.1.4 Definition What is the user datagram protocol (UDP)? A2.1-034 Tap to flip A2.1.4 Definition What is the user datagram protocol (UDP)? A transport-layer , connectionless protocol that sends datagrams without a handshake, acknowledgements or retransmission . Delivery and order are not guaranteed , but the low overhead makes it fast , suiting streaming, online gaming and VoIP. Exam tip For live data a late packet is useless anyway, so skipping retransmission is a sensible design, not a flaw.A2.1-034 Tap to flip back
34 / 48
A2.1.4 Compare What are the key differences between TCP and UDP? A2.1-035 Tap to flip A2.1.4 Compare What are the key differences between TCP and UDP? Connection: TCP is connection-oriented (handshake first); UDP is connectionless .Reliability: TCP uses acknowledgements and retransmission , so delivery is guaranteed; UDP has neither, so data can be lost.Order: TCP reorders segments by sequence number; UDP does not.Speed: UDP has less overhead (smaller header, no waiting), so it is faster with lower latency.Uses: TCP for downloads, web, email; UDP for live streaming, gaming, VoIP.Exam tip Both are transport-layer protocols. The trade-off to remember: TCP chooses reliability, UDP chooses speed.A2.1-035 Tap to flip back
35 / 48
A2.1.4 Apply it A video-calling app sends live audio and video. Should it use TCP or UDP for this stream, and why? A2.1-036 Tap to flip A2.1.4 Apply it A video-calling app sends live audio and video. Should it use TCP or UDP for this stream, and why? UDP. In a live call, late data is useless : waiting for retransmission would cause delays and freezes . UDP's low overhead and lack of acknowledgements keep latency low . A few lost packets only cause a brief glitch, which users accept. The app's chat or file-sharing features would still use TCP, where every byte matters. Exam tip Justify with latency, not just 'UDP is faster'. Explain why speed matters more than completeness here.A2.1-036 Tap to flip back
36 / 48
A2.1.4 Definition What is the hypertext transfer protocol (HTTP)? A2.1-037 Tap to flip A2.1.4 Definition What is the hypertext transfer protocol (HTTP)? An application-layer protocol for transferring web pages and resources between a browser (client) and a web server in a request-response cycle. It is stateless , runs over TCP (port 80) and sends data unencrypted . Exam tip HTTP is stateless (no memory of earlier requests), not connectionless: it runs over connection-oriented TCP. Cookies add state.A2.1-037 Tap to flip back
37 / 48
A2.1.4 Compare How does HTTPS differ from HTTP? A2.1-038 Tap to flip A2.1.4 Compare How does HTTPS differ from HTTP? Encryption: HTTPS encrypts all data in transit using TLS (formerly SSL); HTTP sends plain text .Authentication: an HTTPS server proves its identity with a digital certificate ; HTTP gives no such proof.Integrity: with HTTPS, tampering in transit is detected; with HTTP it is not.Port: HTTPS uses 443 ; HTTP uses 80 . Both are application-layer protocols.Exam tip HTTPS sends the same HTTP requests and responses, just carried inside an encrypted TLS connection.A2.1-038 Tap to flip back
38 / 48
A2.1.4 Exam question [4 marks] Describe how HTTPS keeps a customer's login details safe when they use online banking over café Wi-Fi. A2.1-039 Tap to flip A2.1.4 Exam question [4 marks] Describe how HTTPS keeps a customer's login details safe when they use online banking over café Wi-Fi. The bank's server sends its digital certificate , issued by a trusted certificate authority . The browser checks the certificate , confirming it is the genuine bank and not a fake site or man-in-the-middle. Browser and server use asymmetric (public-key) encryption to agree a shared session key . All data, including the password, is encrypted with that key, so anyone intercepting the café Wi-Fi sees only unreadable data. Exam tip Two separate ideas earn marks: encryption (privacy) and certificates (authentication). Answers covering only encryption usually lose half the marks.A2.1-039 Tap to flip back
39 / 48
A2.1.4 Definition What does the dynamic host configuration protocol (DHCP) do? A2.1-040 Tap to flip A2.1.4 Definition What does the dynamic host configuration protocol (DHCP) do? An application-layer protocol that automatically assigns each device joining a network an IP address for a limited time (a lease ), plus its subnet mask , default gateway and DNS server address. Exam tip Why it matters: no manual set-up, no duplicate IP addresses, and addresses return to the pool for reuse when leases expire.A2.1-040 Tap to flip back
40 / 48
A2.1.5 Definition HL What is the purpose of the TCP/IP model, and what are its four layers in order? A2.1-041 Tap to flip A2.1.5 Definition HL What is the purpose of the TCP/IP model, and what are its four layers in order? A layered framework that standardises how data is sent across networks, giving each layer one job so different hardware and software can interoperate . Layers, top to bottom: application, transport, internet, network interface . Exam tip TCP/IP has four layers. The seven-layer model is OSI, which is not in this course. Learn the order top-down.A2.1-041 Tap to flip back
41 / 48
A2.1.5 Definition HL In the TCP/IP model, what does the application layer do? A2.1-042 Tap to flip A2.1.5 Definition HL In the TCP/IP model, what does the application layer do? It is the interface between user applications and the network : it provides services through protocols such as HTTP, HTTPS, DHCP, DNS and SMTP , and creates the message (e.g. an HTTP request) passed down to the transport layer. Exam tip The application layer is not the program itself (the browser). It is the set of protocols the program uses to talk over the network.A2.1-042 Tap to flip back
42 / 48
A2.1.5 Definition HL In the TCP/IP model, what does the transport layer do? A2.1-043 Tap to flip A2.1.5 Definition HL In the TCP/IP model, what does the transport layer do? It provides end-to-end communication between processes on the two hosts. It splits data into segments , adds port numbers so data reaches the right application, and uses TCP (reliable: sequencing, ACKs, retransmission) or UDP (fast, best effort). Exam tip Port numbers identify the application (e.g. 443 for HTTPS); IP addresses identify the device. Do not swap them.A2.1-043 Tap to flip back
43 / 48
A2.1.5 Definition HL In the TCP/IP model, what does the internet layer do? A2.1-044 Tap to flip A2.1.5 Definition HL In the TCP/IP model, what does the internet layer do? It handles logical addressing and routing . Using IP , it wraps each segment in a packet with source and destination IP addresses , so routers can forward it across networks, hop by hop, towards its destination. Exam tip IP is best effort: it addresses and routes packets but does not guarantee delivery. Reliability comes from TCP in the layer above.A2.1-044 Tap to flip back
44 / 48
A2.1.5 Definition HL In the TCP/IP model, what happens to data at the lowest layer, the network interface layer? A2.1-045 Tap to flip A2.1.5 Definition HL In the TCP/IP model, what happens to data at the lowest layer, the network interface layer? It handles physical transmission over the medium (cable, fibre, Wi-Fi). It packages packets into frames , uses MAC addresses for delivery on the local network, detects errors in frames and converts bits into signals . Exam tip NICs, switches, Ethernet and Wi-Fi all work here. It is the only layer that depends on the physical medium.A2.1-045 Tap to flip back
45 / 48
A2.1.5 Process HL Describe encapsulation as data passes down the TCP/IP layers of the sending device. A2.1-046 Tap to flip A2.1.5 Process HL Describe encapsulation as data passes down the TCP/IP layers of the sending device. Application: creates the data, e.g. an HTTP request.Transport: splits it into segments , adding a TCP or UDP header (port numbers, checksum; TCP also adds a sequence number).Internet: wraps each segment in a packet with an IP header (source and destination IP).Network interface: wraps the packet in a frame with a header and trailer (MAC addresses, error check), then sends it as signals .Exam tip Memory hook: a letter inside an envelope inside a parcel. Each layer adds its own wrapper and reads only its own.A2.1-046 Tap to flip back
46 / 48
A2.1.5 Process HL What is decapsulation, and what happens at each TCP/IP layer as received data passes up the stack? A2.1-047 Tap to flip A2.1.5 Process HL What is decapsulation, and what happens at each TCP/IP layer as received data passes up the stack? Each layer removes its own header as data moves up the receiver's stack. Network interface: turns signals into a frame, checks the frame's checksum and destination MAC , strips header and trailer.Internet: checks the destination IP , strips the IP header.Transport: uses the port number to find the application, reorders and checks segments, sends ACKs (TCP).Application: receives the original data intact.Exam tip Decapsulation mirrors encapsulation: the last header added by the sender is the first one removed by the receiver.A2.1-047 Tap to flip back
47 / 48
A2.1.5 Exam question [4 marks] HL Explain how the four layers of the TCP/IP model interact so that data is transmitted reliably across a network. A2.1-048 Tap to flip A2.1.5 Exam question [4 marks] HL Explain how the four layers of the TCP/IP model interact so that data is transmitted reliably across a network. Each layer adds its own header on the way down; the matching receiving layer reads and removes it, so each layer does one job. Transport (TCP): sequence numbers let segments be reordered; ACKs confirm arrival; missing segments are retransmitted .Internet (IP): the destination IP address lets routers forward each packet to the right host.Network interface: frame checksums detect corruption; damaged frames are discarded and TCP resends the data.Exam tip Link each reliability feature to its layer. Listing the four layers with no roles scores very little.A2.1-048 Tap to flip back
48 / 48
Tip: click the card, then use the arrow keys to flip and move through the deck.
A2.2 Network architecture Star, mesh and hybrid topologies are judged on reliability, speed, scalability, collisions and cost. Then come client-server and peer-to-peer models, with uses from online banking to blockchain, and segmentation through subnetting and VLANs, including a clinic that must keep guest Wi-Fi away from patient records. HL cards describe DNS, DHCP, file, mail, proxy and web servers, including a step-by-step DNS lookup. The deck has 38 cards, 12 of them HL.
Read the full A2.2 revision guide for a worked DNS lookup and segmentation example.
A2.2 Network architecture 38 cards · 12 HL
A2.2.1 Definition What is a network topology? A2.2-001 Tap to flip A2.2.1 Definition What is a network topology? The arrangement of nodes (devices) and the links (connections) between them in a network. The physical topology is the real layout of cables and hardware; the logical topology is the route data actually takes. Exam tip Topology is about shape, not size: LAN and WAN describe geographical scale, not topology.A2.2-001 Tap to flip back
1 / 38
A2.2.1 Definition What is a star topology? A2.2-002 Tap to flip A2.2.1 Definition What is a star topology? Every device has its own dedicated link to one central device , usually a switch . Devices are not linked directly to each other, so all traffic passes through the central node . Most home and office LANs are stars. Exam tip Picture a hub with spokes: one centre means one single point of failure.A2.2-002 Tap to flip back
2 / 38
A2.2.1 Definition What is a mesh topology? A2.2-003 Tap to flip A2.2.1 Definition What is a mesh topology? Nodes are directly connected to several other nodes , so there are multiple paths between devices. In a full mesh every node links to every other node ; in a partial mesh only some nodes are interconnected. Exam tip A full mesh of n nodes needs n(n-1)/2 links: 10 devices need 45 cables. That is why full mesh is costly.A2.2-003 Tap to flip back
3 / 38
A2.2.1 Definition What is a hybrid topology? A2.2-004 Tap to flip A2.2.1 Definition What is a hybrid topology? A network that combines two or more topologies , e.g. star LANs joined by a mesh backbone , gaining the strengths of each while limiting weaknesses. Typical of corporations and college campuses: a star per building, linked by a mesh. Exam tip Most large real networks are hybrids. Always name the topologies being combined in your example.A2.2-004 Tap to flip back
4 / 38
A2.2.1 Compare Compare the reliability of star and mesh topologies. A2.2-005 Tap to flip A2.2.1 Compare Compare the reliability of star and mesh topologies. Star : each device has an independent link , so a broken cable or device isolates only that device , but the central switch is a single point of failure .Mesh : redundant paths let traffic be rerouted around a failed link or node, so there is no single point of failure .Overall, mesh is more reliable ; star is simpler and cheaper. Exam tip Writing 'more reliable' alone earns little. Say why: independent links (star) or alternative routes (mesh).A2.2-005 Tap to flip back
5 / 38
A2.2.1 Compare How do star and mesh topologies compare on cost and scalability? A2.2-006 Tap to flip A2.2.1 Compare How do star and mesh topologies compare on cost and scalability? Cost : a star needs one cable per device plus a switch; a full mesh needs far more cables and ports , so it costs much more to install.Scalability : a star grows by plugging into a free switch port (limited by port count); a new node in a wired full mesh must link to every existing node .Wireless mesh is the exception: extra nodes are cheap and largely self-configuring . Exam tip Mesh is the most reliable, but cost usually limits it to backbones and critical links rather than a whole LAN.A2.2-006 Tap to flip back
6 / 38
A2.2.1 Compare Compare star and mesh topologies in terms of transmission speed and data collisions. A2.2-007 Tap to flip A2.2.1 Compare Compare star and mesh topologies in terms of transmission speed and data collisions. A data collision : two devices transmit on a shared channel at once , corrupting the data, which must be resent . Star with a switch : data goes only to the destination port , so collisions are rare and speed is high. A hub shares bandwidth, so collisions are common.Mesh : direct links and routing that spreads traffic across paths keep collisions uncommon and avoid a central bottleneck, but many hops slow data.Exam tip In a star every frame passes through the central switch, so an overloaded switch slows the whole network.A2.2-007 Tap to flip back
7 / 38
A2.2.1 Apply it A small office of ten staff needs an affordable wired network where one faulty PC cannot disrupt everyone. Which topology suits it, and why? A2.2-008 Tap to flip A2.2.1 Apply it A small office of ten staff needs an affordable wired network where one faulty PC cannot disrupt everyone. Which topology suits it, and why? Star with a central switch :Affordable : one cable per device and one switch, unlike a mesh.Reliable for users : a faulty PC or cable isolates only that device .Easy to manage and expand : faults are easy to trace; new staff plug into a free port.Weakness: the switch is a single point of failure , so keep a spare. Exam tip In apply questions, link each point to the scenario (ten staff, small budget) instead of listing generic features.A2.2-008 Tap to flip back
8 / 38
A2.2.1 Apply it A government department links offices in several buildings and must keep critical services running if any single link fails. Which topology suits it, and why? A2.2-009 Tap to flip A2.2.1 Apply it A government department links offices in several buildings and must keep critical services running if any single link fails. Which topology suits it, and why? A hybrid topology: A star in each building keeps local cabling cheap and easy to manage . A (partial) mesh backbone between buildings gives redundant paths , so traffic is rerouted if a link fails. It scales : a new building's star simply joins the backbone. The extra backbone cost is justified because downtime would hit critical services . Exam tip A full mesh of every device would be far too costly: put redundancy only where a failure matters most.A2.2-009 Tap to flip back
9 / 38
A2.2.2 Definition HL What is a server in a computer network? A2.2-010 Tap to flip A2.2.2 Definition HL What is a server in a computer network? A computer or program that provides data, resources or services to other devices (clients ) on a network, responding to their requests , often for many clients at once. Exam tip A server is a role, not a box: an ordinary PC running server software is a server. Never describe it as a person.A2.2-010 Tap to flip back
10 / 38
A2.2.2 Definition HL What job does a DNS server perform when you browse the web? A2.2-011 Tap to flip A2.2.2 Definition HL What job does a DNS server perform when you browse the web? It holds a database matching domain names to IP addresses and resolves (translates) a human-readable name such as www.example.com into the IP address a computer needs to connect, so users need not remember numbers. Exam tip Memory hook: DNS is the internet's phone book. Name in, IP address out.A2.2-011 Tap to flip back
11 / 38
A2.2.2 Process HL Outline the steps a DNS lookup follows when a browser needs the IP address of a domain it has never visited. A2.2-012 Tap to flip A2.2.2 Process HL Outline the steps a DNS lookup follows when a browser needs the IP address of a domain it has never visited. The device checks its cache , then queries its DNS resolver (often the ISP's). If not cached, the resolver asks a root server , which refers it to a top-level domain (TLD) server (e.g. .com). The TLD server refers it to the authoritative server , which returns the IP address (or an error if unknown). The resolver caches it and returns it; the browser connects to the web server . Exam tip Do not skip the TLD step, and do not say the TLD server holds the IP address: the authoritative server does.A2.2-012 Tap to flip back
12 / 38
A2.2.2 Process HL Describe the steps a DHCP server and a newly connected device follow so that the device obtains an IP address. A2.2-013 Tap to flip A2.2.2 Process HL Describe the steps a DHCP server and a newly connected device follow so that the device obtains an IP address. Discover: the device broadcasts a message to find any DHCP server on the network.Offer: a server replies, offering a free IP address from its pool .Request: the device asks to use that offered address.Acknowledge: the server confirms the lease for a set time, with the subnet mask, default gateway and DNS server addresses.Exam tip Memory hook: DORA. The address is leased, not owned: if the lease is not renewed, it returns to the pool.A2.2-013 Tap to flip back
13 / 38
A2.2.2 Definition HL What is a file server? A2.2-014 Tap to flip A2.2.2 Definition HL What is a file server? A server that stores files centrally so that many users can access and share them over the network. It authenticates users, enforces access rights (e.g. read only or read/write) and allows central backup . Exam tip Contrast with USB sticks or emailed copies: one shared, backed-up version instead of many out-of-date ones.A2.2-014 Tap to flip back
14 / 38
A2.2.2 Definition HL What is the function of a mail server? A2.2-015 Tap to flip A2.2.2 Definition HL What is the function of a mail server? It sends, receives and stores email . It uses SMTP to send and forward messages to the recipient's mail server, keeps them in the user's mailbox , and lets clients retrieve them with IMAP (kept on server, synced) or POP3 (downloaded). Exam tip SMTP sends mail; IMAP and POP3 fetch it. IMAP suits people who read email on several devices.A2.2-015 Tap to flip back
15 / 38
A2.2.2 Definition HL What is a proxy server? A2.2-016 Tap to flip A2.2.2 Definition HL What is a proxy server? An intermediary between client devices and the internet that forwards requests on the clients' behalf . It can cache popular pages, filter (block) sites, log activity and hide internal IP addresses from outside servers. Exam tip Outside websites see the proxy's address, not the user's device: that is the 'hides IP address' point examiners reward.A2.2-016 Tap to flip back
16 / 38
A2.2.2 Definition HL What is the function of a web server? A2.2-017 Tap to flip A2.2.2 Definition HL What is the function of a web server? It stores (hosts) web pages and their resources (HTML, CSS, images, scripts) and responds to HTTP/HTTPS requests from browsers by sending the page back. For dynamic pages it first runs server-side scripts , e.g. to fetch data from a database. Exam tip The web server delivers the page; the DNS server only supplies the IP address that lets the browser find it.A2.2-017 Tap to flip back
17 / 38
A2.2.2 Explain HL How can an organisation make its servers scalable and reliable? A2.2-018 Tap to flip A2.2.2 Explain HL How can an organisation make its servers scalable and reliable? Hardware : a server needs more RAM, storage and a faster multi-core processor than a client, because it handles many simultaneous requests .Scalability : upgrade hardware or add servers with load balancing to spread requests, so performance holds as users grow.Reliability : redundancy (several DNS or DHCP servers, RAID disks, failover ) and regular backups , so the service continues if one part fails.Example: DNS uses many replicated servers worldwide. Exam tip One server is a single point of failure. Redundancy is the reliability keyword; load balancing is the scalability keyword.A2.2-018 Tap to flip back
18 / 38
A2.2.2 Explain HL Why do servers need strong security, and what measures protect the main server types? A2.2-019 Tap to flip A2.2.2 Explain HL Why do servers need strong security, and what measures protect the main server types? Servers concentrate valuable data and services , so they are prime targets and a breach or outage affects every client . File server : authentication and access rights .Web server : HTTPS (TLS) encryption and regular patching.Mail server : spam and malware filtering .DNS and DHCP : accept answers only from authorised servers , blocking spoofed DNS replies and rogue DHCP servers .All servers : firewalls , with a proxy hiding internal addresses.Exam tip Match each measure to the server's job: access rights for files, encryption for web traffic, filtering for email.A2.2-019 Tap to flip back
19 / 38
A2.2.2 Exam question [4 marks] HL A library's self-service terminals send every book loan to a central server. Describe the function of this server. A2.2-020 Tap to flip A2.2.2 Exam question [4 marks] HL A library's self-service terminals send every book loan to a central server. Describe the function of this server. Receives requests from the terminals over the network.Handles many clients at the same time .Validates each request against its database (e.g. member and book records).Processes it, e.g. records the loan and updates the catalogue.Sends the result back to the terminal.Exam tip Describe what this server does in the scenario, step by step. A generic definition of 'server' earns one mark at most.A2.2-020 Tap to flip back
20 / 38
A2.2.2 Exam question [4 marks] HL A school sends all student web traffic through a proxy server. Explain two benefits of this for the school. A2.2-021 Tap to flip A2.2.2 Exam question [4 marks] HL A school sends all student web traffic through a proxy server. Explain two benefits of this for the school. Filtering : requests are checked against rules, so inappropriate or harmful sites are blocked for students.Caching : pages many students request are stored locally, so they load faster and less internet bandwidth is used.Hiding internal IP addresses : outside servers see only the proxy, so school devices are harder to attack .Logging : usage is recorded, so misuse can be traced and policy enforced.Exam tip Explain means benefit plus reason. 'It blocks sites' earns 1; add 'so students cannot reach harmful content' for the second mark.A2.2-021 Tap to flip back
21 / 38
A2.2.3 Definition What is the client-server model? A2.2-022 Tap to flip A2.2.3 Definition What is the client-server model? A centralised model in which one or more dedicated servers host and manage resources and services, and clients request them; the server processes each request and sends back a response . Exam tip Learn the relationship: the server provides, many clients request. That is what 'outline the relationship' questions reward.A2.2-022 Tap to flip back
22 / 38
A2.2.3 Definition What is the peer-to-peer (P2P) model? A2.2-023 Tap to flip A2.2.3 Definition What is the peer-to-peer (P2P) model? A decentralised model with no dedicated central server : every device (peer ) has equal status and acts as both client and server , sharing resources such as files, storage and bandwidth directly with other peers. Exam tip P2P is a model, not a topology: peers do not each need a direct link to every other peer.A2.2-023 Tap to flip back
23 / 38
A2.2.3 Compare Contrast the client-server and peer-to-peer models in terms of control, security, cost, scalability and reliability. A2.2-024 Tap to flip A2.2.3 Compare Contrast the client-server and peer-to-peer models in terms of control, security, cost, scalability and reliability. Control : client-server is centrally managed ; P2P is decentralised , each peer manages itself.Security : client-server enforces security and backups centrally ; P2P relies on each peer , so it is harder to police.Cost : client-server needs server hardware and administrators ; P2P is cheap to set up.Scalability : extra clients can overload the server ; in P2P each new peer adds capacity .Reliability : a client-server network has a single point of failure ; P2P has none.Exam tip Every point must mention both models. Describing only one model caps your marks.A2.2-024 Tap to flip back
24 / 38
A2.2.3 Compare What do the client-server and peer-to-peer models have in common? A2.2-025 Tap to flip A2.2.3 Compare What do the client-server and peer-to-peer models have in common? Both let devices share resources and data over a network. Both use the same protocols (TCP/IP) and hardware (NICs, switches, routers). In both, one device requests a service and another provides it ; a peer simply plays either role. Both need security measures such as authentication and malware protection. Exam tip 'Compare and contrast' wants similarities too. A similarity point is the mark students most often forget.A2.2-025 Tap to flip back
25 / 38
A2.2.3 Explain What are the main benefits and drawbacks of the client-server model? A2.2-026 Tap to flip A2.2.3 Explain What are the main benefits and drawbacks of the client-server model? Benefits: Central management of data, users and backups , so data stays consistent.Central security is easier to enforce and monitor.Clients can be low-specification , as processing runs on the server. Drawbacks: The server is a single point of failure and an attractive target for attackers. Costly servers and IT staff; heavy demand can create a bottleneck .Exam tip For 'outline one advantage', state the advantage, then develop it: what it enables or saves.A2.2-026 Tap to flip back
26 / 38
A2.2.3 Explain What are the main benefits and drawbacks of the peer-to-peer model? A2.2-027 Tap to flip A2.2.3 Explain What are the main benefits and drawbacks of the peer-to-peer model? Benefits: No single point of failure : if one peer leaves, others still provide the data.Cheap to set up: no dedicated server or administrator.Scales well : each new peer adds storage and bandwidth.Drawbacks: Harder to secure : no central control or accountability, so malware spreads easily.Unreliable availability and backup : peers go offline and files are scattered.Exam tip 'Used for illegal file sharing' is not accepted as a P2P characteristic. Describe the structure instead.A2.2-027 Tap to flip back
27 / 38
A2.2.3 Exam question [4 marks] Explain why a peer-to-peer network can keep providing a service when machines fail, whereas a client-server network may not. A2.2-028 Tap to flip A2.2.3 Exam question [4 marks] Explain why a peer-to-peer network can keep providing a service when machines fail, whereas a client-server network may not. In P2P any peer can act as a server , so no single machine is essential. Data and services are replicated across many peers . So if one node fails, the service is still available from other peers . In client-server, if the central server fails , every client loses the service (single point of failure). Peers can be updated or removed without stopping the whole network . Exam tip Explain needs the chain: replicated across peers, so one failure does not stop the service. Facts without the 'so' lose marks.A2.2-028 Tap to flip back
28 / 38
A2.2.3 Apply it Why do online banking, email and web browsing services usually use the client-server model? A2.2-029 Tap to flip A2.2.3 Apply it Why do online banking, email and web browsing services usually use the client-server model? Online banking : one central, authoritative record of balances, with security and transaction processing enforced on the bank's servers .Email : mail servers store mailboxes centrally , so messages are backed up and reachable from any device.Web browsing : content is updated once on the web server and every browser gets the same version.Trade-off: if the server fails, every user loses the service . Exam tip Name the application and explain how the model serves it; a bare list of applications earns little.A2.2-029 Tap to flip back
29 / 38
A2.2.3 Apply it How is the peer-to-peer model used in file sharing, VoIP and blockchain? A2.2-030 Tap to flip A2.2.3 Apply it How is the peer-to-peer model used in file sharing, VoIP and blockchain? File sharing (e.g. BitTorrent): downloaders also upload pieces to other peers, so large files spread fast with no central server.VoIP : once a call is set up, audio can travel directly between the callers' devices , reducing server load.Blockchain : every node holds a copy of the ledger and helps validate transactions, so no single authority can alter records; but consensus is slow and energy-hungry .Exam tip Many VoIP services now route calls through central servers, so say calls 'can' be peer-to-peer, not that they always are.A2.2-030 Tap to flip back
30 / 38
A2.2.4 Definition What is network segmentation? A2.2-031 Tap to flip A2.2.4 Definition What is network segmentation? Dividing a network into smaller, separate parts (segments) , so traffic stays within its segment and traffic between segments is controlled by a router or firewall. It can be physical (separate hardware) or logical (subnets, VLANs).Exam tip Segments are not cut off completely: traffic can cross between them, but only through controlled points with rules.A2.2-031 Tap to flip back
31 / 38
A2.2.4 Explain How does network segmentation improve security? A2.2-032 Tap to flip A2.2.4 Explain How does network segmentation improve security? Limits the spread of an attack : malware or an intruder in one segment cannot freely reach others, so damage is contained .Restricts access to sensitive areas: e.g. guest Wi-Fi is kept apart from payment or patient-record systems.Traffic between segments passes a router or firewall with rules , so it can be filtered and logged . Limitation: it does not prevent the initial breach . Exam tip Segmentation contains a breach; it does not stop one happening. Mention both sides in evaluate questions.A2.2-032 Tap to flip back
32 / 38
A2.2.4 Exam question [4 marks] A school's single network slows badly at lunchtime when hundreds of students stream video. Explain how dividing it into subnets could reduce congestion. A2.2-033 Tap to flip A2.2.4 Exam question [4 marks] A school's single network slows badly at lunchtime when hundreds of students stream video. Explain how dividing it into subnets could reduce congestion. Broadcasts are confined to a smaller subnet, so each device gets fewer broadcasts and bandwidth is freed .Student streaming stays in its own subnet , so staff traffic is not slowed by it. Collisions and broadcast storms are isolated within one subnet instead of affecting the whole LAN.QoS rules can give critical traffic priority over less important traffic.Less competition for bandwidth gives a more stable, faster network. Exam tip Use point plus expansion: 'fewer broadcasts' (point), 'so bandwidth is freed for real data' (expansion).A2.2-033 Tap to flip back
33 / 38
A2.2.4 Explain How does network segmentation help an organisation manage its network resources efficiently? A2.2-034 Tap to flip A2.2.4 Explain How does network segmentation help an organisation manage its network resources efficiently? Resources can be grouped by department or function , each with its own rules and policies . A busy segment can be upgraded on its own , which is cheaper than upgrading everything. New segments can be added without disrupting existing ones, so the network scales . Monitoring and fault-finding are easier: a problem is traced to one segment and its address range.Exam tip Performance, security, congestion and management are four separate guide reasons. Have one point ready for each.A2.2-034 Tap to flip back
34 / 38
A2.2.4 Definition What is subnetting? A2.2-035 Tap to flip A2.2.4 Definition What is subnetting? Dividing one IP network into smaller logical networks (subnets) . A subnet mask sets which bits of an IP address identify the network and which identify the host . Devices in different subnets communicate through a router .Exam tip Same network portion means same subnet, so devices talk directly; a different network portion means traffic goes via a router.A2.2-035 Tap to flip back
35 / 38
A2.2.4 Definition What is a virtual local area network (VLAN)? A2.2-036 Tap to flip A2.2.4 Definition What is a virtual local area network (VLAN)? A logical group of devices, configured on switches , that behaves as a separate LAN regardless of the devices' physical location or which switch they use. Different VLANs communicate only through a router (or a switch with routing features). Exam tip Virtual means set up in configuration: one physical switch can host several VLANs with no new cabling.A2.2-036 Tap to flip back
36 / 38
A2.2.4 Compare How do physical segmenting, subnetting and VLANs differ as ways to divide a network? A2.2-037 Tap to flip A2.2.4 Compare How do physical segmenting, subnetting and VLANs differ as ways to divide a network? Physical segmenting : separate cabling and hardware (switches, routers, firewalls) per segment; strong separation but costly and inflexible.Subnetting : logical division by IP address ranges using a subnet mask ; routers control traffic between subnets.VLANs : logical groups configured on switches by port or function, independent of location ; no rewiring needed.They are often combined: one subnet per VLAN . Exam tip Subnet is an IP addressing idea; VLAN is a switch configuration idea. They tackle similar problems at different layers.A2.2-037 Tap to flip back
37 / 38
A2.2.4 Apply it A clinic's reception PCs, guest Wi-Fi and patient-record PCs share one switch, with no budget for new hardware. How should it separate them, and why? A2.2-038 Tap to flip A2.2.4 Apply it A clinic's reception PCs, guest Wi-Fi and patient-record PCs share one switch, with no budget for new hardware. How should it separate them, and why? Configure separate VLANs on the existing switch (reception, guests, patient records): No new hardware or cabling : only switch configuration.Security : guests cannot reach patient records unless inter-VLAN rules allow it.Performance : each VLAN is a smaller broadcast domain , so less broadcast traffic.Each group can get its own access and QoS policies . Exam tip Link each benefit to the clinic: protecting patient data is the strongest reason here.A2.2-038 Tap to flip back
38 / 38
Tip: click the card, then use the arrow keys to flip and move through the deck.
A2.3 Data transmissions IP addressing comes first: IPv4 against IPv6, public against private, static against dynamic, and how NAT lets a household share one public address. Then fibre optic, twisted pair and wireless are compared on bandwidth, cost, interference, attenuation and security, and packet switching is tested, including what happens when packet 4 of 6 goes missing. HL cards cover routing tables and static against dynamic routing, a second "static and dynamic" pair to keep apart. The deck has 39 cards, 9 of them HL.
Read the full A2.3 revision guide for worked NAT and packet reassembly examples.
A2.3 Data transmissions 39 cards · 9 HL
A2.3.1 Definition What is an IP address? A2.3-001 Tap to flip A2.3.1 Definition What is an IP address? A logical numerical address given to each device on a network that uses the Internet Protocol. It identifies the device and its network so that packets can be routed and delivered to it. Exam tip Logical means assigned by software and changeable. A MAC address is different: a physical address fixed in the network card.A2.3-001 Tap to flip back
1 / 39
A2.3.1 Definition What are the size, the notation and the approximate number of possible addresses of IPv4? A2.3-002 Tap to flip A2.3.1 Definition What are the size, the notation and the approximate number of possible addresses of IPv4? 32 bits longWritten in dotted decimal : four numbers from 0 to 255 separated by dots, e.g. 192.168.1.10 About 4.3 billion (2^32) possible addresses Exam tip Each of the four numbers is one byte (8 bits), which is why none can be bigger than 255.A2.3-002 Tap to flip back
2 / 39
A2.3.1 Definition How is an IPv6 address structured and written, and how many addresses does IPv6 provide? A2.3-003 Tap to flip A2.3.1 Definition How is an IPv6 address structured and written, and how many addresses does IPv6 provide? 128 bits longWritten in hexadecimal : eight groups of four hex digits, with colons between the groups, e.g. 2001:0db8:85a3:0000:0000:8a2e:0370:7334 About 3.4 x 10^38 (2^128) addresses, so it will not run out Exam tip '::' can stand for a run of all-zero groups, but if asked for a full address, write all eight groups.A2.3-003 Tap to flip back
3 / 39
A2.3.1 Compare Give four differences between IPv4 and IPv6 addresses. A2.3-004 Tap to flip A2.3.1 Compare Give four differences between IPv4 and IPv6 addresses. Length : IPv4 addresses are 32 bits , whereas IPv6 addresses are 128 bits Notation : IPv4 uses dotted decimal (four numbers, 0 to 255); IPv6 uses eight groups of hexadecimal separated by colons Supply : IPv4's 4.3 billion addresses have run out ; IPv6's 3.4 x 10^38 are effectively unlimited NAT : IPv4 networks rely on NAT to share public addresses; IPv6 can give every device its own public address Exam tip Each point must name both versions. 'IPv6 is bigger' is too vague: say 128 bits versus 32 bits.A2.3-004 Tap to flip back
4 / 39
A2.3.1 Exam question [3 marks] The number of internet-connected devices keeps rising. Outline why this has driven the move from IPv4 to IPv6. A2.3-005 Tap to flip A2.3.1 Exam question [3 marks] The number of internet-connected devices keeps rising. Outline why this has driven the move from IPv4 to IPv6. Every device reachable on the internet needs a unique public IP address IPv4's 32 bits allow only about 4.3 billion addresses Growth in smartphones and IoT devices has exhausted the IPv4 supply IPv6's 128 bits give about 3.4 x 10^38 addresses, ending the shortage and reducing reliance on workarounds such as NAT Exam tip Link bits to quantity: n bits give 2^n addresses. Comparing 2^32 with 2^128 is a quick way to secure a mark.A2.3-005 Tap to flip back
5 / 39
A2.3.1 Compare Compare public and private IP addresses. A2.3-006 Tap to flip A2.3.1 Compare Compare public and private IP addresses. Public addresses are globally unique , whereas private ones are unique only within their LAN and reused by countless networks Public addresses are routable on the internet ; private addresses are not , so they reach it through NAT on the router Public addresses are allocated through the ISP ; private ones come from reserved ranges (10.x.x.x, 172.16.x.x to 172.31.x.x, 192.168.x.x) Public suits servers reached from outside; private suits home and office devices Exam tip Make every point a contrast ('whereas'). Describing only one type cannot earn a 'distinguish' or 'compare' mark.A2.3-006 Tap to flip back
6 / 39
A2.3.1 Compare Compare static and dynamic IP addresses, including a drawback of each. A2.3-007 Tap to flip A2.3.1 Compare Compare static and dynamic IP addresses, including a drawback of each. Static : configured manually and stays the same , so devices such as servers and printers can always be found; drawback: setting up many by hand is slow and error-prone Dynamic : leased automatically by a DHCP server from a pool and may change on reconnection, so addresses are reused efficiently; drawback: unsuitable for hosting services and relies on the DHCP serverExam tip Do not mix these up with static and dynamic routing: same words, completely different ideas.A2.3-007 Tap to flip back
7 / 39
A2.3.1 Definition What does NAT stand for, what does it do, and which device usually performs it? A2.3-008 Tap to flip A2.3.1 Definition What does NAT stand for, what does it do, and which device usually performs it? Network address translation : converting the private IP addresses of LAN devices to a public IP address (and back for replies), so many devices share one public address . It is usually performed by the router linking the LAN to the internet.Exam tip NAT solves two problems at once: it saves scarce IPv4 addresses and lets non-routable private devices use the internet.A2.3-008 Tap to flip back
8 / 39
A2.3.1 Process Outline how NAT lets several devices on a home network share one public IP address. A2.3-009 Tap to flip A2.3.1 Process Outline how NAT lets several devices on a home network share one public IP address. Each device has its own private IP address On outgoing packets, the router swaps the private source address and port for its public IP and a unique port It records this mapping in a NAT table Replies arrive at the public IP; the router looks up the port and forwards them to the right device One public address serves every device, conserving IPv4 addresses Exam tip Every reply arrives at the same public address, so the port number is what tells the router which device it belongs to.A2.3-009 Tap to flip back
9 / 39
A2.3.1 Apply it A school hosts its website on its own server and has 300 student laptops on Wi-Fi. Suggest suitable IP addressing for each, with reasons. A2.3-010 Tap to flip A2.3.1 Apply it A school hosts its website on its own server and has 300 student laptops on Wi-Fi. Suggest suitable IP addressing for each, with reasons. Server : a static address that is publicly reachable , so its DNS record always points to it and visitors can always find itLaptops : dynamic private addresses leased by DHCP , so no manual set-up is needed and addresses are reused as laptops come and goLaptops reach the internet through NAT , sharing the school's public IP address Exam tip Justify each choice with a consequence ('so that...'). Naming the address type alone earns little.A2.3-010 Tap to flip back
10 / 39
A2.3.2 Definition What is fibre optic cable, and how does it carry data? A2.3-011 Tap to flip A2.3.2 Definition What is fibre optic cable, and how does it carry data? A cable made of thin glass or plastic fibres that carries data as pulses of light , kept inside the core by total internal reflection . It offers very high bandwidth over long distances and is immune to electromagnetic interference . Exam tip Light, not electricity: this one fact explains fibre's immunity to interference, its low attenuation and why it is so hard to tap.A2.3-011 Tap to flip back
11 / 39
A2.3.2 Definition What is twisted pair cable, and why are its wires twisted? A2.3-012 Tap to flip A2.3.2 Definition What is twisted pair cable, and why are its wires twisted? Copper cable containing pairs of insulated wires twisted together , carrying data as electrical signals . The twisting reduces electromagnetic interference and crosstalk between pairs. It is standard Ethernet LAN cable (e.g. Cat5e, Cat6), as UTP (unshielded) or STP (shielded). Exam tip STP's extra shielding suits electrically noisy places such as factories, but it costs more and is harder to install.A2.3-012 Tap to flip back
12 / 39
A2.3.2 Definition How does wireless transmission send data, and what are some common examples? A2.3-013 Tap to flip A2.3.2 Definition How does wireless transmission send data, and what are some common examples? Data travels through the air as electromagnetic waves , mainly radio waves , between devices and an access point or mast, with no cable . Examples include Wi-Fi , Bluetooth and cellular networks (4G, 5G). Exam tip Radio waves spread in all directions. That explains wireless's main weaknesses: shared bandwidth, interference and easy interception.A2.3-013 Tap to flip back
13 / 39
A2.3.2 Definition Define bandwidth in the context of a transmission medium. A2.3-014 Tap to flip A2.3.2 Definition Define bandwidth in the context of a transmission medium. The maximum rate at which data can be transmitted over a connection, measured in bits per second (e.g. Mbit/s, Gbit/s). Fibre generally offers the most, then twisted pair, with wireless lowest because its bandwidth is shared between users. Exam tip Bandwidth is capacity, not actual speed. Real throughput is usually lower because of congestion, distance and interference.A2.3-014 Tap to flip back
14 / 39
A2.3.2 Definition What is attenuation, and how does it limit the range of each transmission medium? A2.3-015 Tap to flip A2.3.2 Definition What is attenuation, and how does it limit the range of each transmission medium? The loss of signal strength as a signal travels further. Fibre : very low, allowing links of many kilometres. Twisted pair : higher, so about 100 m per run before a repeater is needed. Wireless : fades fast with distance and walls . Exam tip Attenuation sets range: the faster a medium loses strength, the sooner its signal must be boosted.A2.3-015 Tap to flip back
15 / 39
A2.3.2 Compare Compare fibre optic, twisted pair and wireless on cost and complexity of installation. A2.3-016 Tap to flip A2.3.2 Compare Compare fibre optic, twisted pair and wireless on cost and complexity of installation. Fibre : the most expensive cable and equipment, and the hardest to install : fragile, needing specialist tools and skills to join and terminateTwisted pair : cheap and widely available; simple to fit with standard tools, though a cable must reach every deskWireless : no cabling cost, just access points and configuration, so the quickest and least disruptive to set up and extendExam tip In 'justify' answers, cost and installation usually count against fibre: mention them as a trade-off you have weighed.A2.3-016 Tap to flip back
16 / 39
A2.3.2 Compare Compare how susceptible fibre optic, twisted pair and wireless are to interference. A2.3-017 Tap to flip A2.3.2 Compare Compare how susceptible fibre optic, twisted pair and wireless are to interference. Fibre : immune to electromagnetic and radio interference, because it carries light , not electricityTwisted pair : affected by EMI from motors, power cables and machinery; twisting (and STP shielding) reduces but does not remove itWireless : the most susceptible : other wireless networks, devices such as microwave ovens, and walls and obstacles all disrupt the signalExam tip Fibre is the go-to answer for factories and other electrically noisy sites.A2.3-017 Tap to flip back
17 / 39
A2.3.2 Compare Rank fibre optic, twisted pair and wireless from most to least secure, giving a reason for each. A2.3-018 Tap to flip A2.3.2 Compare Rank fibre optic, twisted pair and wireless from most to least secure, giving a reason for each. Fibre : most secure; it emits no electromagnetic signal , and tapping it causes a detectable loss of light Twisted pair : an attacker needs physical access to the cable, though copper can be tappedWireless : least secure; signals spread beyond the building , so anyone in range can try to intercept them, making encryption (e.g. WPA3) essentialExam tip Do not claim wireless cannot be secured: strong encryption protects it. It is simply the easiest medium to intercept.A2.3-018 Tap to flip back
18 / 39
A2.3.2 Explain Explain the main advantages and disadvantages of wireless transmission compared with cabled connections. A2.3-019 Tap to flip A2.3.2 Explain Explain the main advantages and disadvantages of wireless transmission compared with cabled connections. Advantages: Mobility : users can connect anywhere in range, on their own devicesNo cabling , so adding users is cheap and quickDisadvantages: Shared bandwidth , so speed drops as more users connectSignal weakens with distance, walls and interference , so coverage and speed vary Signals spread beyond the building, so they can be intercepted unless encrypted Exam tip For 'why is Wi-Fi slow?', give a factor plus its effect: 'many users share the bandwidth, so each gets less'.A2.3-019 Tap to flip back
19 / 39
A2.3.2 Apply it A small office on a tight budget needs wired connections for 20 desks in one room. Should it use fibre or twisted pair? Justify. A2.3-020 Tap to flip A2.3.2 Apply it A small office on a tight budget needs wired connections for 20 desks in one room. Should it use fibre or twisted pair? Justify. Twisted pair (e.g. Cat6):Much cheaper cable and network cards than fibreEasy to install and terminate with standard toolsEvery run is well under 100 m , so attenuation is not a problem Bandwidth is ample for office workFibre's strengths (long range, immunity to interference) would add cost without benefit here. Exam tip Tie the choice to the scenario's details (distance, budget, environment). Generic advantages earn little in 'justify' questions.A2.3-020 Tap to flip back
20 / 39
A2.3.2 Exam question [3 marks] Two school buildings 600 m apart need a fast network link. List three advantages of fibre optic cable over twisted pair for this link. A2.3-021 Tap to flip A2.3.2 Exam question [3 marks] Two school buildings 600 m apart need a fast network link. List three advantages of fibre optic cable over twisted pair for this link. Higher bandwidth (faster transmission)Lower attenuation : spans 600 m without repeaters, while twisted pair is limited to about 100 m per runImmune to electromagnetic interference Harder to tap , so more secureMore durable with a longer lifespan, and easier to upgrade to higher speeds Exam tip 'List' needs brief, distinct points. 'Faster', 'quicker' and 'higher speed' all count as one single point.A2.3-021 Tap to flip back
21 / 39
A2.3.2 Exam question [4 marks] A café is deciding between cabled connections and Wi-Fi for its card-payment tills. Distinguish between the reliability of the two options. A2.3-022 Tap to flip A2.3.2 Exam question [4 marks] A café is deciding between cabled connections and Wi-Fi for its card-payment tills. Distinguish between the reliability of the two options. Wi-Fi weakens with distance from the access point and through walls , whereas a cable gives a steady signal along its length Wi-Fi suffers interference from other networks and devices; twisted pair is far less affected Wi-Fi bandwidth is shared with customers, so it slows at busy times; each cabled till has a dedicated link A cable fails only if damaged or unplugged , whereas Wi-Fi can drop out unpredictably Exam tip Reliability is not security: mark schemes for this type of question reject points about interception.A2.3-022 Tap to flip back
22 / 39
A2.3.3 Definition What is packet switching? A2.3-023 Tap to flip A2.3.3 Definition What is packet switching? A method of sending data across a shared network by splitting it into packets that are sent independently , possibly by different routes , and reassembled in order at the destination. No dedicated path is reserved for the transmission. Exam tip Circuit switching (like an old phone call) reserves one path throughout. Packet switching reserves nothing, which is why it is efficient.A2.3-023 Tap to flip back
23 / 39
A2.3.3 Definition What is a data packet, and what are its main parts? A2.3-024 Tap to flip A2.3.3 Definition What is a data packet, and what are its main parts? A small, fixed-format unit of data sent across a network, made of: Header : control information, e.g. source and destination IP addresses , sequence number , time to livePayload : a chunk of the actual data Trailer : an error-check value (e.g. checksum)Exam tip Naming 'header, payload, trailer' alone earns little. Say what each part holds.A2.3-024 Tap to flip back
24 / 39
A2.3.3 Explain Why does each packet carry its own source address, destination address, sequence number and error-check value? A2.3-025 Tap to flip A2.3.3 Explain Why does each packet carry its own source address, destination address, sequence number and error-check value? Destination IP : so every router can forward the packet independently towards its targetSource IP : so the receiver knows where to send acknowledgements , replies or resend requests Sequence number : so packets that arrive out of order can be reassembled correctly Error-check value (e.g. checksum): so corrupted packets can be detected and resentExam tip This is the guide's 'independently transmitting control information': each packet carries everything needed to route and rebuild it.A2.3-025 Tap to flip back
25 / 39
A2.3.3 Explain Explain two benefits of sending data by packet switching rather than over a single reserved path. A2.3-026 Tap to flip A2.3.3 Explain Explain two benefits of sending data by packet switching rather than over a single reserved path. Efficient use of capacity : no link is reserved for one transmission, so packets from many users share the same links and capacity is not left idleResilience : if a link or router fails, packets are rerouted along another path, so the data still arrivesAlso: a lost or damaged packet is resent on its own, so the whole file need not be resent Exam tip 'Explain' needs the reason: not just 'efficient', but why (no path is reserved, so links are shared).A2.3-026 Tap to flip back
26 / 39
A2.3.3 Exam question [4 marks] A student uploads a large video file to a server in another country. Describe how packet switching delivers the file. A2.3-027 Tap to flip A2.3.3 Exam question [4 marks] A student uploads a large video file to a server in another country. Describe how packet switching delivers the file. The file is split into packets Each packet gets a header with source and destination IP addresses and a sequence number Packets travel independently ; routers forward each along the best available path, so they may take different routes Packets are error-checked ; missing or damaged ones are requested again The server reassembles the packets in order using the sequence numbers Exam tip Never say all packets follow the same route. Independent routing is the defining feature of packet switching.A2.3-027 Tap to flip back
27 / 39
A2.3.3 Apply it Packets 1 to 6 of a file are sent. 1, 3, 2, 6 and 5 arrive; 4 is lost. How does the receiver respond? A2.3-028 Tap to flip A2.3.3 Apply it Packets 1 to 6 of a file are sent. 1, 3, 2, 6 and 5 arrive; 4 is lost. How does the receiver respond? It holds the packets and uses their sequence numbers to put them in order (1, 2, 3, 5, 6) The gap in the sequence (or no acknowledgement before a timeout) shows that packet 4 is missing Packet 4 is requested again and retransmitted by the sender Once it arrives and passes its error check , the file is reassembled in full Exam tip Out-of-order arrival is normal in packet switching, not an error. Only missing or corrupted packets need resending.A2.3-028 Tap to flip back
28 / 39
A2.3.3 Compare Compare the roles of a switch and a router in packet switching. A2.3-029 Tap to flip A2.3.3 Compare Compare the roles of a switch and a router in packet switching. A switch forwards data within a local network , whereas a router forwards packets between networks A switch uses the destination MAC address and its MAC address table ; a router uses the destination IP address and its routing table A switch sends data only to the port of the intended device; a router chooses the best next hop towards the destination and can route around failures Exam tip Answers that describe only one device are capped. Make every point name both, linked by 'whereas'.A2.3-029 Tap to flip back
29 / 39
A2.3.3 Process Explain step by step how a switch forwards an incoming frame to the correct device on a LAN. A2.3-030 Tap to flip A2.3.3 Process Explain step by step how a switch forwards an incoming frame to the correct device on a LAN. A frame arrives on a port; the switch records its source MAC address against that port in its MAC address table It reads the frame's destination MAC address It looks up that address in the table If found, it forwards the frame only out of the matching port If not found, it floods the frame out of all other ports Exam tip The table fills itself from source addresses, so flooding happens only until the switch has learned where each device is.A2.3-030 Tap to flip back
30 / 39
A2.3.4 Definition HL What is a routing table? A2.3-031 Tap to flip A2.3.4 Definition HL What is a routing table? A table stored in a router that lists destination networks and, for each, the next hop (next router) or exit interface to use. The router consults it for every packet; a default route covers destinations with no matching entry. Exam tip A router never knows the whole path, only the next hop. Each router along the way makes its own decision.A2.3-031 Tap to flip back
31 / 39
A2.3.4 Process HL Outline how static routing moves a packet from one LAN to another. A2.3-032 Tap to flip A2.3.4 Process HL Outline how static routing moves a packet from one LAN to another. An administrator manually enters each route (destination network, subnet mask, next hop or exit interface) in the routing table ; routes stay fixed until edited The router reads an arriving packet's destination IP address It looks for a matching route If found, it forwards the packet to that next hop or interface If not, it uses the default route , or drops the packet if none exists Exam tip Routers using static routes never exchange route information with each other. That is the key difference from dynamic routing.A2.3-032 Tap to flip back
32 / 39
A2.3.4 Process HL Outline how dynamic routing keeps routers' routing tables up to date. A2.3-033 Tap to flip A2.3.4 Process HL Outline how dynamic routing keeps routers' routing tables up to date. Each router runs a routing protocol Routers exchange routing updates with neighbouring routers, learning which networks exist and how to reach them Each router works out the best path to every destination using metrics (e.g. hop count, bandwidth, delay) and updates its table automatically When a link fails or is added , updates spread, routes are recalculated and the network converges on new paths Exam tip You do not need to explain any specific routing protocol (such as RIP, OSPF or BGP): the guide puts this beyond scope.A2.3-033 Tap to flip back
33 / 39
A2.3.4 Definition HL In dynamic routing, what is convergence and why does it matter? A2.3-034 Tap to flip A2.3.4 Definition HL In dynamic routing, what is convergence and why does it matter? The process, and the time taken, for all routers to learn of a network change and agree on a consistent set of routes . Until convergence is complete, packets may be lost or misrouted , so faster convergence means less disruption. Exam tip Think of convergence as the network settling down after a change: the shorter the settling time, the better.A2.3-034 Tap to flip back
34 / 39
A2.3.4 Explain HL Explain the advantages and disadvantages of static routing. A2.3-035 Tap to flip A2.3.4 Explain HL Explain the advantages and disadvantages of static routing. Advantages: Predictable : packets always follow the configured routesLow resource use : no routing updates, so no extra CPU, memory or bandwidthMore secure : only routes the administrator allows existDisadvantages: Manual : every change is entered by hand, which becomes slow and error-prone as the network grows (poor scalability )Does not adapt : if a link fails, traffic is not rerouted, causing downtimeExam tip Static routing is the sensible choice for a small network with one way out, such as a single office with one internet link.A2.3-035 Tap to flip back
35 / 39
A2.3.4 Explain HL Explain the advantages and disadvantages of dynamic routing. A2.3-036 Tap to flip A2.3.4 Explain HL Explain the advantages and disadvantages of dynamic routing. Advantages: Adapts automatically to failed or new links by finding new paths, so availability improvesScales well : new networks are learned without reconfiguring every routerCan pick the most efficient route using metrics Disadvantages: Uses router CPU, memory and bandwidth for updates, and is more complex to configure Convergence delays and unprotected route updates (a security risk) can disrupt trafficExam tip Learn advantages and disadvantages in pairs: automatic adaptation costs resources; scalability costs complexity.A2.3-036 Tap to flip back
36 / 39
A2.3.4 Compare HL Compare static and dynamic routing in terms of configuration, maintenance, complexity and resource usage. A2.3-037 Tap to flip A2.3.4 Compare HL Compare static and dynamic routing in terms of configuration, maintenance, complexity and resource usage. Configuration : static routes are typed in manually ; dynamic routes are learned automatically through routing protocolsMaintenance : static needs a manual update for every change ; dynamic adapts by itself Complexity : static is simple for small networks but unmanageable when large; dynamic is harder to set up but copes well with large networksResource usage : static uses minimal CPU, memory and bandwidth; dynamic uses more , for exchanging updatesExam tip These factors come straight from the guide, so expect them in questions. Make each point mention both static and dynamic.A2.3-037 Tap to flip back
37 / 39
A2.3.4 Compare HL Compare static and dynamic routing in terms of convergence, scalability and suitable network size. A2.3-038 Tap to flip A2.3.4 Compare HL Compare static and dynamic routing in terms of convergence, scalability and suitable network size. Convergence : does not apply to static routing, as routes never adjust themselves; dynamic routers converge on new routes after a change, faster or slower depending on the protocolScalability : static scales poorly ; dynamic scales well Network size : static suits small, stable networks with few changes; dynamic suits medium to large or high-availability networksExam tip Convergence applies only to dynamic routing. For static routing, say it is not applicable, because routes never change by themselves.A2.3-038 Tap to flip back
38 / 39
A2.3.4 Exam question [4 marks] HL A company is growing from one office to twelve, linked by routers with backup connections. Explain why dynamic routing suits it better than static. A2.3-039 Tap to flip A2.3.4 Exam question [4 marks] HL A company is growing from one office to twelve, linked by routers with backup connections. Explain why dynamic routing suits it better than static. With many routers, manual static configuration would be slow and error-prone , whereas dynamic routers build their tables automatically New offices are learned through routing updates, so the network scales without reconfiguring every routerIf a link fails, dynamic routing reroutes over the backup connections once the network converges ; static routes would not adapt Extra router resources and set-up complexity are a worthwhile trade-off at this size Exam tip Link every point to the scenario (growth, backup links). Generic advantages of dynamic routing score less.A2.3-039 Tap to flip back
39 / 39
Tip: click the card, then use the arrow keys to flip and move through the deck.
A2.4 Network security SL cards prepare you to discuss firewalls: rule sets, whitelists and blacklists, stateful inspection, NAT and what a firewall cannot stop. They also cover symmetric and asymmetric encryption, public and private keys, key management and digital certificates in an HTTPS connection. HL cards describe ten vulnerabilities, from DDoS and SQL injection to zero-day exploits, and match countermeasures such as MFA, IDS, IPS and input validation to realistic attacks. The deck has 46 cards, 26 of them HL.
Read the full A2.4 revision guide for a step-by-step HTTPS login example.
A2.4 Network security 46 cards · 26 HL
A2.4.1 Definition In network security, what is a firewall? A2.4-001 Tap to flip A2.4.1 Definition In network security, what is a firewall? Hardware or software that monitors incoming and outgoing network traffic and allows or blocks each packet according to a set of security rules , to prevent unauthorised access to a network or device.Exam tip Always say both directions: incoming AND outgoing. A hardware firewall guards a whole network; a software firewall protects one device.A2.4-001 Tap to flip back
1 / 46
A2.4.1 Process How does a firewall use its rule set to decide what happens to a packet? A2.4-002 Tap to flip A2.4.1 Process How does a firewall use its rule set to decide what happens to a packet? Reads the packet header: source and destination IP address , port number and protocol (e.g. TCP or UDP). Compares it with the rules in priority order . Applies the action of the first matching rule : allow or drop . If no rule matches, a default rule applies, usually deny . Exam tip Port numbers identify services: blocking port 23 blocks Telnet. Order matters, so an early 'allow all' rule overrides every rule below it.A2.4-002 Tap to flip back
2 / 46
A2.4.1 Compare How does a firewall whitelist differ from a firewall blacklist? A2.4-003 Tap to flip A2.4.1 Compare How does a firewall whitelist differ from a firewall blacklist? A whitelist (allow list) permits only the listed IP addresses, domains or applications and blocks the rest; a blacklist (block list) blocks only listed sources and allows the rest. A whitelist is more secure , as unknown threats are blocked by default; a blacklist cannot stop new threats not yet listed. A whitelist needs more maintenance and can block legitimate traffic; a blacklist is easier to run. Exam tip Memory hook: whitelist = default deny, blacklist = default allow.A2.4-003 Tap to flip back
3 / 46
A2.4.1 Explain Why should a firewall filter outgoing traffic as well as incoming traffic? A2.4-004 Tap to flip A2.4.1 Explain Why should a firewall filter outgoing traffic as well as incoming traffic? Malware already inside the network may try to send stolen data out or contact the attacker's control server ; outbound rules can block this. It stops an infected device being used to attack other networks , e.g. as part of a botnet. It enforces organisational policy by blocking banned sites, services or applications . Exam tip Many answers mention only incoming traffic. Outbound filtering is what limits the damage once something has got inside.A2.4-004 Tap to flip back
4 / 46
A2.4.1 Compare How does a stateful inspection firewall differ from a basic packet-filtering firewall? A2.4-005 Tap to flip A2.4.1 Compare How does a stateful inspection firewall differ from a basic packet-filtering firewall? A packet-filtering firewall judges each packet on its own against header rules (IP address, port, protocol); a stateful firewall also tracks active connections in a state table. A stateful firewall accepts a reply packet only if it matches a connection in its state table , so forged or unrequested packets that a header-only rule would let through are dropped . Stateful inspection needs more memory and processing. Exam tip Application-layer (next-generation) firewalls go further still: they inspect packet contents, not just headers.A2.4-005 Tap to flip back
5 / 46
A2.4.1 Explain How does NAT on a home or office router make the devices on a LAN harder to attack? A2.4-006 Tap to flip A2.4.1 Explain How does NAT on a home or office router make the devices on a LAN harder to attack? It replaces devices' private IP addresses with the router's single public IP address , so internal addresses are hidden from the internet. Outsiders therefore cannot directly address an internal device. Unsolicited inbound packets have no matching entry in the NAT table , so the router drops them.Administrators decide exactly which traffic is forwarded to which internal device. Exam tip NAT was designed to save IPv4 addresses. It adds a layer of security but does not replace a firewall.A2.4-006 Tap to flip back
6 / 46
A2.4.1 Explain What are the main strengths of a firewall as a form of network protection? A2.4-007 Tap to flip A2.4.1 Explain What are the main strengths of a firewall as a form of network protection? Access control : only traffic its rules allow (by IP address, port, protocol or application) gets in or out, blocking unauthorised access Blocks unsolicited inbound connections , so internal devices cannot be reached directly One central point applies the same rules to every device behind itLogs traffic and raises alerts , helping administrators detect attacksFilters outgoing traffic, limiting data leaks and malware contacting its controller Exam tip In 'discuss' answers, pair each strength with a limitation: central control, for example, does nothing against threats already inside.A2.4-007 Tap to flip back
7 / 46
A2.4.1 Explain What are the main limitations of a firewall as a form of network protection? A2.4-008 Tap to flip A2.4.1 Explain What are the main limitations of a firewall as a form of network protection? Cannot stop insider threats or malware already inside the network. Cannot stop phishing , or malware arriving through allowed channels (email, web downloads) or on USB drives . Cannot inspect encrypted traffic unless it decrypts it. Only as good as its rules : misconfiguration leaves gaps, and new (zero-day) attacks may match no rule. Deep inspection adds latency ; laptops used off-site are outside a perimeter firewall's protection. Exam tip This is why networks use defence in depth: firewalls layered with patching, IDS/IPS, antivirus and staff training.A2.4-008 Tap to flip back
8 / 46
A2.4.1 Exam question [6 marks] A small company relies only on a perimeter firewall to secure its network. Discuss whether this provides effective protection. A2.4-009 Tap to flip A2.4.1 Exam question [6 marks] A small company relies only on a perimeter firewall to secure its network. Discuss whether this provides effective protection. Strengths: blocks unsolicited inbound traffic and unauthorised IPs, ports and protocols; filters outgoing traffic to limit data leaks; logs and alerts from one central point.Limitations: no defence against insiders or phishing ; malware can arrive in allowed or encrypted traffic; misconfigured or outdated rules leave gaps; remote laptops sit outside it.Conclusion: necessary but not sufficient : effective only as one layer of defence in depth .Exam tip Discuss means both sides plus a judgement. One-sided answers are capped, so always end with a reasoned conclusion.A2.4-009 Tap to flip back
9 / 46
A2.4.2 Definition HL What is a distributed denial of service (DDoS) attack? A2.4-010 Tap to flip A2.4.2 Definition HL What is a distributed denial of service (DDoS) attack? An attack in which many compromised devices (a botnet ) flood a server or network with traffic at the same time, overwhelming its bandwidth or processing so that legitimate users cannot access the service. Exam tip DoS comes from one source; DDoS from many, so blocking a single IP address does not stop it.A2.4-010 Tap to flip back
10 / 46
A2.4.2 Definition HL What is malware? A2.4-011 Tap to flip A2.4.2 Definition HL What is malware? Malicious software designed to damage or disrupt systems, steal data or gain unauthorised access . Types include viruses , worms , trojans (disguised as legitimate software), ransomware (encrypts files and demands payment) and spyware (secretly collects data).Exam tip Virus vs worm: a virus needs a host file and a user to run it; a worm spreads across networks by itself.A2.4-011 Tap to flip back
11 / 46
A2.4.2 Definition HL What is a man-in-the-middle (MitM) attack? A2.4-012 Tap to flip A2.4.2 Definition HL What is a man-in-the-middle (MitM) attack? An attack in which an attacker secretly intercepts the communication between two parties, and may read or alter it, while both parties believe they are communicating directly with each other. Exam tip Classic setting: a fake public Wi-Fi hotspot. Encryption plus certificate checks (HTTPS) defeat it.A2.4-012 Tap to flip back
12 / 46
A2.4.2 Definition HL What is a phishing attack? A2.4-013 Tap to flip A2.4.2 Definition HL What is a phishing attack? A social engineering attack using fraudulent messages (emails, texts or fake websites) that pretend to come from a trusted organisation to trick people into revealing credentials or financial details, or installing malware . Exam tip Phishing targets people, not technology, so a firewall rarely stops it. Email filtering and staff training do.A2.4-013 Tap to flip back
13 / 46
A2.4.2 Definition HL What is cross-site scripting (XSS)? A2.4-014 Tap to flip A2.4.2 Definition HL What is cross-site scripting (XSS)? An attack in which malicious script (usually JavaScript) is injected into a trusted website , e.g. in a comment, so that it runs in other users' browsers when they view the page, for example to steal session cookies . Exam tip Don't mix up the targets: SQL injection attacks the server's database; XSS attacks other visitors' browsers.A2.4-014 Tap to flip back
14 / 46
A2.4.2 Definition HL What is meant by weak authentication as a network vulnerability? A2.4-015 Tap to flip A2.4.2 Definition HL What is meant by weak authentication as a network vulnerability? Login protection that is easy to guess, crack or bypass , e.g. short, common, default or reused passwords , single-factor login and no lockout after failed attempts, leaving accounts open to brute-force and dictionary attacks. Exam tip Link it to its fixes: complex password policies, account lockout and multifactor authentication.A2.4-015 Tap to flip back
15 / 46
A2.4.2 Explain HL Why are network protocols such as HTTP, FTP and Telnet considered insecure? A2.4-016 Tap to flip A2.4.2 Explain HL Why are network protocols such as HTTP, FTP and Telnet considered insecure? They send data, including usernames and passwords , as plaintext (unencrypted). Anyone who intercepts the packets, e.g. with a packet sniffer on shared Wi-Fi, can read them. They do not authenticate the server , so users can be fooled by an impostor. Data can be altered in transit without detection, enabling man-in-the-middle attacks. Exam tip Insecure here means unencrypted, not broken. Their secure replacements are HTTPS, SFTP and SSH.A2.4-016 Tap to flip back
16 / 46
A2.4.2 Process HL How does an SQL injection attack work? A2.4-017 Tap to flip A2.4.2 Process HL How does an SQL injection attack work? A web form (e.g. a login or search box) inserts user input directly into an SQL query . The attacker types SQL code instead of normal data, e.g. ' OR '1'='1. The database executes the attacker's code as part of the query. The attacker can bypass the login , or read, change or delete data. Exam tip Root cause: input is treated as code, not data. Fix it with input validation and parameterised queries.A2.4-017 Tap to flip back
17 / 46
A2.4.2 Compare HL How does an unpatched software vulnerability differ from a zero-day exploit? A2.4-018 Tap to flip A2.4.2 Compare HL How does an unpatched software vulnerability differ from a zero-day exploit? Unpatched software : the flaw is already known and the vendor has released a fix , but it has not been installed .Zero-day exploit : attacks a flaw unknown to the vendor , so no patch exists yet (the vendor has had 'zero days' to fix it).Unpatched software is fixed simply by updating ; zero-days need other layers, e.g. an IPS and behaviour-based detection. Exam tip Once a patch is released, attackers study it and target everyone who has not yet updated.A2.4-018 Tap to flip back
18 / 46
A2.4.2 Exam question [4 marks] HL Describe how a botnet is used to carry out a DDoS attack against an online retailer. A2.4-019 Tap to flip A2.4.2 Exam question [4 marks] HL Describe how a botnet is used to carry out a DDoS attack against an online retailer. Many computers or IoT devices are infected with malware , forming a botnet . The bots are controlled remotely by the attacker, usually without owners knowing. On command, all the bots send huge numbers of requests to the retailer's server at the same time . The server's bandwidth or processing capacity is overwhelmed . Genuine customers cannot reach the site, so sales are lost; the many source IPs make it hard to block .Exam tip Give the botnet definition first (one mark), then how it is used: coordinated flood, resources overwhelmed, legitimate users denied.A2.4-019 Tap to flip back
19 / 46
A2.4.3 Definition HL What is a content security policy (CSP)? A2.4-020 Tap to flip A2.4.3 Definition HL What is a content security policy (CSP)? A set of rules a website sends to the browser (usually in an HTTP header) listing the approved sources from which scripts , styles and images may load. The browser blocks everything else , so injected XSS scripts do not run. Exam tip CSP works in the browser; input validation works on the server. Use both against XSS.A2.4-020 Tap to flip back
20 / 46
A2.4.3 Definition HL What is a complex password policy? A2.4-021 Tap to flip A2.4.3 Definition HL What is a complex password policy? Rules enforced by the system when passwords are set, e.g. a minimum length (often 12+ characters), a mix of upper and lower case, digits and symbols , and no common or reused passwords , so passwords resist guessing and brute-force attacks. Exam tip Length matters most: every extra character multiplies the number of guesses a brute-force attack needs.A2.4-021 Tap to flip back
21 / 46
A2.4.3 Definition HL What does an email filtering solution do? A2.4-022 Tap to flip A2.4.3 Definition HL What does an email filtering solution do? It scans incoming email and blocks or quarantines spam , phishing messages and malicious attachments or links , using blacklists of known bad senders , checks for spoofed sender addresses and analysis of suspicious content. Exam tip Filters catch most phishing, not all of it. Pair them with staff training for the messages that slip through.A2.4-022 Tap to flip back
22 / 46
A2.4.3 Definition HL What is multifactor authentication (MFA)? A2.4-023 Tap to flip A2.4.3 Definition HL What is multifactor authentication (MFA)? Requiring two or more independent factors from different categories to log in: something you know (password, PIN), something you have (phone or token giving a one-time code) and something you are (fingerprint, face). Exam tip A password plus a security question is NOT MFA: both are 'something you know'.A2.4-023 Tap to flip back
23 / 46
A2.4.3 Explain HL How does installing an SSL/TLS certificate on a web server protect the site's users? A2.4-024 Tap to flip A2.4.3 Explain HL How does installing an SSL/TLS certificate on a web server protect the site's users? It lets the site use HTTPS , so traffic is encrypted and intercepted data is unreadable. Signed by a certificate authority , it proves the server's identity , so users are not fooled by a fake site or a man-in-the-middle . SSL is the deprecated predecessor of TLS ; certificates are still called 'SSL certificates' but are now used with TLS.Exam tip The padlock means the connection is encrypted and the server verified, not that the site itself is honest or malware-free.A2.4-024 Tap to flip back
24 / 46
A2.4.3 Compare HL In input validation, how does filtering differ from whitelisting? A2.4-025 Tap to flip A2.4.3 Compare HL In input validation, how does filtering differ from whitelisting? Input validation checks user input has the expected type, length and format before it is used.Filtering removes or escapes dangerous characters (e.g. quotes, <, ;) and lets the rest through; whitelisting accepts only approved characters or patterns and rejects everything else .Whitelisting is stronger : attack strings nobody anticipated are still rejected. Exam tip Both reduce SQL injection and XSS. Against SQL injection, parameterised queries (beyond the textbook) are the strongest fix.A2.4-025 Tap to flip back
25 / 46
A2.4.3 Compare HL How does an intrusion detection system (IDS) differ from an intrusion prevention system (IPS)? A2.4-026 Tap to flip A2.4.3 Compare HL How does an intrusion detection system (IDS) differ from an intrusion prevention system (IPS)? Both monitor traffic for known attack signatures or unusual behaviour . An IDS is passive : it logs and alerts administrators but does not block traffic. An IPS is active : it sits in the traffic path and automatically blocks threats, e.g. dropping packets or banning an IP address. An IPS false positive blocks legitimate traffic; an IDS false positive only raises an unneeded alert. Exam tip D for Detect (and tell); P for Prevent (and act).A2.4-026 Tap to flip back
26 / 46
A2.4.3 Explain HL Why is regularly updating software an important network countermeasure? A2.4-027 Tap to flip A2.4.3 Explain HL Why is regularly updating software an important network countermeasure? Vendors release patches that fix known security vulnerabilities . Once a flaw is public, attackers actively scan for systems that have not been updated . Patching the operating system, applications and firmware (routers, IoT devices) closes these gaps and shrinks the attack surface . Automatic updates and patch management make sure no device is missed.Exam tip Antivirus only detects malware that exploits a flaw; patching removes the flaw itself.A2.4-027 Tap to flip back
27 / 46
A2.4.3 Explain HL Why should an organisation carry out security testing regularly rather than just once? A2.4-028 Tap to flip A2.4.3 Explain HL Why should an organisation carry out security testing regularly rather than just once? Penetration testing : authorised ethical hackers simulate real attacks to find exploitable weaknesses .Vulnerability scanning : automated tools check for known flaws , missing patches and misconfigurations.New threats keep appearing and systems change (new devices, software, rules), so old results go out of date.Testing confirms countermeasures work and finds weaknesses before attackers do ; some sectors legally require it. Exam tip Answer the 'regular' part explicitly: threats and systems keep changing, so a one-off test soon goes stale.A2.4-028 Tap to flip back
28 / 46
A2.4.3 Explain HL Why is employee training an essential network security countermeasure? A2.4-029 Tap to flip A2.4.3 Explain HL Why is employee training an essential network security countermeasure? People are often the weakest link : phishing and social engineering target staff, not technology.Technical controls cannot stop an authorised user who is tricked into revealing a password or opening malware. Training teaches staff to recognise phishing , use strong passwords , handle data safely and report incidents . It must be repeated regularly , e.g. with phishing simulations , because attack methods change. Exam tip Memory hook: firewalls guard the door; training guards the people who hold the keys.A2.4-029 Tap to flip back
29 / 46
A2.4.3 Apply it HL An online shop expects a DDoS attack during its biggest annual sale. Which countermeasure should it use, and how does it help? A2.4-030 Tap to flip A2.4.3 Apply it HL An online shop expects a DDoS attack during its biggest annual sale. Which countermeasure should it use, and how does it help? Use DDoS mitigation tools (often a cloud service): Monitor traffic to detect abnormal spikes.Filter malicious requests, e.g. rate limiting each IP address and blocking known botnet sources.Spread the load across many servers (e.g. a content delivery network) to absorb the flood.Legitimate customers still get through , so sales continue.Exam tip A single firewall rule will not work: DDoS traffic comes from thousands of different IP addresses.A2.4-030 Tap to flip back
30 / 46
A2.4.3 Apply it HL A web developer manages her server with Telnet, uploads files by FTP and serves pages over HTTP. What should she switch to, and why? A2.4-031 Tap to flip A2.4.3 Apply it HL A web developer manages her server with Telnet, uploads files by FTP and serves pages over HTTP. What should she switch to, and why? SSH instead of Telnet for remote login.SFTP instead of FTP for file transfer.HTTPS instead of HTTP for web pages.These encrypted protocols send ciphertext , so intercepted passwords and data are unreadable . They also authenticate the server (keys or certificates), defeating man-in-the-middle attacks. Exam tip Remember the pairs: Telnet to SSH, FTP to SFTP, HTTP to HTTPS. The S stands for secure (encrypted).A2.4-031 Tap to flip back
31 / 46
A2.4.3 Apply it HL A sales manager connects to her company's network from airport Wi-Fi. How does a VPN protect her connection? A2.4-032 Tap to flip A2.4.3 Apply it HL A sales manager connects to her company's network from airport Wi-Fi. How does a VPN protect her connection? It creates an encrypted tunnel between her laptop and the company's VPN server across the public internet. Anyone intercepting the Wi-Fi traffic sees only ciphertext , defeating eavesdropping and man-in-the-middle attacks. She must authenticate before the tunnel opens, so only authorised users reach internal resources . Her traffic appears to come from the company, hiding her real IP address. Exam tip A VPN protects data in transit only. It does not remove malware already on the laptop.A2.4-032 Tap to flip back
32 / 46
A2.4.3 Apply it HL A cafe wants anyone to use its Wi-Fi except two devices that misused it. Should it use a MAC whitelist or a MAC blacklist? A2.4-033 Tap to flip A2.4.3 Apply it HL A cafe wants anyone to use its Wi-Fi except two devices that misused it. Should it use a MAC whitelist or a MAC blacklist? A MAC blacklist : the access point refuses the listed MAC addresses and admits all others , so new customers connect freely. A whitelist admits only listed devices, so every customer's MAC would have to be added in advance : impractical here. A whitelist suits a closed network (e.g. an office) where every device is known. Either list can be beaten by MAC spoofing . Exam tip Don't swap them: needing every authorised device's address in advance describes a whitelist, not a blacklist.A2.4-033 Tap to flip back
33 / 46
A2.4.3 Exam question [4 marks] HL A school plans to secure its staff wireless network using MAC address filtering alone. Evaluate this plan. A2.4-034 Tap to flip A2.4.3 Exam question [4 marks] HL A school plans to secure its staff wireless network using MAC address filtering alone. Evaluate this plan. Each adapter has a unique MAC address ; the access point admits only whitelisted ones, adding a layer of access control . Easy to set up for a small, known set of devices.But MAC addresses are sent unencrypted , so an attacker can sniff an allowed one and spoof it. Every new or replacement device must be added to the list . Judgement : useful, but not sufficient alone ; combine with WPA2/WPA3 encryption .Exam tip Evaluate needs strengths, weaknesses and a verdict. MAC filtering is access control, not encryption.A2.4-034 Tap to flip back
34 / 46
A2.4.3 Exam question [4 marks] HL Suggest two countermeasures an online store could use to stop attackers getting into customer accounts by guessing passwords. A2.4-035 Tap to flip A2.4.3 Exam question [4 marks] HL Suggest two countermeasures an online store could use to stop attackers getting into customer accounts by guessing passwords. Any two, each with its justification: MFA : a guessed password alone is not enough ; the attacker also needs the customer's phone or token .Account lockout or IPS : locks the account or blocks the IP after several failed attempts, stopping brute-force guessing.Complex password policy : long, mixed-character passwords take far too long to guess.Rate limiting or CAPTCHA : slows automated login attempts.Exam tip Suggest questions: name the measure AND say why it works in this scenario. Measure [1] + justification [1], twice.A2.4-035 Tap to flip back
35 / 46
A2.4.4 Definition What is encryption? A2.4-036 Tap to flip A2.4.4 Definition What is encryption? Converting plaintext into unreadable ciphertext using an algorithm and a key , so intercepted data is meaningless to anyone without the correct key to decrypt it back into plaintext. Exam tip Encryption does not stop interception; it makes intercepted data useless.A2.4-036 Tap to flip back
36 / 46
A2.4.4 Definition What is symmetric encryption? A2.4-037 Tap to flip A2.4.4 Definition What is symmetric encryption? Encryption in which the same secret key is used both to encrypt and decrypt data, so sender and receiver must both hold the key and must share it securely beforehand. Example algorithm: AES . Exam tip Memory hook: symmetric = same key at both ends.A2.4-037 Tap to flip back
37 / 46
A2.4.4 Definition What is asymmetric (public-key) encryption? A2.4-038 Tap to flip A2.4.4 Definition What is asymmetric (public-key) encryption? Encryption using a mathematically linked key pair : a public key , shared openly, and a private key , kept secret by its owner. Data encrypted with one key can only be decrypted with the other . Example: RSA . Exam tip The private key cannot practically be worked out from the public key, which is why the public key can be shared.A2.4-038 Tap to flip back
38 / 46
A2.4.4 Definition What is a digital certificate? A2.4-039 Tap to flip A2.4.4 Definition What is a digital certificate? An electronic document, issued and digitally signed by a trusted certificate authority (CA) , that binds a public key to the identity of its owner, e.g. a website's domain. It also states the issuer and a validity (expiry) period . Exam tip The CA checks the owner's identity before signing; the CA's signature is what makes the certificate trustworthy.A2.4-039 Tap to flip back
39 / 46
A2.4.4 Definition What is encryption key management? A2.4-040 Tap to flip A2.4.4 Definition What is encryption key management? The policies and processes for handling cryptographic keys securely throughout their life: generation , distribution , secure storage (access for authorised parties only), backup , rotation (regular replacement), revocation and destruction . Exam tip Think of every key as having a life cycle, from creation to destruction.A2.4-040 Tap to flip back
40 / 46
A2.4.4 Compare How does symmetric encryption differ from asymmetric encryption in keys, speed and typical use? A2.4-041 Tap to flip A2.4.4 Compare How does symmetric encryption differ from asymmetric encryption in keys, speed and typical use? Keys : symmetric uses one shared secret key ; asymmetric uses a public/private key pair .Key distribution : the symmetric key must be exchanged securely in advance; asymmetric needs only the public key shared, which can be done openly.Speed : symmetric is faster and less processor-intensive; asymmetric is slower .Use : symmetric for bulk data ; asymmetric for key exchange and digital signatures .Exam tip Make every point a contrast that names both types. HTTPS uses both: asymmetric to set up a session key, symmetric for the data.A2.4-041 Tap to flip back
41 / 46
A2.4.4 Compare What are the different roles of the public key and the private key in asymmetric cryptography? A2.4-042 Tap to flip A2.4.4 Compare What are the different roles of the public key and the private key in asymmetric cryptography? Public key : shared openly ; others use it to encrypt data for the key's owner and to verify the owner's digital signature .Private key : kept secret by the owner; used to decrypt data encrypted with the matching public key and to create digital signatures .Whatever one key encrypts, only the other can decrypt. Exam tip Confidentiality: public encrypts, private decrypts. Signatures run the other way: private signs, public verifies.A2.4-042 Tap to flip back
42 / 46
A2.4.4 Process Using asymmetric encryption, how does Ana send Ben a file that only Ben can read? A2.4-043 Tap to flip A2.4.4 Process Using asymmetric encryption, how does Ana send Ben a file that only Ben can read? Ben generates a key pair and publishes his public key ; his private key never leaves him . Ana encrypts the file with Ben's public key . Ana sends the ciphertext over the network. An interceptor cannot decrypt it, because the public key cannot reverse its own encryption. Ben decrypts it with his private key . Exam tip Encrypt with the RECIPIENT's public key. Using the sender's own key is the classic exam error.A2.4-043 Tap to flip back
43 / 46
A2.4.4 Explain Why is careful encryption key management so significant? A2.4-044 Tap to flip A2.4.4 Explain Why is careful encryption key management so significant? Encryption is only as secure as its keys : a stolen key lets attackers decrypt all data it protects or impersonate its owner. A lost key can make encrypted data permanently inaccessible . Rotation limits how much data one compromised key exposes; revocation stops a compromised key being trusted.Regulations such as GDPR expect personal data, and therefore its keys, to be protected. Exam tip Strong algorithms are public knowledge; all the secrecy lives in the key.A2.4-044 Tap to flip back
44 / 46
A2.4.4 Exam question [4 marks] Describe how a digital certificate is used when a browser sets up an HTTPS connection with a bank's website. A2.4-045 Tap to flip A2.4.4 Exam question [4 marks] Describe how a digital certificate is used when a browser sets up an HTTPS connection with a bank's website. The server sends its certificate , containing its public key . The browser verifies the CA's signature using its trusted root store . It checks the domain matches and the certificate is in date and not revoked , else it warns the user. The server's public key is used to securely agree a symmetric session key . Session data is encrypted with the session key . Exam tip Without a certificate, an attacker could hand over their own public key and impersonate the bank.A2.4-045 Tap to flip back
45 / 46
A2.4.4 Exam question [4 marks] Explain why secure web connections use asymmetric encryption at the start but symmetric encryption for the rest of the session. A2.4-046 Tap to flip A2.4.4 Exam question [4 marks] Explain why secure web connections use asymmetric encryption at the start but symmetric encryption for the rest of the session. Asymmetric encryption lets both sides agree a session key securely with no prior shared secret, solving key distribution . It also authenticates the server via its certificate. But it is slow and processor-intensive , unsuited to bulk data . The symmetric session key then encrypts all further data quickly . A new key per session means a stolen key exposes only one session . Exam tip Full marks need the reason for using asymmetric first: the safe exchange of the session key.A2.4-046 Tap to flip back
46 / 46
Tip: click the card, then use the arrow keys to flip and move through the deck.
A3 Databases flashcards Database questions reward exact vocabulary and careful SQL. The four A3 decks hold 184 cards, from keys and normal forms to ACID transactions and data warehouses.
A3.1 Database fundamentals One spec point, but a wide one: the features of relational databases plus the ten benefits and six limitations the guide names. Cards pin down primary, foreign and composite keys, referential integrity and concurrency control, and separate pairs students blur, such as integrity against consistency. Exam cards use situations like two fans buying the same concert seat at once. All 30 cards are for SL and HL.
Read the full A3.1 revision guide for a worked example of splitting a flat file into linked tables.
A3.1 Database fundamentals 30 cards
A3.1.1 Definition What is a relational database, and how are its tables connected? A3.1-001 Tap to flip A3.1.1 Definition What is a relational database, and how are its tables connected? A database that stores data in multiple tables (relations), each about one entity, linked by keys : a foreign key in one table matches the primary key of another, so related data can be combined without being repeated. Exam tip One big table holding everything is a flat file, not a relational database.A3.1-001 Tap to flip back
1 / 30
A3.1.1 Definition What is a relational database management system (RDBMS)? A3.1-002 Tap to flip A3.1.1 Definition What is a relational database management system (RDBMS)? The software that creates, stores and manages a relational database and controls access to it. Users and programs send it SQL ; it enforces keys and constraints and handles concurrent users , transactions and security , e.g. MySQL, PostgreSQL. Exam tip The database is the data and its structure; the DBMS is the software that manages it. Keep the two terms apart.A3.1-002 Tap to flip back
2 / 30
A3.1.1 Definition In a relational database, what are a table, a record and a field? A3.1-003 Tap to flip A3.1.1 Definition In a relational database, what are a table, a record and a field? Table : stores data about one type of entity, e.g. Patient.Record (row, tuple): all the data about one instance , e.g. one patient.Field (column, attribute): one property stored for every record, e.g. DateOfBirth.Exam tip Row = record = tuple; column = field = attribute. Exam papers use all three names, so learn them as sets.A3.1-003 Tap to flip back
3 / 30
A3.1.1 Definition What is a primary key? A3.1-004 Tap to flip A3.1.1 Definition What is a primary key? A field, or combination of fields, whose value uniquely identifies each record in a table. It must be unique and can never be null (empty), e.g. PatientID in a Patient table. Exam tip Names make poor primary keys because two people (or two pets) can share one. Use an ID that is guaranteed unique.A3.1-004 Tap to flip back
4 / 30
A3.1.1 Definition What is a foreign key? A3.1-005 Tap to flip A3.1.1 Definition What is a foreign key? A field in one table that holds values of the primary key of another table , creating the link (relationship) between them, e.g. OwnerID stored in the Pet table refers to OwnerID in the Owner table. Exam tip Primary key identifies a record in its own table; foreign key points to a record elsewhere. Foreign key values can repeat.A3.1-005 Tap to flip back
5 / 30
A3.1.1 Definition What is a composite key? A3.1-006 Tap to flip A3.1.1 Definition What is a composite key? A primary key made of two or more fields that are unique only in combination , used when no single field uniquely identifies a record, e.g. (CourtNo, SlotStart) in a tennis court Booking table. Exam tip Each field alone may repeat; only the combination must be unique. Older papers call this a compound key.A3.1-006 Tap to flip back
6 / 30
A3.1.1 Definition What is a relationship between tables, and what are the three types? A3.1-007 Tap to flip A3.1.1 Definition What is a relationship between tables, and what are the three types? A link between two tables , made by storing one table's primary key as a foreign key in the other. One-to-one : person and passportOne-to-many : owner and petsMany-to-many : students and courses (needs a linking table )Exam tip Many-to-many cannot be stored directly: a linking table splits it into two one-to-many relationships.A3.1-007 Tap to flip back
7 / 30
A3.1.1 Definition What is concurrency control, and why is it a benefit of a relational DBMS? A3.1-008 Tap to flip A3.1.1 Definition What is concurrency control, and why is it a benefit of a relational DBMS? The DBMS lets many users access the same data at the same time while stopping their changes from conflicting, typically by locking a record while it is updated, which prevents lost updates and keeps data consistent. Exam tip A lost update: two users read the same value, both change it, and the second save silently overwrites the first.A3.1-008 Tap to flip back
8 / 30
A3.1.1 Definition What is referential integrity? A3.1-009 Tap to flip A3.1.1 Definition What is referential integrity? The rule that every foreign key value must match an existing primary key value in the linked table (or be null), so no record refers to data that does not exist (no orphan records ). Exam tip Hook: a foreign key is a promise that the record it points to really exists.A3.1-009 Tap to flip back
9 / 30
A3.1.1 Definition What does 'reliable transaction processing' mean as a benefit of relational databases? A3.1-010 Tap to flip A3.1.1 Definition What does 'reliable transaction processing' mean as a benefit of relational databases? Related changes are grouped into one transaction that either completes fully (commit) or is undone completely (rollback) , so the database is never left half-updated, e.g. a bank transfer's debit and credit. Committed changes survive crashes . Exam tip Hook: all or nothing. Money taken from one account but never paid into the other is exactly what this prevents.A3.1-010 Tap to flip back
10 / 30
A3.1.1 Definition What is meant by community support as a benefit of a relational database? A3.1-011 Tap to flip A3.1.1 Definition What is meant by community support as a benefit of a relational database? Relational DBMSs (e.g. MySQL, PostgreSQL) are mature and widely used , so there is extensive documentation, forums, tutorials and tools , and many developers know SQL , making problems quicker to solve and staff easier to find and train. Exam tip Many relational systems are open source with active user communities, so help and fixes are often free.A3.1-011 Tap to flip back
11 / 30
A3.1.1 Explain What security features does a relational DBMS provide, and how does each one protect the data? A3.1-012 Tap to flip A3.1.1 Explain What security features does a relational DBMS provide, and how does each one protect the data? User accounts and authentication : each user logs in, so the DBMS knows who is acting.Access privileges by role: read, insert, update or delete rights per table, so users reach only what they need.Views : expose selected rows or columns, hiding sensitive fields.Encryption : stored data is unreadable if files are stolen.Audit logs : record who changed what, so misuse can be traced.Exam tip Name DBMS features such as privileges and views. Generic IT security (firewalls, antivirus) answers a different question.A3.1-012 Tap to flip back
12 / 30
A3.1.1 Definition What is meant by a rigid schema as a limitation of relational databases? A3.1-013 Tap to flip A3.1.1 Definition What is meant by a rigid schema as a limitation of relational databases? The structure (tables, fields, data types ) must be defined before data is stored , and every record must fit it. Changing it later on live data is slow, may need downtime and forces dependent queries and programs to be updated . Exam tip Example: a tennis club adding videos of members' serves must alter a live table, not just save a new kind of record.A3.1-013 Tap to flip back
13 / 30
A3.1.1 Definition What is the object-relational impedance mismatch? A3.1-014 Tap to flip A3.1.1 Definition What is the object-relational impedance mismatch? The poor fit between objects in object-oriented programs (nested objects, collections, inheritance) and the flat rows and columns of tables, so data must be translated both ways , e.g. by an object-relational mapping (ORM) tool, adding code and overhead. Exam tip Hook: objects are nested, tables are flat, so something must flatten and rebuild them every time data is saved or loaded.A3.1-014 Tap to flip back
14 / 30
A3.1.1 Definition What is meant by design complexity as a limitation of relational databases? A3.1-015 Tap to flip A3.1.1 Definition What is meant by design complexity as a limitation of relational databases? A good relational design needs skill and planning : identifying entities, keys and relationships, then normalising . Many linked tables make queries with joins harder to write , and design mistakes are costly to fix once data is stored. Exam tip For a tiny dataset a single table or spreadsheet may be simpler: a relational design can be overkill.A3.1-015 Tap to flip back
15 / 30
A3.1.1 Compare Compare a flat file database with a relational database. A3.1-016 Tap to flip A3.1.1 Compare Compare a flat file database with a relational database. A flat file holds everything in one table , whereas a relational database splits data into linked tables . A flat file repeats data (an owner's phone on every pet row); a relational database stores each fact once . Updating a flat file risks inconsistent copies ; relational updates one place . A flat file is simpler to set up, but relational needs more design effort. Exam tip In compare answers, mention both in every point: 'whereas' and 'but' keep you honest.A3.1-016 Tap to flip back
16 / 30
A3.1.1 Compare Data integrity and data consistency are both benefits of relational databases. How do the two ideas differ? A3.1-017 Tap to flip A3.1.1 Compare Data integrity and data consistency are both benefits of relational databases. How do the two ideas differ? Integrity : data is accurate, valid and complete , enforced by constraints such as data types, required fields, unique primary keys and referential integrity .Consistency : data does not contradict itself . Because each fact is stored once and linked by keys, an update is seen everywhere, so copies cannot disagree.Exam tip Integrity asks 'is this value correct and allowed?'; consistency asks 'does every part of the database agree?'A3.1-017 Tap to flip back
17 / 30
A3.1.1 Compare How does reduced data duplication differ from reduced redundancy in a relational database? A3.1-018 Tap to flip A3.1.1 Compare How does reduced data duplication differ from reduced redundancy in a relational database? Duplication : the same value stored repeatedly , e.g. a customer's address on every order row, fixed by storing it once in a Customer table.Redundancy is wider: any unnecessary data, including duplicates and values that can be derived , e.g. Age stored alongside DateOfBirth.The terms overlap, and mark schemes often treat them as near synonyms . Both waste storage and risk inconsistency ; normalisation reduces both. Exam tip Repeated foreign key values are not harmful duplication: they are the links that let each fact be stored only once.A3.1-018 Tap to flip back
18 / 30
A3.1.1 Compare Scalability is a benefit of relational databases, yet 'big data' scalability is a limitation. How can both be true? A3.1-019 Tap to flip A3.1.1 Compare Scalability is a benefit of relational databases, yet 'big data' scalability is a limitation. How can both be true? Benefit : for normal growth a relational database copes far better than flat files. It scales vertically (a more powerful server, more memory) and uses indexes to keep queries fast.Limitation : at big data volume and speed one server is not enough, and scaling horizontally across many servers is hard because joins and transactions spanning servers are slow and complex.Exam tip Vertical = a bigger machine; horizontal = more machines. Relational systems are good at the first, weaker at the second.A3.1-019 Tap to flip back
19 / 30
A3.1.1 Process A shop keeps Customer and Order tables. How does the database link each order to the customer who placed it? A3.1-020 Tap to flip A3.1.1 Process A shop keeps Customer and Order tables. How does the database link each order to the customer who placed it? CustomerID is the primary key of Customer, unique for each customer. Each Order record stores that CustomerID as a foreign key . To find who placed an order, the DBMS matches the foreign key value to the primary key value (a join). One CustomerID can appear on many orders: a one-to-many relationship, with customer details stored once . Exam tip The foreign key goes on the 'many' side: CustomerID in Order, never a list of OrderIDs in Customer.A3.1-020 Tap to flip back
20 / 30
A3.1.1 Explain Why is data retrieval a benefit of relational databases? A3.1-021 Tap to flip A3.1.1 Explain Why is data retrieval a benefit of relational databases? SQL is a standard, declarative query language: you state what data you want, not how to find it.One query can join tables, filter, sort and calculate totals. The DBMS optimises queries and uses indexes , so results come back quickly. Saved queries rerun the same way every time, avoiding manual errors. Exam tip Avoid vague answers like 'easy to search'. Say that one SQL query can combine data from several linked tables.A3.1-021 Tap to flip back
21 / 30
A3.1.1 Explain Why do relational databases handle hierarchical data, such as folder trees or comment threads, poorly? A3.1-022 Tap to flip A3.1.1 Explain Why do relational databases handle hierarchical data, such as folder trees or comment threads, poorly? Tables are flat , but a hierarchy is a tree of unknown depth. Each row usually stores its parent's ID (a foreign key pointing to another row in the same table). Retrieving a whole branch needs repeated joins or recursive queries , one level at a time. This becomes slow and complex as the tree gets deeper. Exam tip Do not just say 'it cannot store trees'. It can; the problem is querying them efficiently.A3.1-022 Tap to flip back
22 / 30
A3.1.1 Explain Why is unstructured data, such as photos, videos and free text, a limitation for relational databases? A3.1-023 Tap to flip A3.1.1 Explain Why is unstructured data, such as photos, videos and free text, a limitation for relational databases? Relational tables need data that fits predefined fields and data types , but unstructured data has no fixed structure . It is usually stored as a BLOB or a file path , so SQL cannot search or query its content meaningfully. Large BLOBs bloat the database , slowing backups and queries. Exam tip BLOB = binary large object: the database stores the bytes but cannot understand what the picture or video shows.A3.1-023 Tap to flip back
23 / 30
A3.1.1 Apply it A cinema's Screening table holds ScreenNo, ShowDate, StartTime and FilmID. Which fields should form a composite key, and why? A3.1-024 Tap to flip A3.1.1 Apply it A cinema's Screening table holds ScreenNo, ShowDate, StartTime and FilmID. Which fields should form a composite key, and why? (ScreenNo, ShowDate, StartTime) Each field repeats on its own (many shows per screen, per date and at 19:00). One screen can show only one film at a given start time on a given date , so the combination is unique. FilmID is left out : the same film is shown many times, so it adds nothing to uniqueness.Exam tip Justify both parts: why each field alone fails and why the combination cannot repeat. Unjustified choices lose marks.A3.1-024 Tap to flip back
24 / 30
A3.1.1 Apply it A start-up app stores photos, videos and nested comment threads, and adds features weekly. Why might a relational database suit it poorly? A3.1-025 Tap to flip A3.1.1 Apply it A start-up app stores photos, videos and nested comment threads, and adds features weekly. Why might a relational database suit it poorly? Unstructured data : photos and videos do not fit rows and columns and cannot be queried by content.Hierarchical data : nested comments need repeated self-joins, slow for deep threads.Rigid schema : weekly feature changes mean frequent table alterations on live data.Big data scalability : rapid growth needs scaling out across many servers, which is hard for relational systems.Exam tip Many real systems mix both: a relational database for accounts and payments, another kind of store for media.A3.1-025 Tap to flip back
25 / 30
A3.1.1 Exam question [3 marks] A library's Loan table holds StudentID as a foreign key. Outline how referential integrity protects the data if a student record is deleted. A3.1-026 Tap to flip A3.1.1 Exam question [3 marks] A library's Loan table holds StudentID as a foreign key. Outline how referential integrity protects the data if a student record is deleted. Referential integrity requires every foreign key value in Loan to match an existing StudentID in Student. Deleting the student would leave orphan loans that point to nobody. The DBMS can restrict : refuse the deletion while loans exist. Or cascade : delete that student's loans as well. Or set null : keep the loans but set their StudentID to null. Exam tip Say what must match what. Merely naming 'referential integrity' has scored nothing in past mark schemes.A3.1-026 Tap to flip back
26 / 30
A3.1.1 Exam question [4 marks] A gym chain with 40 branches is replacing branch spreadsheets with one relational database. Explain two benefits for the chain. A3.1-027 Tap to flip A3.1.1 Exam question [4 marks] A gym chain with 40 branches is replacing branch spreadsheets with one relational database. Explain two benefits for the chain. Any two, [2] each: Consistency : member data is held centrally, so every branch sees the same up-to-date status.Reduced duplication : each member is stored once, linked by MemberID, so branch copies cannot conflict.Concurrency control : staff at many branches can update at once, because record locking prevents conflicting changes.Querying : one SQL query can join tables to report across all branches.Exam tip Tie every benefit to the scenario (branches, members). Avoid answers only about storage: mark schemes have capped those.A3.1-027 Tap to flip back
27 / 30
A3.1.1 Exam question [4 marks] Two fans click 'Buy' for the same concert seat at the same moment. Explain how the DBMS's concurrency control prevents the seat being sold twice. A3.1-028 Tap to flip A3.1.1 Exam question [4 marks] Two fans click 'Buy' for the same concert seat at the same moment. Explain how the DBMS's concurrency control prevents the seat being sold twice. The DBMS lets many users access the database concurrently . When the first fan's transaction starts, the seat's record (row) is locked . The second fan's transaction cannot update the locked record and must wait . When the first purchase commits , the lock is released; the second fan now sees the seat is already sold and is rejected. This prevents a lost update (double booking). Exam tip Name the mechanism (record locking) and say what happens to the second user. 'The database stops it' earns nothing.A3.1-028 Tap to flip back
28 / 30
A3.1.1 Exam question [4 marks] Describe two ways a hospital's DBMS can stop reception staff viewing patients' medical histories. A3.1-029 Tap to flip A3.1.1 Exam question [4 marks] Describe two ways a hospital's DBMS can stop reception staff viewing patients' medical histories. Any two, [2] each: Access privileges by role : receptionists get read-only rights to appointment tables and no rights on the medical table .Views : a view shows only names and appointment times, hiding clinical columns .Separate sensitive table : medical data sits in its own table, linked only by PatientID, with restricted access .Individual user accounts : each login identifies the user, so the DBMS applies that role's permissions .Exam tip Encryption or 'use a password' alone were not credited for this. Describe DBMS features that limit what each user sees.A3.1-029 Tap to flip back
29 / 30
A3.1.1 Exam question [2 marks] A national hospital database has grown tenfold in five years. Identify two scalability problems it may now face. A3.1-030 Tap to flip A3.1.1 Exam question [2 marks] A national hospital database has grown tenfold in five years. Identify two scalability problems it may now face. Any two: Growing data volume slows queries and searches.More concurrent users cause locking conflicts and waiting.Complex queries joining large tables use more processing resources.A single server's hardware becomes a bottleneck.Spreading the load across several servers is difficult.Exam tip Identify needs only a brief point each, but make the two genuinely different: 'slow' and 'slower' count once.A3.1-030 Tap to flip back
30 / 30
Tip: click the card, then use the arrow keys to flip and move through the deck.
A3.2 Database design This is the design toolkit: conceptual, logical and physical schemas, ERDs with cardinality, modality and crow's foot notation, data types and keys. The biggest block is normalisation: atomic fields, partial-key and transitive dependencies, the three anomalies, and full 1NF to 3NF walkthroughs for an online shop, a hospital and a police crime record. The last cards weigh up when denormalising is worth it. All 54 cards are for SL and HL.
Read the full A3.2 revision guide for a complete unnormalised to 3NF walkthrough.
A3.2 Database design 54 cards
A3.2.1 Definition What is a database schema? A3.2-001 Tap to flip A3.2.1 Definition What is a database schema? The blueprint of a database's structure : its entities (tables), attributes, relationships, keys and constraints. It describes how the data is organised but holds no actual data . Exam tip Schema = the empty form; records = the answers people fill in.A3.2-001 Tap to flip back
1 / 54
A3.2.1 Definition What does a conceptual schema show about a database? A3.2-002 Tap to flip A3.2.1 Definition What does a conceptual schema show about a database? The highest-level, least detailed view: the entities and the relationships between them. It has no attributes, data types or storage detail, is independent of any DBMS and is usually drawn as a simple ERD. Exam tip Conceptual = WHAT data the system needs. It is the version you agree with non-technical clients.A3.2-002 Tap to flip back
2 / 54
A3.2.1 Definition Beyond entities and relationships, what extra detail does a logical schema record? A3.2-003 Tap to flip A3.2.1 Definition Beyond entities and relationships, what extra detail does a logical schema record? Every attribute of each entity, the primary key of each table and the foreign keys that implement the relationships. Normalisation is done at this level. It still says nothing about how the data is physically stored. Exam tip The textbook adds data types only at the physical level; some sources show generic types here. Never storage detail.A3.2-003 Tap to flip back
3 / 54
A3.2.1 Definition What does a physical schema describe? A3.2-004 Tap to flip A3.2.1 Definition What does a physical schema describe? How the data is actually stored in a specific DBMS: each field's real data type (e.g. CHAR(6), INT), plus the files , indexes and record organisation, chosen so data is retrieved and updated efficiently . Exam tip Physical = HOW and WHERE. It is the only level tied to particular DBMS software and storage hardware.A3.2-004 Tap to flip back
4 / 54
A3.2.1 Compare How does a logical schema differ from a physical schema? A3.2-005 Tap to flip A3.2.1 Compare How does a logical schema differ from a physical schema? Logical defines what is stored: tables, fields, primary and foreign keys and the links between tables.Physical defines how it is stored: data types, files, indexes and storage structures.Logical is independent of any DBMS , whereas physical is written for one specific DBMS . Logical is designed first ; physical implements it afterwards, tuned for efficient retrieval and update. Exam tip In compare answers, mention both schemas in every point, not two separate descriptions.A3.2-005 Tap to flip back
5 / 54
A3.2.1 Explain Why is a database described at three schema levels of abstraction, and who mainly uses each level? A3.2-006 Tap to flip A3.2.1 Explain Why is a database described at three schema levels of abstraction, and who mainly uses each level? Each level hides detail that its audience does not need. Conceptual : agreed with end users and clients before technical choices are made.Logical : used by designers and developers to define tables and keys.Physical : used by developers and database administrators to build and tune storage.Storage can change without changing the higher levels (data independence ). Exam tip Do not mix in the ANSI terms external and internal: the 2025 guide uses conceptual, logical and physical.A3.2-006 Tap to flip back
6 / 54
A3.2.2 Definition What is an entity relationship diagram (ERD)? A3.2-007 Tap to flip A3.2.2 Definition What is an entity relationship diagram (ERD)? A diagram that models a database's entities (boxes), their attributes and the relationships (lines) between them, showing cardinality and modality . It can be drawn at conceptual, logical or physical level. Exam tip Entity = a thing data is stored about (it becomes a table); attribute = field; line = relationship. Entities are nouns, relationships verbs.A3.2-007 Tap to flip back
7 / 54
A3.2.2 Definition In an ERD, what does the cardinality of a relationship describe? A3.2-008 Tap to flip A3.2.2 Definition In an ERD, what does the cardinality of a relationship describe? The maximum number of instances of one entity that can be linked to one instance of the other: one-to-one (1:1) , one-to-many (1:M) or many-to-many (M:N) . Exam tip Cardinality = the maximum ('one' or 'many'). Modality = the minimum ('zero' or 'one').A3.2-008 Tap to flip back
8 / 54
A3.2.2 Definition In an ERD, what does the modality of a relationship describe? A3.2-009 Tap to flip A3.2.2 Definition In an ERD, what does the modality of a relationship describe? Whether an entity's participation is optional (minimum zero ) or mandatory (minimum one ). E.g. a customer may have no orders yet (optional), but every order must belong to one customer (mandatory). Exam tip Also called optionality or participation. Check each direction of a relationship separately.A3.2-009 Tap to flip back
9 / 54
A3.2.2 Compare How do one-to-one, one-to-many and many-to-many relationships differ? Give an example of each. A3.2-010 Tap to flip A3.2.2 Compare How do one-to-one, one-to-many and many-to-many relationships differ? Give an example of each. One-to-one : each A links to at most one B, and each B to one A, e.g. a school and its head teacher.One-to-many : one A links to many B, but each B to only one A, e.g. a team has many players; each player plays for one team.Many-to-many : each A links to many B and each B to many A, e.g. students and courses.Exam tip State a relationship in both directions: 'a team has many players' AND 'each player has one team'.A3.2-010 Tap to flip back
10 / 54
A3.2.2 Explain Why must a many-to-many relationship be resolved before tables are built, and how is it done? A3.2-011 Tap to flip A3.2.2 Explain Why must a many-to-many relationship be resolved before tables are built, and how is it done? Fields must be atomic , so neither table can hold a list of the other's keys. Add a link (junction) entity between them, e.g. ENROLMENT between STUDENT and COURSE. It holds the primary key of each table as a foreign key , often together forming a composite key . The M:N becomes two one-to-many relationships, and the link entity can store shared facts such as a grade. Exam tip Examiners reward a link entity for every M:N. Spot one when 'many' appears in both directions.A3.2-011 Tap to flip back
11 / 54
A3.2.2 Explain In crow's foot notation, what do a bar, a circle and a crow's foot at the end of a relationship line mean? A3.2-012 Tap to flip A3.2.2 Explain In crow's foot notation, what do a bar, a circle and a crow's foot at the end of a relationship line mean? Bar (|) : one.Circle (O) : zero, so participation is optional .Crow's foot (three prongs): many .Each line end has two symbols: the one nearest the entity shows the maximum (cardinality) , the outer one the minimum (modality) . E.g. circle then crow's foot = zero or many; two bars = exactly one. Exam tip Any notation is accepted if every line is labelled and the cardinality is unambiguous. The foot marks the 'many' end.A3.2-012 Tap to flip back
12 / 54
A3.2.2 Process What steps should you follow to construct an ERD from a written scenario? A3.2-013 Tap to flip A3.2.2 Process What steps should you follow to construct an ERD from a written scenario? Decide the level (conceptual, logical or physical), which sets the detail needed. Identify the entities (nouns) and, if needed, their attributes and keys . Identify the relationships between entities (verbs). Set the cardinality of each, replacing any M:N with a link entity . Set the modality (optional or mandatory) at each end. Exam tip Read each rule both ways: 'a member makes many bookings' and 'a booking is made by one member'.A3.2-013 Tap to flip back
13 / 54
A3.2.2 Apply it A library's members borrow many books over time, and each book is borrowed by many members. What entities and relationships should its ERD show? A3.2-014 Tap to flip A3.2.2 Apply it A library's members borrow many books over time, and each book is borrowed by many members. What entities and relationships should its ERD show? MEMBER , BOOK and a link entity LOAN , because the M:N cannot be stored directly.MEMBER 1:M LOAN : a member has many loans; each loan is for one member.BOOK 1:M LOAN : a book appears in many loans; each loan is for one book.Modality: a member or book may have zero loans (optional); each loan must have one member and one book (mandatory). Exam tip Typical schemes give a mark per correct relationship, so label every line with its cardinality.A3.2-014 Tap to flip back
14 / 54
A3.2.2 Explain Why is it worth constructing an ERD before a database is built? A3.2-015 Tap to flip A3.2.2 Explain Why is it worth constructing an ERD before a database is built? It is a blueprint , so tables, keys and links are planned before any are created. It gives a shared visual model , so clients, developers and future maintainers understand the design the same way. Missing entities, wrong cardinality or unresolved M:N relationships are spotted early , when fixes are cheap. It is independent of any DBMS , so the design can be implemented or extended on any system. Exam tip 'Explain' needs reasons: describing what an ERD shows earns nothing on its own.A3.2-015 Tap to flip back
15 / 54
A3.2.3 Compare How do the CHAR(n), VARCHAR(n) and TEXT data types differ, and when would you use each? A3.2-016 Tap to flip A3.2.3 Compare How do the CHAR(n), VARCHAR(n) and TEXT data types differ, and when would you use each? CHAR(n): fixed length , always n characters (short values are padded), e.g. a 3-letter airport code.VARCHAR(n): variable length up to a maximum of n, storing only what is used, e.g. names and emails.TEXT: long free text, e.g. a product description.All three store strings (letters, digits, symbols), so their contents cannot be used directly in arithmetic. Exam tip A large CHAR field wastes space on short values; a VARCHAR limit set too small truncates long ones.A3.2-016 Tap to flip back
16 / 54
A3.2.3 Definition Which SQL data types store numbers, and what kind of value suits each? A3.2-017 Tap to flip A3.2.3 Definition Which SQL data types store numbers, and what kind of value suits each? INT/INTEGER: whole numbers , e.g. quantity in stock. FLOAT/REAL: approximate decimals , e.g. a measured height. DECIMAL(p,s): exact decimals with fixed places, ideal for money .Exam tip For a price, say decimal, real or float. Mark schemes have rejected integer and a plain 'number'.A3.2-017 Tap to flip back
17 / 54
A3.2.3 Definition Which SQL data types store dates, times and yes/no values? A3.2-018 Tap to flip A3.2.3 Definition Which SQL data types store dates, times and yes/no values? DATE (YYYY-MM-DD), TIME (hh:mm:ss), DATETIME or TIMESTAMP (date and time together; a timestamp can record the current moment automatically) and BOOLEAN (true or false, often stored as 1 or 0).Exam tip Names vary between DBMSs (MySQL, SQLite...). Learn the families: string, numeric, date/time and Boolean.A3.2-018 Tap to flip back
18 / 54
A3.2.3 Apply it Suggest a suitable data type for a customer's phone number, a product price, a date of birth and an 'account active' flag. A3.2-019 Tap to flip A3.2.3 Apply it Suggest a suitable data type for a customer's phone number, a product price, a date of birth and an 'account active' flag. Phone number: VARCHAR , as it is never calculated with , may start with a leading zero and can include + or spaces. Price: DECIMAL (or real), as it has a fractional part that must be exact. Date of birth: DATE , so records can be sorted, compared and used to work out ages. Active flag: BOOLEAN , as only two values are possible. Exam tip Numbers you never do arithmetic on (phone numbers, IDs with letters or leading zeros) belong in text fields.A3.2-019 Tap to flip back
19 / 54
A3.2.3 Explain What is meant by data type consistency in a relational database, and why does it matter? A3.2-020 Tap to flip A3.2.3 Explain What is meant by data type consistency in a relational database, and why does it matter? The same kind of data always uses the same data type and format , in every record and every table. A foreign key must have the same type as the primary key it references, or joins and integrity checks fail. Consistent types let data be imported, compared, sorted and updated correctly. E.g. if some dates are stored as DATE and others as text, date-range queries miss records. Exam tip Hook: same data, same type, everywhere. Primary and foreign key pairs are where this most often goes wrong.A3.2-020 Tap to flip back
20 / 54
A3.2.3 Exam question [3 marks] Outline three possible effects of choosing the wrong data type for a field in a database. A3.2-021 Tap to flip A3.2.3 Exam question [3 marks] Outline three possible effects of choosing the wrong data type for a field in a database. Any three: Numbers stored as text cannot be used in calculations and sort wrongly ('10' before '9'). An integer type loses data : leading zeros vanish or the decimal part is truncated . Dates stored as text cannot be compared or range-queried , and mixed formats creep in. An oversized type wastes storage ; an undersized one truncates values. Loose types let invalid data in, as fewer validation checks are possible. Exam tip Name what breaks (calculation, sorting, querying, storage). 'It causes errors' is too vague to score.A3.2-021 Tap to flip back
21 / 54
A3.2.4 Definition When constructing a table, what makes a field a good choice of primary key? A3.2-022 Tap to flip A3.2.4 Definition When constructing a table, what makes a field a good choice of primary key? Its values are unique for every record, never null and stable (they do not change). Names, dates or totals can repeat, so a generated ID such as OrderID is often added instead. Exam tip If you can imagine two records sharing the value, it cannot be the primary key on its own.A3.2-022 Tap to flip back
22 / 54
A3.2.4 Explain In a one-to-many relationship between two tables, which table holds the foreign key, and why? A3.2-023 Tap to flip A3.2.4 Explain In a one-to-many relationship between two tables, which table holds the foreign key, and why? The table on the many side holds the foreign key , e.g. PLAYER stores TeamID. It holds a primary key value from the 'one' side, linking each row to exactly one parent row. The 'one' side cannot store a list of child IDs, because fields must be atomic . Foreign key values may repeat : many players share one TeamID. Exam tip Never put a list of IDs in the 'one' table: that breaks 1NF.A3.2-023 Tap to flip back
23 / 54
A3.2.4 Compare What is the difference between a composite key and a concatenated key? A3.2-024 Tap to flip A3.2.4 Compare What is the difference between a composite key and a concatenated key? Composite key : two or more whole existing attributes used together as the primary key, e.g. (StudentID, CourseID).Concatenated key : one new single value built by joining parts of attribute values, e.g. the first three letters of a surname plus a date of birth.Both are used when no single attribute is unique on its own. Exam tip Many sources and older mark schemes use 'concatenated' to mean composite. Learn the textbook distinction, but recognise both uses.A3.2-024 Tap to flip back
24 / 54
A3.2.4 Explain What makes a composite key the right choice for a table, and what situation makes it fail? A3.2-025 Tap to flip A3.2.4 Explain What makes a composite key the right choice for a table, and what situation makes it fail? No single field is unique, but the combination is , e.g. (StudentID, CourseID) in ENROLMENT. It is typical in a link table that resolves an M:N relationship. It uses existing meaningful fields , so no extra ID column is needed. It fails if the combination can repeat , e.g. a student retakes the same course; fix by adding a date or using a new single ID. Exam tip Before choosing a composite key, look for a realistic case where the combination repeats. Examiners often build one into the scenario.A3.2-025 Tap to flip back
25 / 54
A3.2.4 Compare How does entity integrity differ from referential integrity? A3.2-026 Tap to flip A3.2.4 Compare How does entity integrity differ from referential integrity? Entity integrity applies within one table : every record has a primary key that is unique and not null .Referential integrity applies between tables : every foreign key value must match an existing primary key (or be null).Entity integrity stops duplicate or unidentifiable records; referential integrity stops orphan records . Referential integrity is kept by restricting deletes or cascading them (ON DELETE CASCADE). Exam tip Hook: entity integrity means every row can be found; referential integrity means every link leads somewhere.A3.2-026 Tap to flip back
26 / 54
A3.2.4 Apply it A gym's members can book many classes, and each class has many members. Construct suitable tables with keys and data types. A3.2-027 Tap to flip A3.2.4 Apply it A gym's members can book many classes, and each class has many members. Construct suitable tables with keys and data types. MEMBER(MemberID CHAR(6) PK , Name VARCHAR(50), Email VARCHAR(100)) GYMCLASS(ClassID CHAR(5) PK , Title VARCHAR(40), StartTime DATETIME) BOOKING(MemberID CHAR(6) PK, FK , ClassID CHAR(5) PK, FK , Paid BOOLEAN) BOOKING is the link table for the M:N; its composite key stops double bookings. Each foreign key has the same data type as the primary key it references. Exam tip Mark every key. Past mark schemes gave no credit for otherwise correct tables with no keys shown.A3.2-027 Tap to flip back
27 / 54
A3.2.4 Exam question [4 marks] Explain how well-defined tables help to ensure data integrity in a relational database. A3.2-028 Tap to flip A3.2.4 Exam question [4 marks] Explain how well-defined tables help to ensure data integrity in a relational database. A primary key in every table prevents duplicate or unidentifiable records (entity integrity ). Foreign keys must match existing primary keys, so links cannot point to missing records (referential integrity ).Suitable data types and constraints (NOT NULL, field lengths) reject invalid values at entry. One subject per table stores each fact once, so an update cannot leave contradictory copies.Cascading or restricted deletes stop orphan records being left behind.Exam tip Explain = point plus reason. Link each table feature to the integrity problem it prevents.A3.2-028 Tap to flip back
28 / 54
A3.2.5 Definition What is normalisation in database design? A3.2-029 Tap to flip A3.2.5 Definition What is normalisation in database design? A step-by-step process that splits data into well-structured tables, guided by functional dependencies , so that each fact is stored once . It reduces redundancy and removes insertion, update and deletion anomalies . Exam tip Different from normalisation in machine learning (A4), which rescales feature values to a common range.A3.2-029 Tap to flip back
29 / 54
A3.2.5 Definition What is data duplication (redundancy), and why is it a problem? A3.2-030 Tap to flip A3.2.5 Definition What is data duplication (redundancy), and why is it a problem? The same fact stored in more than one place . It wastes storage , and every copy must be changed together: any copy missed leaves inconsistent data, e.g. a supplier's phone number differing between rows. Exam tip A value that could be calculated from other fields, such as a stored order total, also counts as redundant.A3.2-030 Tap to flip back
30 / 54
A3.2.5 Definition What is a functional dependency between attributes? A3.2-031 Tap to flip A3.2.5 Definition What is a functional dependency between attributes? A data dependency in which the value of one attribute (or set of attributes) determines the value of another: each A has only one possible B. Written A → B , e.g. StudentID → StudentName. Exam tip Read A → B as 'A determines B' or 'B depends on A'. Every normal form asks what each attribute depends on.A3.2-031 Tap to flip back
31 / 54
A3.2.5 Definition In normalisation, what does it mean for a field to be atomic? A3.2-032 Tap to flip A3.2.5 Definition In normalisation, what does it mean for a field to be atomic? It holds a single, indivisible value : no lists, no repeated values and no combined data in one cell. A cell holding 'Maths, Physics', or a full name that must be searched by surname, is not atomic. Exam tip Not transaction atomicity (all or nothing, A3.3). Here it simply means one value per cell.A3.2-032 Tap to flip back
32 / 54
A3.2.5 Definition What conditions must a table meet to be in first normal form (1NF)? A3.2-033 Tap to flip A3.2.5 Definition What conditions must a table meet to be in first normal form (1NF)? Every field is atomic (one value per cell). There are no repeating groups (no Phone1, Phone2, Phone3 columns). Every record is uniquely identified by a primary key . Exam tip Students often forget the key: atomic values with no primary key are not yet 1NF.A3.2-033 Tap to flip back
33 / 54
A3.2.5 Definition What is a partial-key dependency? A3.2-034 Tap to flip A3.2.5 Definition What is a partial-key dependency? A non-key attribute that depends on only part of a composite primary key , not the whole key (a composite key dependency). E.g. in ENROLMENT(StudentID, CourseID, StudentName, Grade), keyed on (StudentID, CourseID), StudentName depends on StudentID alone. Exam tip Only possible with a composite key. A 1NF table with a single-field key is automatically in 2NF.A3.2-034 Tap to flip back
34 / 54
A3.2.5 Definition What conditions must a table meet to be in second normal form (2NF)? A3.2-035 Tap to flip A3.2.5 Definition What conditions must a table meet to be in second normal form (2NF)? It is already in 1NF , and it has no partial-key dependencies : every non-key attribute depends on the whole primary key, not on just part of it. Exam tip When moving to 2NF, only move attributes that depend on part of the key. Whole-key facts, such as a grade, stay put.A3.2-035 Tap to flip back
35 / 54
A3.2.5 Definition What is a non-key (transitive) dependency? A3.2-036 Tap to flip A3.2.5 Definition What is a non-key (transitive) dependency? A non-key attribute that depends on another non-key attribute instead of directly on the primary key: Key → A → B. E.g. in BOOK(ISBN, Title, PublisherID, PublisherCity), PublisherCity depends on PublisherID. Exam tip Ask what the attribute depends on: part of the key means partial; a non-key field means transitive.A3.2-036 Tap to flip back
36 / 54
A3.2.5 Definition What conditions must a table meet to be in third normal form (3NF)? A3.2-037 Tap to flip A3.2.5 Definition What conditions must a table meet to be in third normal form (3NF)? It is already in 2NF , and it has no non-key (transitive) dependencies : every non-key attribute depends only on the primary key , never on another non-key attribute. Exam tip Hook: the key (1NF), the whole key (2NF), nothing but the key (3NF).A3.2-037 Tap to flip back
37 / 54
A3.2.5 Definition What is a multi-valued dependency, and why does it cause problems? A3.2-038 Tap to flip A3.2.5 Definition What is a multi-valued dependency, and why does it cause problems? One key value determines several independent sets of values , e.g. a student's many phone numbers and many clubs in one table. Every phone must be paired with every club, causing repetition , so each set needs its own table . Exam tip The guide names this as a normalisation issue to recognise and fix; only 1NF to 3NF are required.A3.2-038 Tap to flip back
38 / 54
A3.2.5 Compare How do insertion, update and deletion anomalies differ? Give an example of each from a school database. A3.2-039 Tap to flip A3.2.5 Compare How do insertion, update and deletion anomalies differ? Give an example of each from a school database. Insertion : a fact cannot be added without unrelated data, e.g. a new course cannot be stored until a student enrols.Update : a fact stored in many rows must be changed in every row, or the copies disagree, e.g. a teacher's email.Deletion : removing a row also loses other facts, e.g. deleting the last student on a course loses the course details.Exam tip Schemes typically give 1 mark for the problem and 1 for an example from the given table. Always quote the scenario.A3.2-039 Tap to flip back
39 / 54
A3.2.5 Explain How can a poorly normalised table lead to missing data? A3.2-040 Tap to flip A3.2.5 Explain How can a poorly normalised table lead to missing data? Columns for optional or repeated values (Phone2, Phone3) are left empty (null) in most records. Insertion anomalies force blanks or made-up placeholders, e.g. a new supplier stored with a blank product.Deletion anomalies make data disappear : deleting one row removes facts held nowhere else.Blanks waste space and make counts and searches unreliable ; normalising stores optional data in its own table. Exam tip Missing data is a symptom: trace it back to the design flaw (repeating group or wrong dependency) that caused it.A3.2-040 Tap to flip back
40 / 54
A3.2.5 Apply it A library table is LOAN(BookID, LoanDate, BookTitle, MemberID, MemberName), keyed on (BookID, LoanDate). Which dependencies stop it reaching 3NF? A3.2-041 Tap to flip A3.2.5 Apply it A library table is LOAN(BookID, LoanDate, BookTitle, MemberID, MemberName), keyed on (BookID, LoanDate). Which dependencies stop it reaching 3NF? BookTitle depends only on BookID, part of the key : a partial-key dependency , so it is not in 2NF.MemberName depends on MemberID, a non-key attribute: a transitive dependency , so it is not in 3NF.MemberID depends on the whole key (who borrowed that book that day), so it stays. Fix: BOOK(BookID, BookTitle), MEMBER(MemberID, MemberName), LOAN(BookID, LoanDate, MemberID). Exam tip A common slip is calling MemberName a partial dependency. MemberID is not part of the key, so it is transitive.A3.2-041 Tap to flip back
41 / 54
A3.2.5 Exam question [3 marks] A CLASS table's Pupils field holds values such as 'Ana, Ben, Cy'. Explain why the table is not in 1NF. A3.2-042 Tap to flip A3.2.5 Exam question [3 marks] A CLASS table's Pupils field holds values such as 'Ana, Ben, Cy'. Explain why the table is not in 1NF. Pupils is not atomic : one cell holds several values . It is a repeating group , as the number of pupils varies from class to class. A single pupil cannot easily be searched, sorted or counted , and a pupil's details may be repeated across classes. Fix: one row per class and pupil pair in a separate table, e.g. CLASS_PUPIL(ClassID, PupilID), with a composite key . Exam tip Refer to the given table. Generic answers such as 'it has repeating groups', without naming the field, lose marks.A3.2-042 Tap to flip back
42 / 54
A3.2.5 Exam question [4 marks] Explain how a table in third normal form differs from one that is only in second normal form. A3.2-043 Tap to flip A3.2.5 Exam question [4 marks] Explain how a table in third normal form differs from one that is only in second normal form. Each form builds on the last: 2NF requires 1NF, and 3NF requires 2NF. 2NF removes partial-key dependencies , so every non-key attribute depends on the whole key (only an issue with a composite key ).3NF also removes transitive dependencies : no non-key attribute may depend on another non-key attribute .E.g. ORDER(OrderID, CustomerID, CustomerEmail) is 2NF, not 3NF, so changing an email means editing every order (update anomaly ). Exam tip Name the dependency type for each form. Saying '3NF is more normalised' earns nothing.A3.2-043 Tap to flip back
43 / 54
A3.2.6 Process What steps take an unnormalised table to third normal form (3NF)? A3.2-044 Tap to flip A3.2.6 Process What steps take an unnormalised table to third normal form (3NF)? UNF : list the fields, choose a key, mark the repeating group .1NF : move the repeating group to a new table, keyed (often composite ), holding the old key as a foreign key .2NF : move fields depending on part of the key to a table keyed by that part.3NF : move fields depending on a non-key field to a new table; its key stays as a foreign key .Exam tip Final check: every table has a primary key, every foreign key matches a primary key, every M:N has a link table.A3.2-044 Tap to flip back
44 / 54
A3.2.6 Apply it Is EMPLOYEE(EmployeeID, Name, DeptID, DeptName, DeptFloor), keyed on EmployeeID, in 3NF? If not, normalise it. A3.2-045 Tap to flip A3.2.6 Apply it Is EMPLOYEE(EmployeeID, Name, DeptID, DeptName, DeptFloor), keyed on EmployeeID, in 3NF? If not, normalise it. It is in 2NF : with a single-field key , no partial dependency is possible. It is not in 3NF : DeptName and DeptFloor depend on DeptID , a non-key attribute (transitive dependency ). Fix: EMPLOYEE(EmployeeID PK , Name, DeptID FK ) and DEPARTMENT(DeptID PK , DeptName, DeptFloor). Each department's details are now stored once , however many employees it has. Exam tip DeptID stays in EMPLOYEE as the foreign key. Moving it out too would lose which department each employee works in.A3.2-045 Tap to flip back
45 / 54
A3.2.6 Apply it An online shop stores ORDER_LINE(OrderID, ProductID, Quantity, ProductName, OrderDate, CustomerID, CustomerEmail), keyed on (OrderID, ProductID). Normalise it to 3NF. A3.2-046 Tap to flip A3.2.6 Apply it An online shop stores ORDER_LINE(OrderID, ProductID, Quantity, ProductName, OrderDate, CustomerID, CustomerEmail), keyed on (OrderID, ProductID). Normalise it to 3NF. Partial : ProductName depends on ProductID; OrderDate and CustomerID depend on OrderID.Transitive : CustomerEmail depends on CustomerID, a non-key field.PRODUCT(ProductID PK , ProductName) ORDERS(OrderID PK , OrderDate, CustomerID FK ) and CUSTOMER(CustomerID PK , CustomerEmail) ORDER_LINE(OrderID PK, FK , ProductID PK, FK , Quantity) Exam tip If prices change, store the price charged in ORDER_LINE: it then depends on the whole key, not just ProductID.A3.2-046 Tap to flip back
46 / 54
A3.2.6 Apply it In an inventory database, each product is stocked in many warehouses and each warehouse holds many products. Where should the quantity in stock be stored? A3.2-047 Tap to flip A3.2.6 Apply it In an inventory database, each product is stocked in many warehouses and each warehouse holds many products. Where should the quantity in stock be stored? In a link table , e.g. STOCK(ProductID PK, FK , WarehouseID PK, FK , Quantity). Quantity depends on the whole composite key : it describes one product in one warehouse . In PRODUCT it would become a list of values, one per warehouse (not atomic ); in WAREHOUSE, one per product. PRODUCT and WAREHOUSE keep only facts about themselves, e.g. ProductName, WarehouseCity. Exam tip Ask what a value describes. A fact about a combination belongs in the link table for that combination.A3.2-047 Tap to flip back
47 / 54
A3.2.6 Apply it A hospital record holds PatientID and PatientName, then repeated ApptDateTime, DoctorID and DoctorName entries. Show the 1NF, 2NF and 3NF stages. A3.2-048 Tap to flip A3.2.6 Apply it A hospital record holds PatientID and PatientName, then repeated ApptDateTime, DoctorID and DoctorName entries. Show the 1NF, 2NF and 3NF stages. 1NF : split off the repeating group: PATIENT(PatientID PK , PatientName) and APPOINTMENT(PatientID PK, FK , ApptDateTime PK , DoctorID, DoctorName).2NF : no change. DoctorID depends on the whole key, and nothing depends on only part of it.3NF : DoctorName depends on DoctorID, a non-key field, so DOCTOR(DoctorID PK , DoctorName) is created; APPOINTMENT keeps DoctorID as a foreign key .Exam tip A stage can need no change. Say so and justify it: workings questions credit the reasoning, not just the final tables.A3.2-048 Tap to flip back
48 / 54
A3.2.6 Exam question [5 marks] A police record holds CrimeID, CrimeType, StationID, StationPhone and, per assigned officer, OfficerID and OfficerName. Officers work many crimes. Construct a 3NF design. A3.2-049 Tap to flip A3.2.6 Exam question [5 marks] A police record holds CrimeID, CrimeType, StationID, StationPhone and, per assigned officer, OfficerID and OfficerName. Officers work many crimes. Construct a 3NF design. CRIME(CrimeID PK , CrimeType, StationID FK ) [1] STATION(StationID PK , StationPhone), removing the transitive dependency [1] OFFICER(OfficerID PK , OfficerName) [1] ASSIGNMENT link table for the M:N, keyed on the composite (CrimeID, OfficerID) [1] CrimeID and OfficerID in ASSIGNMENT are foreign keys to CRIME and OFFICER [1] Exam tip Table names earn nothing; fields and keys do. Mark every primary and foreign key clearly.A3.2-049 Tap to flip back
49 / 54
A3.2.7 Definition What is denormalisation? A3.2-050 Tap to flip A3.2.7 Definition What is denormalisation? Deliberately adding redundancy back into a database that has already been normalised , e.g. merging tables or storing copied or pre-calculated values, to make reads faster by avoiding joins . Exam tip Denormalised is not unnormalised: it is a planned optimisation of a good design, not a sign of poor design.A3.2-050 Tap to flip back
50 / 54
A3.2.7 Compare How does a denormalised design compare with a normalised design for reads, writes, storage and consistency? A3.2-051 Tap to flip A3.2.7 Compare How does a denormalised design compare with a normalised design for reads, writes, storage and consistency? Reads : denormalised is faster , with fewer joins ; normalised must join many tables.Queries : denormalised ones are simpler to write; normalised ones are longer.Writes : normalised updates each fact once ; denormalised must update every copy , so writes are slower.Storage : denormalised uses more , as it holds duplicate data.Consistency : normalised avoids anomalies ; denormalised risks copies disagreeing .Exam tip Hook: normalise for writes and integrity; denormalise for reads and speed.A3.2-051 Tap to flip back
51 / 54
A3.2.7 Explain In which kinds of application is denormalisation most likely to improve performance, and why? A3.2-052 Tap to flip A3.2.7 Explain In which kinds of application is denormalisation most likely to improve performance, and why? Read-intensive systems with few updates : reporting, analytics dashboards, data warehouses , product catalogues.The same joins would otherwise run on every read, so storing data pre-joined or pre-calculated saves that work each time. Rare writes mean duplicate copies seldom change, so the redundancy risk is low . Write-heavy systems, such as banking or bookings, should stay normalised.Exam tip Data warehouses (A3.4) are the classic case: loaded in batches, then queried constantly.A3.2-052 Tap to flip back
52 / 54
A3.2.7 Exam question [4 marks] A school's single spreadsheet of pupils, classes and teachers is being normalised to 3NF. Explain two advantages of doing so. A3.2-053 Tap to flip A3.2.7 Exam question [4 marks] A school's single spreadsheet of pupils, classes and teachers is being normalised to 3NF. Explain two advantages of doing so. Any two, [2] each: Each fact is stored once , so there is less redundancy and storage, and a teacher's details change in one place. Insertion, update and deletion anomalies are removed, so data stays consistent , e.g. deleting a pupil no longer deletes a class.Smaller tables allow access rights per table , so sensitive data can be restricted. Referential integrity can be enforced, so links between tables stay valid.Exam tip Schemes pair a point with its consequence. Two consequences of the same point score only once.A3.2-053 Tap to flip back
53 / 54
A3.2.7 Exam question [5 marks] A ticket site's event page joins EVENT, VENUE and ARTIST on every view. Evaluate copying venue and artist names into EVENT. A3.2-054 Tap to flip A3.2.7 Exam question [5 marks] A ticket site's event page joins EVENT, VENUE and ARTIST on every view. Evaluate copying venue and artist names into EVENT. For: views far outnumber name changes, so avoiding joins makes pages faster . For: the page query becomes simpler to write and maintain. Against: names are stored redundantly , using more storage . Against: renaming a venue means updating every event row; a missed row gives inconsistent data (update anomaly ). Judgement: worthwhile , as reads dominate and names rarely change, if VENUE and ARTIST remain the master copy and updates propagate automatically. Exam tip Evaluate needs a verdict tied to the scenario. One-sided answers, or lists with no judgement, are capped.A3.2-054 Tap to flip back
54 / 54
Tip: click the card, then use the arrow keys to flip and move through the deck.
A3.3 Database programming SL cards drill DDL against DML and every clause the guide lists, from WHERE, BETWEEN and LIKE to GROUP BY, HAVING and JOIN, plus INSERT, UPDATE, DELETE and the cost of indexes when data changes. Exam cards ask you to write two-table queries or predict their output. HL cards cover aggregate functions, virtual and materialised views, and ACID transactions with COMMIT and ROLLBACK. The deck has 57 cards, 26 of them HL.
Read the full A3.3 revision guide for an INNER JOIN walkthrough on a school database.
A3.3 Database programming 57 cards · 26 HL
A3.3.1 Definition What is data definition language (DDL) in SQL? A3.3-001 Tap to flip A3.3.1 Definition What is data definition language (DDL) in SQL? The part of SQL that defines and changes the structure (schema) of a database: its tables, fields, data types, keys and constraints . Key commands: CREATE, ALTER, DROP. Exam tip DDL builds and reshapes the containers. It never adds, edits or retrieves the records inside them.A3.3-001 Tap to flip back
1 / 57
A3.3.1 Definition What do the DDL statements CREATE TABLE, ALTER TABLE and DROP TABLE each do? A3.3-002 Tap to flip A3.3.1 Definition What do the DDL statements CREATE TABLE, ALTER TABLE and DROP TABLE each do? CREATE TABLE: defines a new table's fields, data types and keys : CREATE TABLE Pupil (PupilID INT PRIMARY KEY, Name TEXT);ALTER TABLE: changes a table's structure : ALTER TABLE Pupil ADD Email TEXT;DROP TABLE: deletes the table and its data.Exam tip All three change the schema, not the records, which is why they are DDL. Adding a row needs INSERT (DML).A3.3-002 Tap to flip back
2 / 57
A3.3.1 Definition What is data manipulation language (DML) in SQL? A3.3-003 Tap to flip A3.3.1 Definition What is data manipulation language (DML) in SQL? The part of SQL that works with the data stored in the tables : retrieving, inserting, updating and deleting records , while the structure stays unchanged. Key commands: SELECT, INSERT, UPDATE, DELETE. Exam tip Classic trap: ALTER TABLE changes a table's design (DDL), but UPDATE changes values in its rows (DML).A3.3-003 Tap to flip back
3 / 57
A3.3.1 Compare How does DDL differ from DML in SQL? A3.3-004 Tap to flip A3.3.1 Compare How does DDL differ from DML in SQL? DDL acts on the structure (schema) : creating, altering or removing tables, fields, keys and constraints.DML acts on the data (records) inside that structure: querying, adding, changing and removing rows.DDL example: CREATE TABLE Pupil (...); DML example: INSERT INTO Pupil VALUES (...). DDL is used mainly by the DBA when building or redesigning the database; DML is used in everyday operation. Exam tip Memory hook: DDL designs the box, DML handles what is inside. Some sources call SELECT 'DQL'; treat it as DML.A3.3-004 Tap to flip back
4 / 57
A3.3.1 Compare What is the difference between DELETE FROM Pupil; and DROP TABLE Pupil;? A3.3-005 Tap to flip A3.3.1 Compare What is the difference between DELETE FROM Pupil; and DROP TABLE Pupil;? DELETE FROM Pupil; is DML : with no WHERE it removes every row , but the empty table and its structure remain .DROP TABLE Pupil; is DDL : it removes the whole table , its structure and all its data, from the schema.Exam tip DELETE empties the box; DROP throws the box away.A3.3-005 Tap to flip back
5 / 57
A3.3.1 Exam question [3 marks] A school has designed a library-loans database. Outline how DDL is used to turn this design into a working database. A3.3-006 Tap to flip A3.3.1 Exam question [3 marks] A school has designed a library-loans database. Outline how DDL is used to turn this design into a working database. CREATE TABLE builds each table in the design, e.g. CREATE TABLE Loan (...).It defines every field and its data type , e.g. LoanDate DATE. It sets primary keys , foreign keys (relationships) and constraints such as NOT NULL. ALTER and DROP later change or remove structures as the design evolves.Exam tip DDL answers earn a mark for naming a real command. Never say DDL enters or stores data: that is DML.A3.3-006 Tap to flip back
6 / 57
A3.3.2 Definition In an SQL query, what do the SELECT and FROM clauses each specify? A3.3-007 Tap to flip A3.3.2 Definition In an SQL query, what do the SELECT and FROM clauses each specify? SELECT lists the columns (fields) to show in the result; SELECT * means all columns. FROM names the table(s) the data is taken from. Example: SELECT Title, Price FROM Book;Exam tip If a question names the output fields, list exactly those. SELECT * usually loses the fields mark.A3.3-007 Tap to flip back
7 / 57
A3.3.2 Definition What does a WHERE clause do in an SQL SELECT query? A3.3-008 Tap to flip A3.3.2 Definition What does a WHERE clause do in an SQL SELECT query? It filters the rows : only records for which the condition is true appear in the result. Example: SELECT Title FROM Book WHERE Price > 20; returns only books costing more than 20. Exam tip Put text and dates in quotes ('Paris', '2025-07-01'); leave numbers unquoted.A3.3-008 Tap to flip back
8 / 57
A3.3.2 Definition What are the six relational (comparison) operators used in SQL conditions, and what does each mean? A3.3-009 Tap to flip A3.3.2 Definition What are the six relational (comparison) operators used in SQL conditions, and what does each mean? = equal to<> not equal to (!= in many systems)< less than; > greater than<= less than or equal to>= greater than or equal toExam tip SQL tests equality with a single =. Writing == is a programming-language habit, not SQL.A3.3-009 Tap to flip back
9 / 57
A3.3.2 Definition What do the logical operators AND, OR and NOT do in a WHERE clause? A3.3-010 Tap to flip A3.3.2 Definition What do the logical operators AND, OR and NOT do in a WHERE clause? AND: a row is returned only if every condition is true.OR: a row is returned if at least one condition is true.NOT: reverses a condition, excluding the rows that meet it, e.g. WHERE NOT Country = 'France'.Exam tip Each condition needs its own column name: write Age > 12 AND Age < 16, not Age > 12 AND < 16.A3.3-010 Tap to flip back
10 / 57
A3.3.2 Apply it What does WHERE Dept = 'Sales' OR Dept = 'IT' AND Salary > 50000 return, and how should it be written for high earners in either department? A3.3-011 Tap to flip A3.3.2 Apply it What does WHERE Dept = 'Sales' OR Dept = 'IT' AND Salary > 50000 return, and how should it be written for high earners in either department? AND is applied before OR , so it means Dept = 'Sales' OR (Dept = 'IT' AND Salary > 50000): all Sales staff, plus IT staff earning over 50000. Use brackets instead: WHERE (Dept = 'Sales' OR Dept = 'IT') AND Salary > 50000.Exam tip Whenever AND and OR appear in one condition, add brackets to make the intended grouping explicit.A3.3-011 Tap to flip back
11 / 57
A3.3.2 Definition What does BETWEEN do in a WHERE clause, and are the two end values included? A3.3-012 Tap to flip A3.3.2 Definition What does BETWEEN do in a WHERE clause, and are the two end values included? It selects values within a range , and the range is inclusive : both end values are included. WHERE Price BETWEEN 10 AND 20 equals WHERE Price >= 10 AND Price <= 20. It works with numbers, dates and text. Exam tip For an inclusive range, BETWEEN or >= with <= earn the mark; > with < misses the end values.A3.3-012 Tap to flip back
12 / 57
A3.3.2 Definition What does LIKE with the % wildcard do in a WHERE clause? A3.3-013 Tap to flip A3.3.2 Definition What does LIKE with the % wildcard do in a WHERE clause? It pattern-matches text when the exact value is unknown. % stands for any sequence of characters, including none : LIKE 'Sm%': starts with SmLIKE '%son': ends with sonLIKE '%art%': contains art anywhereExam tip 'Contains' needs % on both sides. Using = instead of LIKE treats % as an ordinary character.A3.3-013 Tap to flip back
13 / 57
A3.3.2 Definition What does DISTINCT do in SELECT DISTINCT City FROM Customer;? A3.3-014 Tap to flip A3.3.2 Definition What does DISTINCT do in SELECT DISTINCT City FROM Customer;? It removes duplicate rows from the result, so each different city appears only once , however many customers live there. Exam tip With several columns, DISTINCT removes rows where the whole combination repeats, not just a repeated first value.A3.3-014 Tap to flip back
14 / 57
A3.3.2 Definition What do ORDER BY, ASC and DESC do in an SQL query? A3.3-015 Tap to flip A3.3.2 Definition What do ORDER BY, ASC and DESC do in an SQL query? ORDER BY sorts the result rows by one or more columns. ASC sorts ascending (A to Z, smallest first) and is the default ; DESC sorts descending (Z to A, largest first). Example: ORDER BY Price DESC.Exam tip 'Most expensive first' or 'highest score first' needs DESC. Without ORDER BY, row order is not guaranteed.A3.3-015 Tap to flip back
15 / 57
A3.3.2 Definition What does GROUP BY do in an SQL query? A3.3-016 Tap to flip A3.3.2 Definition What does GROUP BY do in an SQL query? It collects rows with the same value in a column into one group per value , giving one summary row each. Used with an aggregate: SELECT Country, COUNT(*) FROM Customer GROUP BY Country; counts customers per country. Exam tip Every column in SELECT that is not inside an aggregate must also be listed in GROUP BY.A3.3-016 Tap to flip back
16 / 57
A3.3.2 Compare What is the difference between WHERE and HAVING in an SQL query? A3.3-017 Tap to flip A3.3.2 Compare What is the difference between WHERE and HAVING in an SQL query? WHERE filters individual rows before grouping , and cannot contain aggregate functions .HAVING filters whole groups after GROUP BY has formed them, so it can test aggregates, e.g. HAVING COUNT(*) > 3.Order in a query: WHERE, then GROUP BY, then HAVING. Exam tip Memory hook: WHERE weeds out rows, HAVING judges groups. An aggregate inside WHERE causes an error.A3.3-017 Tap to flip back
17 / 57
A3.3.2 Definition What does an INNER JOIN between two tables return? A3.3-018 Tap to flip A3.3.2 Definition What does an INNER JOIN between two tables return? It combines rows from both tables wherever a common field matches , normally the foreign key in one table and the primary key in the other, as stated after ON. Rows with no match in the other table are left out . Exam tip To keep unmatched rows from the first (left) table, use a LEFT JOIN: it fills the other table's columns with NULL.A3.3-018 Tap to flip back
18 / 57
A3.3.2 Compare How can a join of Orders and Customer on CustID be written using JOIN ... ON, and using WHERE? A3.3-019 Tap to flip A3.3.2 Compare How can a join of Orders and Customer on CustID be written using JOIN ... ON, and using WHERE? Explicit: FROM Orders JOIN Customer ON Orders.CustID = Customer.CustID Implicit: FROM Orders, Customer WHERE Orders.CustID = Customer.CustID Both give the same result ; either is acceptable in an answer. Without the matching condition, every row is paired with every row of the other table (a Cartesian product), giving wrong results. Exam tip The join condition links the FK to the PK it references. Forgetting it is one of the commonest lost marks.A3.3-019 Tap to flip back
19 / 57
A3.3.2 Explain Why are fields often written as Table.Field, such as Student.MentorID, in a query across two tables? A3.3-020 Tap to flip A3.3.2 Explain Why are fields often written as Table.Field, such as Student.MentorID, in a query across two tables? When both tables contain a field with the same name (often the PK/FK pair), an unqualified name is ambiguous : the DBMS cannot tell which column is meant, so the query fails . Prefixing the table name states exactly where each field comes from. Exam tip Qualifying every field in a two-table query costs little and avoids the ambiguity error.A3.3-020 Tap to flip back
20 / 57
A3.3.2 Exam question [2 marks] Pet(Name, Age): Rex 5, Tom 2, Fido 1, Kit 7. State what SELECT Name FROM Pet WHERE Age > 1 ORDER BY Age DESC; outputs. A3.3-021 Tap to flip A3.3.2 Exam question [2 marks] Pet(Name, Age): Rex 5, Tom 2, Fido 1, Kit 7. State what SELECT Name FROM Pet WHERE Age > 1 ORDER BY Age DESC; outputs. Output: Kit, Rex, Tom (one name per row). Rows kept: ages 7, 5 and 2 are greater than 1 ; Fido (1) is excluded . Order: DESC sorts by Age largest first : Kit (7), Rex (5), Tom (2). Only the Name column is shown, not Age. Exam tip Check each row against WHERE first, then sort. > excludes the boundary value; >= would include it.A3.3-021 Tap to flip back
21 / 57
A3.3.2 Exam question [3 marks] Club(MemberID, Name, Town, Hobbies). Construct a query listing each town once where at least one member's hobbies include 'chess'. A3.3-022 Tap to flip A3.3.2 Exam question [3 marks] Club(MemberID, Name, Town, Hobbies). Construct a query listing each town once where at least one member's hobbies include 'chess'. SELECT DISTINCT Town FROM Club WHERE Hobbies LIKE '%chess%';DISTINCT (or GROUP BY Town) so each town appears once LIKE for pattern matching, not =% on both sides of chess, so it matches anywhere in the textExam tip LIKE 'chess%' only finds hobbies that start with chess: 'includes' needs wildcards on both sides.A3.3-022 Tap to flip back
22 / 57
A3.3.2 Exam question [4 marks] Book(BookID, Title, Price, AuthorID) and Author(AuthorID, Name, Country). Construct a query listing titles and prices of Canadian authors' books, most expensive first. A3.3-023 Tap to flip A3.3.2 Exam question [4 marks] Book(BookID, Title, Price, AuthorID) and Author(AuthorID, Name, Country). Construct a query listing titles and prices of Canadian authors' books, most expensive first. SELECT Book.Title, Book.Price FROM Book JOIN Author ON Book.AuthorID = Author.AuthorID WHERE Author.Country = 'Canada' ORDER BY Book.Price DESC;Title and Price only in SELECTBoth tables , joined ON AuthorID (FK = PK)WHERE Country = 'Canada' ORDER BY Price DESC Exam tip Marks go to each part separately: fields, tables, join condition, filter, sort. Leaving out the join condition is the commonest slip.A3.3-023 Tap to flip back
23 / 57
A3.3.3 Definition What does INSERT INTO ... VALUES do in SQL? A3.3-024 Tap to flip A3.3.3 Definition What does INSERT INTO ... VALUES do in SQL? It adds a new record (row) to a table. Values are given in the same order as the listed columns : INSERT INTO Pupil (PupilID, Name, Year) VALUES ('P7', 'Mia', 12); Exam tip Text values go in quotes. The insert is rejected if it would duplicate a primary key or break another constraint.A3.3-024 Tap to flip back
24 / 57
A3.3.3 Definition What does UPDATE ... SET ... WHERE do in SQL? A3.3-025 Tap to flip A3.3.3 Definition What does UPDATE ... SET ... WHERE do in SQL? It changes values in existing records . SET gives the new value for one or more columns; WHERE chooses which rows change. Example: UPDATE Product SET Price = Price * 1.1 WHERE Category = 'Toys'; raises toy prices by 10%. Exam tip Set several columns at once by separating them with commas: SET Price = 5, Stock = 20.A3.3-025 Tap to flip back
25 / 57
A3.3.3 Definition What does DELETE FROM ... WHERE do in SQL? A3.3-026 Tap to flip A3.3.3 Definition What does DELETE FROM ... WHERE do in SQL? It removes the whole records that meet the WHERE condition; the other rows and the table itself remain. Example: DELETE FROM Loan WHERE Returned = 'Y'; Exam tip DELETE removes entire rows. To clear just one field, use UPDATE instead, e.g. SET Phone = NULL.A3.3-026 Tap to flip back
26 / 57
A3.3.3 Explain What happens if the WHERE clause is left out of an UPDATE or DELETE statement? A3.3-027 Tap to flip A3.3.3 Explain What happens if the WHERE clause is left out of an UPDATE or DELETE statement? The change applies to every row in the table , because WHERE is the only part that restricts which rows are affected. UPDATE Staff SET Salary = 30000; gives all staff that salary, and DELETE FROM Staff; empties the table (its structure remains). Exam tip Safe habit: run a SELECT with the same WHERE first to check exactly which rows will change.A3.3-027 Tap to flip back
27 / 57
A3.3.3 Definition What is an index in a relational database? A3.3-028 Tap to flip A3.3.3 Definition What is an index in a relational database? A separate data structure that keeps the values of one or more columns in sorted order, with pointers to the matching rows , like the index of a book, so the DBMS can find rows quickly without scanning the whole table . Exam tip Most DBMSs index the primary key automatically; other indexes are added on columns that are often searched or joined.A3.3-028 Tap to flip back
28 / 57
A3.3.3 Explain Why is changing data in an indexed column slower than changing data in a column with no index? A3.3-029 Tap to flip A3.3.3 Explain Why is changing data in an indexed column slower than changing data in a column with no index? The DBMS must update the row and every index on that column, so each write does extra work . Index entries must stay in sorted order , so a changed value has to be moved to its new position. The more indexes a table has, the slower INSERT, UPDATE and DELETE become. Trade-off: indexes make searching faster but changing data slower . Exam tip Updating a column that is not indexed does not touch any index, so it carries no index overhead.A3.3-029 Tap to flip back
29 / 57
A3.3.3 Compare After significant data modifications, why might an index need reorganising or rebuilding, and how do the two differ? A3.3-030 Tap to flip A3.3.3 Compare After significant data modifications, why might an index need reorganising or rebuilding, and how do the two differ? Heavy inserts, updates and deletes leave an index fragmented (half-empty pages, entries out of order), so searches need more disk reads and slow down . Reorganising compacts and reorders the existing index: quicker, suits light fragmentation.Rebuilding drops and recreates the index from scratch: slower, but fully restores efficiency.Both are usually scheduled at quiet times. Exam tip Fragmentation does not make results wrong; it makes lookups slower. The fix is maintenance, not changing the data.A3.3-030 Tap to flip back
30 / 57
A3.3.3 Apply it A retailer will load two million new rows overnight into a table with several indexes. How should the indexes be handled, and why? A3.3-031 Tap to flip A3.3.3 Apply it A retailer will load two million new rows overnight into a table with several indexes. How should the indexes be handled, and why? Disable or drop the indexes before the load, then rebuild them afterwards. Otherwise every inserted row also updates every index, making the import far slower and leaving the indexes fragmented . Rebuilding once at the end is faster overall and gives compact, efficient indexes for later queries.Exam tip Constraints such as foreign keys must still be checked, so the loaded data keeps its referential integrity.A3.3-031 Tap to flip back
31 / 57
A3.3.4 Definition HL What is an SQL aggregate function? A3.3-032 Tap to flip A3.3.4 Definition HL What is an SQL aggregate function? A function that calculates over a set of rows and returns a single value , such as a total or average: COUNT, SUM, AVG, MIN, MAX. It turns raw records into summary figures for reports and decisions . Exam tip The guide spells it AVERAGE, but the actual SQL keyword is AVG().A3.3-032 Tap to flip back
32 / 57
A3.3.4 Definition HL What does each SQL aggregate function COUNT, SUM, AVG, MIN and MAX return? A3.3-033 Tap to flip A3.3.4 Definition HL What does each SQL aggregate function COUNT, SUM, AVG, MIN and MAX return? COUNT: the number of rows or valuesSUM: the total of a numeric columnAVG: the mean of a numeric columnMIN: the smallest valueMAX: the largest valueExam tip MIN and MAX also work on text (alphabetical) and dates (earliest, latest); SUM and AVG need numbers.A3.3-033 Tap to flip back
33 / 57
A3.3.4 Compare HL What is the difference between COUNT(*), COUNT(Email) and COUNT(DISTINCT Email)? A3.3-034 Tap to flip A3.3.4 Compare HL What is the difference between COUNT(*), COUNT(Email) and COUNT(DISTINCT Email)? COUNT(*) counts all rows , including those with NULLs.COUNT(Email) counts only rows where Email is not NULL .COUNT(DISTINCT Email) counts the different non-NULL Email values, so repeats are counted once .Exam tip To count customers who gave an email address, use COUNT(Email); COUNT(*) would include those without one.A3.3-034 Tap to flip back
34 / 57
A3.3.4 Explain HL What does SELECT MAX(Price), MIN(Price) FROM Product WHERE Category = 'Garden'; return? A3.3-035 Tap to flip A3.3.4 Explain HL What does SELECT MAX(Price), MIN(Price) FROM Product WHERE Category = 'Garden'; return? One row holding the highest and lowest price among Garden products only . WHERE removes the other categories first ; the aggregates are then calculated on the rows that remain.Exam tip It returns the prices, not which products they belong to. Finding those product names needs a further query.A3.3-035 Tap to flip back
35 / 57
A3.3.4 Apply it HL A manager wants each shop's total takings. What does SELECT ShopID, SUM(Amount) FROM Sale GROUP BY ShopID; return, and how does it help? A3.3-036 Tap to flip A3.3.4 Apply it HL A manager wants each shop's total takings. What does SELECT ShopID, SUM(Amount) FROM Sale GROUP BY ShopID; return, and how does it help? One row per shop : each ShopID with the total of its Amount values .GROUP BY splits the rows into a group for each shop; SUM is calculated separately for each group .Without GROUP BY, SUM(Amount) alone would give one grand total. The summary lets managers compare branches and decide where to act, e.g. support the weakest shop. Exam tip Swap SUM for AVG, COUNT, MIN or MAX to get average sale, number of sales, or smallest and largest sale per shop.A3.3-036 Tap to flip back
36 / 57
A3.3.4 Exam question [3 marks] HL Result(StudentID, Subject, Score). Construct a query showing each subject's average score, only for subjects whose average is below 50. A3.3-037 Tap to flip A3.3.4 Exam question [3 marks] HL Result(StudentID, Subject, Score). Construct a query showing each subject's average score, only for subjects whose average is below 50. SELECT Subject, AVG(Score) FROM Result GROUP BY Subject HAVING AVG(Score) < 50;AVG(Score) with Subject in the SELECT listGROUP BY Subject, giving one average per subject HAVING AVG(Score) < 50 to filter the groups Exam tip WHERE AVG(Score) < 50 is an error: a condition on an aggregate must go in HAVING.A3.3-037 Tap to flip back
37 / 57
A3.3.5 Definition HL What is a view in a relational database? A3.3-038 Tap to flip A3.3.5 Definition HL What is a view in a relational database? A named, saved query (CREATE VIEW name AS SELECT ...) whose result users can query as if it were a table . It can pick columns, filter rows and join tables to present a tailored subset of the base tables. Exam tip Answers on views must be about views, not queries in general: stress that the view is named, saved and reused.A3.3-038 Tap to flip back
38 / 57
A3.3.5 Definition HL What is a virtual view? A3.3-039 Tap to flip A3.3.5 Definition HL What is a virtual view? A view that stores only its query definition, not the data . The query runs every time the view is used, so results are always up to date and need no extra storage , but complex views can be slow to open. Exam tip Older papers call this a dynamic view: it reflects changes to the base tables automatically.A3.3-039 Tap to flip back
39 / 57
A3.3.5 Definition HL What is a materialised (snapshot) view? A3.3-040 Tap to flip A3.3.5 Definition HL What is a materialised (snapshot) view? A view whose query result is physically stored . Reading it is fast , as joins and calculations were done in advance, but it takes storage and can become out of date until refreshed , on a schedule or on demand. Exam tip Older papers say static view. Never claim that every view stores no data: materialised views do.A3.3-040 Tap to flip back
40 / 57
A3.3.5 Apply it HL A dashboard shows last month's sales totals from millions of rows; a stock screen must show live quantities. Which view type suits each? A3.3-041 Tap to flip A3.3.5 Apply it HL A dashboard shows last month's sales totals from millions of rows; a stock screen must show live quantities. Which view type suits each? Dashboard: a materialised view . The heavy aggregation is pre-computed , so it opens quickly , and figures that change monthly only need a periodic refresh . Stock screen: a virtual view . Its query runs every time , so quantities are always current ; a stored snapshot could show stock that has already sold. Exam tip Choose by trade-off: speed of reading (materialised) against freshness of data (virtual).A3.3-041 Tap to flip back
41 / 57
A3.3.5 Explain HL How do views improve the security of a database? A3.3-042 Tap to flip A3.3.5 Explain HL How do views improve the security of a database? Users are given access to views instead of the base tables , so each user sees only the columns and rows they need . A receptionist's view of Staff might show names and phone numbers but hide salaries ; a manager's view might show only their own department's rows. Exam tip Columns are hidden by the view's SELECT list; rows are hidden by its WHERE clause.A3.3-042 Tap to flip back
42 / 57
A3.3.5 Explain HL How do views hide data complexity and simplify queries for users? A3.3-043 Tap to flip A3.3.5 Explain HL How do views hide data complexity and simplify queries for users? A complex query with joins, calculations and aggregates is written once and saved as a view. Users then write a simple query on the view , e.g. SELECT * FROM MonthlySales;, without knowing the table structure or join conditions . Reusing one tested definition also reduces errors . Exam tip Think of a view as a ready-made shortcut: an expert writes the hard query once, and everyone else just opens it.A3.3-043 Tap to flip back
43 / 57
A3.3.5 Explain HL How do views support data consistency and data independence? A3.3-044 Tap to flip A3.3.5 Explain HL How do views support data consistency and data independence? Consistency : every user and report uses the same view definition , so figures are derived from the same source in the same way .Independence : if the base tables are restructured (e.g. one table split into two), only the view definition is updated ; users and applications querying the view keep working unchanged .Exam tip Independence means the view acts as a stable interface between users and a schema that may change.A3.3-044 Tap to flip back
44 / 57
A3.3.5 Compare HL What is the difference between a read-only view and an updatable view? A3.3-045 Tap to flip A3.3.5 Compare HL What is the difference between a read-only view and an updatable view? Read-only : users can see but not change data through it. Views using aggregates, GROUP BY, DISTINCT or joins are usually read-only, because their rows do not map to single base rows.Updatable : INSERT, UPDATE or DELETE on the view change the base table ; possible when each view row maps one-to-one to a row of one table .Exam tip Read-only views protect integrity: users cannot make accidental changes, so updates go through proper channels.A3.3-045 Tap to flip back
45 / 57
A3.3.5 Exam question [4 marks] HL A hospital gives doctors, receptionists and pharmacists different views of one patient database. Explain two benefits of this approach. A3.3-046 Tap to flip A3.3.5 Exam question [4 marks] HL A hospital gives doctors, receptionists and pharmacists different views of one patient database. Explain two benefits of this approach. Security : each role sees only the data it needs , e.g. receptionists see contact details but not diagnoses .This protects confidential medical information from staff with no need to see it. Simplicity : each view hides irrelevant columns and joins .Staff get a clear, role-specific table , so they find information faster and make fewer errors. Also creditworthy: read-only views prevent accidental edits; all views use the same current base data . Exam tip Each benefit needs a point and a development linked to the hospital. Generic lists of advantages score less.A3.3-046 Tap to flip back
46 / 57
A3.3.6 Definition HL What is a transaction in a database system? A3.3-047 Tap to flip A3.3.6 Definition HL What is a transaction in a database system? A sequence of operations (reads and writes) treated as one logical unit of work : it is either completed in full or not at all , taking the database from one consistent state to another. Exam tip Example: a cash withdrawal reads the balance, then writes a new one: two operations, one transaction.A3.3-047 Tap to flip back
47 / 57
A3.3.6 Definition HL What does atomicity mean for a database transaction? A3.3-048 Tap to flip A3.3.6 Definition HL What does atomicity mean for a database transaction? The transaction is indivisible : all of its operations happen, or none do . If any step fails, the whole transaction is rolled back , so the database is never left with partial (half-finished) updates . Exam tip Atom means 'cannot be split'. Apply it to the scenario: e.g. the debit and the credit both happen, or neither does.A3.3-048 Tap to flip back
48 / 57
A3.3.6 Definition HL What does consistency mean for a database transaction? A3.3-049 Tap to flip A3.3.6 Definition HL What does consistency mean for a database transaction? A transaction must move the database from one valid state to another : afterwards every rule and constraint still holds (unique primary keys, valid foreign keys, data types, checks). A transaction that would break a rule is rolled back . Exam tip In a transfer between two accounts, consistency means the combined total is the same before and after.A3.3-049 Tap to flip back
49 / 57
A3.3.6 Definition HL What does isolation mean for database transactions? A3.3-050 Tap to flip A3.3.6 Definition HL What does isolation mean for database transactions? Transactions running at the same time do not interfere : each behaves as if it were running alone , and its uncommitted changes are hidden from others. The result equals running them one after another . It is usually enforced by locking records. Exam tip Isolation is the property that stops lost updates and dirty reads when many users work at once.A3.3-050 Tap to flip back
50 / 57
A3.3.6 Definition HL What does durability mean for a database transaction? A3.3-051 Tap to flip A3.3.6 Definition HL What does durability mean for a database transaction? Once a transaction is committed , its changes are permanent : they survive a crash or power failure , because they have been written to non-volatile storage , with a transaction log used to recover them. Exam tip Durability starts at COMMIT. Uncommitted work interrupted by a crash is rolled back instead (atomicity).A3.3-051 Tap to flip back
51 / 57
A3.3.6 Definition HL What is transaction control language (TCL), and what does BEGIN TRANSACTION do? A3.3-052 Tap to flip A3.3.6 Definition HL What is transaction control language (TCL), and what does BEGIN TRANSACTION do? TCL is the part of SQL that manages transactions : BEGIN TRANSACTION, COMMIT and ROLLBACK. BEGIN TRANSACTION marks the start of a transaction: every statement after it is treated as one unit until a COMMIT or ROLLBACK. Exam tip Some systems write START TRANSACTION or just BEGIN; the IB guide uses BEGIN TRANSACTION.A3.3-052 Tap to flip back
52 / 57
A3.3.6 Compare HL What is the difference between COMMIT and ROLLBACK? A3.3-053 Tap to flip A3.3.6 Compare HL What is the difference between COMMIT and ROLLBACK? COMMIT ends a transaction successfully : all its changes become permanent and visible to other users .ROLLBACK ends it unsuccessfully : every change since BEGIN TRANSACTION is undone , returning the database to its state before the transaction started .Either one ends the transaction and releases its locks. Exam tip A rollback happens when any step fails (an error, a broken constraint, a crash), which is how atomicity is enforced.A3.3-053 Tap to flip back
53 / 57
A3.3.6 Process HL Using TCL commands, outline the steps of a transaction that moves £100 from account A to account B. A3.3-054 Tap to flip A3.3.6 Process HL Using TCL commands, outline the steps of a transaction that moves £100 from account A to account B. BEGIN TRANSACTIONUPDATE Account SET Balance = Balance - 100 WHERE AccNo = 'A';UPDATE Account SET Balance = Balance + 100 WHERE AccNo = 'B';If both succeed and no rule is broken (e.g. A not overdrawn): COMMIT If any step fails: ROLLBACK, so neither balance changes Exam tip Without a transaction, a crash between steps 2 and 3 would make the £100 vanish.A3.3-054 Tap to flip back
54 / 57
A3.3.6 Apply it HL Two clerks try to book the last free seat on a flight at the same moment. How do transactions prevent a double booking? A3.3-055 Tap to flip A3.3.6 Apply it HL Two clerks try to book the last free seat on a flight at the same moment. How do transactions prevent a double booking? Isolation : the first transaction locks the seat's record while it books it. The second must wait until the first commits (or rolls back), then reads the updated record and finds the seat taken. Without this, both could read 'free' and one booking would overwrite the other (a lost update ).Exam tip Name the property and apply it to the scenario: a bare 'isolation' earns little.A3.3-055 Tap to flip back
55 / 57
A3.3.6 Exam question [4 marks] HL An online shop's checkout reduces stock and records the order in one transaction. Describe how each ACID property protects data integrity. A3.3-056 Tap to flip A3.3.6 Exam question [4 marks] HL An online shop's checkout reduces stock and records the order in one transaction. Describe how each ACID property protects data integrity. Atomicity : the stock reduction and the order insert both happen or both roll back , so stock never drops without an order.Consistency : constraints still hold afterwards, e.g. stock cannot fall below zero .Isolation : two shoppers buying the last item cannot both see it as available.Durability : once committed , the order survives a server crash .Exam tip One mark per property only if it is explained in context. Listing the four words alone scores very little.A3.3-056 Tap to flip back
56 / 57
A3.3.6 Exam question [3 marks] HL The power fails halfway through a database transaction. Describe how the DBMS maintains data integrity when it restarts. A3.3-057 Tap to flip A3.3.6 Exam question [3 marks] HL The power fails halfway through a database transaction. Describe how the DBMS maintains data integrity when it restarts. The transaction had not committed , so its partial changes are rolled back using the transaction log (atomicity). The database returns to its last consistent state , as it was before the transaction began. Transactions committed before the failure are kept , redone from the log if needed (durability). The failed transaction can then be run again in full. Exam tip Key line: committed work is kept, uncommitted work is undone. Durability and atomicity work together here.A3.3-057 Tap to flip back
57 / 57
Tip: click the card, then use the arrow keys to flip and move through the deck.
A3.4 Alternative databases and data warehouses (HL only) This HL deck outlines NoSQL, cloud, spatial and in-memory databases and when each fits. It then covers the six properties of data warehouse data, ETL, OLAP operations (roll-up, drill-down, slice and dice) and six data mining techniques. The last block is distributed databases: replication against partitioning, transparency, fault tolerance and ACID across sites. All 43 cards are HL.
Read the full A3.4 revision guide for examples of each database model in use.
A3.4 Alternative databases and data warehouses HL 43 cards
A3.4.1 Definition HL What is a NoSQL database? A3.4-001 Tap to flip A3.4.1 Definition HL What is a NoSQL database? A non-relational ('not only SQL') database that stores data without fixed tables, using a flexible schema (e.g. documents or key-value pairs). It scales horizontally across many servers and suits large volumes of unstructured or semi-structured data. Exam tip NoSQL means 'not only SQL', not 'no SQL'. It is not simply better than relational: it often relaxes strict consistency for speed.A3.4-001 Tap to flip back
1 / 43
A3.4.1 Compare HL How do the four main categories of NoSQL database differ in the way they store data? A3.4-002 Tap to flip A3.4.1 Compare HL How do the four main categories of NoSQL database differ in the way they store data? Key-value : each value is retrieved by a unique key (e.g. session data)Document : self-contained records such as JSON, each with its own fields (e.g. product catalogues)Column-family : related columns are grouped into column families , and rows need not share the same columns; suits huge, wide data sets (e.g. sensor logs)Graph : nodes and edges for highly connected data (e.g. social media friendships)Exam tip Social media suits graph databases: finding 'friends of friends' is a quick walk along edges, not a chain of slow table joins.A3.4-002 Tap to flip back
2 / 43
A3.4.1 Definition HL What is a cloud database? A3.4-003 Tap to flip A3.4.1 Definition HL What is a cloud database? A database hosted on a cloud provider's servers and accessed over the internet . Storage and processing scale up or down on demand (pay as you go), and as a managed service the provider handles hardware, backups and updates. Exam tip Main drawback: it depends on the network, so latency and outages matter. Spreading it across regional data centres reduces latency.A3.4-003 Tap to flip back
3 / 43
A3.4.1 Apply it HL A start-up sells its booking software as SaaS but employs no database administrators. Why might a cloud database suit it? A3.4-004 Tap to flip A3.4.1 Apply it HL A start-up sells its booking software as SaaS but employs no database administrators. Why might a cloud database suit it? Managed service : the provider runs the servers, security patches and backups , so no in-house database staff are neededScales on demand as subscriber numbers grow, paying only for what is usedCustomers anywhere reach the software over the internet Trade-off: it relies on internet connectivity and on trusting a third party with customer data Exam tip SaaS products are usually built on cloud databases: the customer rents the software, the software company rents the database.A3.4-004 Tap to flip back
4 / 43
A3.4.1 Definition HL What kind of data is a spatial database designed to store and query? A3.4-005 Tap to flip A3.4.1 Definition HL What kind of data is a spatial database designed to store and query? Location and geometric data : coordinates and shapes such as points, lines and polygons (and 3D objects). It provides spatial indexes and functions (distance, overlap, containment) and underpins geographic information systems (GIS) .Exam tip Typical queries: how far apart two places are, which zone contains an address, whether two boundaries overlap.A3.4-005 Tap to flip back
5 / 43
A3.4.1 Definition HL What is an in-memory database? A3.4-006 Tap to flip A3.4.1 Definition HL What is an in-memory database? A database that keeps all its data in main memory (RAM) rather than secondary storage, so it avoids slow disk access and is very fast . As RAM is volatile , data can be lost on power failure unless saved persistently. Exam tip Ideal for real-time analytics, online gaming and live shopping baskets; risky as the only copy of data that must survive a crash.A3.4-006 Tap to flip back
6 / 43
A3.4.1 Apply it HL An e-commerce site's products have very different attributes, and managers want a live sales dashboard. Suggest a database model for each need. A3.4-007 Tap to flip A3.4.1 Apply it HL An e-commerce site's products have very different attributes, and managers want a live sales dashboard. Suggest a database model for each need. Catalogue: a NoSQL document store , because its flexible schema lets each product hold only its own fields, and it scales out for peak traffic Dashboard: an in-memory database , because data in RAM can be updated and queried in milliseconds for real-time analytics ; lost live figures can be rebuilt from the order records Exam tip Always justify the model with a feature of the scenario; naming the model alone rarely earns a mark.A3.4-007 Tap to flip back
7 / 43
A3.4.1 Exam question [3 marks] HL A wildfire service records fire sightings, roads and evacuation zones. Explain why it would store this data in a spatial database. A3.4-008 Tap to flip A3.4.1 Exam question [3 marks] HL A wildfire service records fire sightings, roads and evacuation zones. Explain why it would store this data in a spatial database. Stores locations as coordinates and shapes: sightings as points , roads as lines , zones as polygons Spatial queries , e.g. which homes lie inside an evacuation zone, so those residents can be warnedDistance / nearest calculations, e.g. the closest fire station to a sighting, speeding the responseResults shown on maps (GIS) , revealing how fires spread so crews can be allocated Exam tip Writing 'it stores location data' is too thin: each point must say what the database does with this scenario's data.A3.4-008 Tap to flip back
8 / 43
A3.4.2 Definition HL What is a data warehouse, and which four properties describe its data? A3.4-009 Tap to flip A3.4.2 Definition HL What is a data warehouse, and which four properties describe its data? A central repository of historical data integrated from many sources , used for analysis, reporting and decision-making rather than daily transactions. Its data is subject-oriented , integrated , time-variant and non-volatile . Exam tip Remember SITN. The guide also lists append-only data and data optimised for query performance. 'Holds lots of data' alone earns little.A3.4-009 Tap to flip back
9 / 43
A3.4.2 Definition HL What is business intelligence (BI)? A3.4-010 Tap to flip A3.4.2 Definition HL What is business intelligence (BI)? The use of data analysis tools and processes (reports, dashboards, OLAP, data mining) to turn an organisation's data into information that supports business decisions , such as spotting trends, forecasting demand or setting prices. A3.4-010 Tap to flip back
10 / 43
A3.4.2 Definition HL What does it mean that data in a data warehouse is subject-oriented? A3.4-011 Tap to flip A3.4.2 Definition HL What does it mean that data in a data warehouse is subject-oriented? Data is organised around the main subjects of the business (e.g. customers, products, sales) rather than around the applications or transactions that created it, so analysts can study one subject across the whole organisation. Exam tip A cinema's ticketing and snack-bar systems are processes; 'customers' and 'films' are subjects.A3.4-011 Tap to flip back
11 / 43
A3.4.2 Definition HL What does it mean that data in a data warehouse is integrated? A3.4-012 Tap to flip A3.4.2 Definition HL What does it mean that data in a data warehouse is integrated? Data from different source systems (tills, website, CRM, spreadsheets) is combined into one consistent format : codes, units, date formats and names are standardised, so it can be compared and analysed together. Exam tip Example: 'M', 'Male' and '1' become one gender code; prices in euros and dollars are converted to a single currency.A3.4-012 Tap to flip back
12 / 43
A3.4.2 Definition HL In a data warehouse, what does the property 'time-variant' mean? A3.4-013 Tap to flip A3.4.2 Definition HL In a data warehouse, what does the property 'time-variant' mean? Every record is linked to a point or period in time (e.g. a timestamp ) and historical data is kept, so values from different times can be compared to reveal trends and change over time . Exam tip Link it to the scenario: say which comparison over time it allows. Just describing timestamps has scored nothing in past mark schemes.A3.4-013 Tap to flip back
13 / 43
A3.4.2 Compare HL How does append-only data differ from non-volatile data in a data warehouse? A3.4-014 Tap to flip A3.4.2 Compare HL How does append-only data differ from non-volatile data in a data warehouse? Append-only describes how data arrives: each new load is added alongside existing data, and old records are never overwritten or deleted Non-volatile describes stored data: once loaded it is stable and not changed by day-to-day transactions (read-only for users)Together they keep a complete, unchanging history, so a report rerun later gives the same figures Exam tip Contrast an operational database: it is volatile, constantly updated and deleted so that it shows only the current state.A3.4-014 Tap to flip back
14 / 43
A3.4.2 Explain HL Why is data in a data warehouse optimised for query performance, and how is this achieved? A3.4-015 Tap to flip A3.4.2 Explain HL Why is data in a data warehouse optimised for query performance, and how is this achieved? Analytical queries scan and aggregate millions of rows, so they must run fast: Denormalised tables (e.g. a star schema) need fewer joins Pre-calculated summaries (e.g. monthly totals) avoid recomputingHeavy indexing is affordable because data is rarely updated Kept separate from operational systems , so long reports never slow live transactions Exam tip Normalisation suits frequent updates. A warehouse is read-heavy, so redundancy that speeds up reading is acceptable.A3.4-015 Tap to flip back
15 / 43
A3.4.2 Compare HL How does an operational (OLTP) database differ from a data warehouse? A3.4-016 Tap to flip A3.4.2 Compare HL How does an operational (OLTP) database differ from a data warehouse? Purpose : OLTP records day-to-day transactions ; a warehouse supports analysis and decision-making Data : OLTP holds current , detailed data; a warehouse holds historical , often summarised dataAccess : OLTP has frequent small reads and writes ; a warehouse is mostly read-only with large queriesDesign : OLTP is normalised ; a warehouse is often denormalised Users : clerks and customers versus analysts and managersA3.4-016 Tap to flip back
16 / 43
A3.4.2 Process HL Outline the three stages of ETL used to load a data warehouse. A3.4-017 Tap to flip A3.4.2 Process HL Outline the three stages of ETL used to load a data warehouse. Extract : copy the relevant data from each source system without disrupting itTransform : clean it (errors, duplicates, blanks), standardise formats, codes and units, then filter and aggregate it to fit the warehouse schemaLoad : write the prepared data into the warehouse, usually in scheduled batches, time-stamped and appended to the existing dataExam tip Writing out the acronym alone scores nothing: explain what happens at each stage. Cleaning belongs in Transform.A3.4-017 Tap to flip back
17 / 43
A3.4.2 Exam question [4 marks] HL A gym chain combines data from its booking app, tills and fitness trackers in a data warehouse. Explain two benefits for its managers. A3.4-018 Tap to flip A3.4.2 Exam question [4 marks] HL A gym chain combines data from its booking app, tills and fitness trackers in a data warehouse. Explain two benefits for its managers. Integrated data gives one consistent view of each member, so managers can link attendance with spendingTime-variant history lets them compare months and years, spotting trends (e.g. January sign-up peaks) to plan staffing and offersOptimised for queries and separate, so complex reports run quickly without slowing the live booking systemSupports OLAP and data mining , e.g. finding members likely to cancel Exam tip Explain needs a reason for each benefit ('so that...') tied to the gym. Generic benefits with no scenario link are usually capped.A3.4-018 Tap to flip back
18 / 43
A3.4.3 Definition HL What is online analytical processing (OLAP)? A3.4-019 Tap to flip A3.4.3 Definition HL What is online analytical processing (OLAP)? Technology for fast, interactive, multidimensional analysis of warehouse data. Data is arranged as a data cube of dimensions (e.g. product, region, time) holding measures such as sales, which analysts can summarise and view from any angle. Exam tip OLAP analyses history; OLTP records live transactions. One letter apart, completely different jobs.A3.4-019 Tap to flip back
19 / 43
A3.4.3 Compare HL In OLAP, what do the roll-up, drill-down, slice and dice operations each do to a data cube? A3.4-020 Tap to flip A3.4.3 Compare HL In OLAP, what do the roll-up, drill-down, slice and dice operations each do to a data cube? Roll-up : aggregates to a higher level (daily → monthly → yearly totals)Drill-down : moves to finer detail (country → region → store)Slice : fixes one value of one dimension , giving a single layer (e.g. only 2025 sales)Dice : selects values on two or more dimensions , giving a smaller sub-cube (e.g. shoes and bags, North region, first half-year)Exam tip Pivot, rotating the cube to view it along different axes, is a fifth operation worth knowing.A3.4-020 Tap to flip back
20 / 43
A3.4.3 Exam question [4 marks] HL A clothing retailer's managers use OLAP on its data warehouse. Explain how OLAP supports their business decisions. A3.4-021 Tap to flip A3.4.3 Exam question [4 marks] HL A clothing retailer's managers use OLAP on its data warehouse. Explain how OLAP supports their business decisions. Sales sit in a multidimensional cube (product, store, time), so managers analyse them from any angle without new programs Pre-aggregated totals answer in seconds , so questions can be explored interactivelyDrill-down finds a trend's cause, e.g. falling coat sales traced to two stores, so action is targetedRoll-up and slice compare regions or seasons, so stock and budgets match demandHistorical trends support forecasting next season's orders Exam tip Pair each OLAP feature with the decision it helps this retailer make. Listing operations without a purpose earns little.A3.4-021 Tap to flip back
21 / 43
A3.4.3 Definition HL What is data mining, and what does it aim to find? A3.4-022 Tap to flip A3.4.3 Definition HL What is data mining, and what does it aim to find? Using algorithms to analyse large data sets (often in a data warehouse) to discover previously unknown patterns, relationships, trends or anomalies that support decisions and predictions. Exam tip The key idea is discovery: the patterns are not known in advance, unlike the answer to an ordinary query.A3.4-022 Tap to flip back
22 / 43
A3.4.3 Compare HL How do OLAP and data mining differ in their role in business intelligence? A3.4-023 Tap to flip A3.4.3 Compare HL How do OLAP and data mining differ in their role in business intelligence? OLAP is user-driven : analysts ask known questions and explore summarised cube data from different anglesData mining is discovery-driven : algorithms search detailed data for hidden patterns nobody asked aboutOLAP outputs summaries and reports; data mining outputs models, rules, clusters or predictions They are complementary : mining finds a pattern, then OLAP lets managers examine it in context Exam tip OLAP answers the questions you ask; data mining surfaces questions you did not know to ask.A3.4-023 Tap to flip back
23 / 43
A3.4.3 Definition HL What is classification as a data mining technique? A3.4-024 Tap to flip A3.4.3 Definition HL What is classification as a data mining technique? A supervised technique: a model is trained on labelled historical data , then assigns new records to predefined classes . Use: a bank labelling loan applicants 'low risk' or 'high risk' from past repayment records. A3.4-024 Tap to flip back
24 / 43
A3.4.3 Definition HL What is clustering as a data mining technique? A3.4-025 Tap to flip A3.4.3 Definition HL What is clustering as a data mining technique? An unsupervised technique that groups records by similarity with no predefined labels : the groups emerge from the data itself. Use: customer segmentation , e.g. finding types of shopper so each group gets targeted marketing. A3.4-025 Tap to flip back
25 / 43
A3.4.3 Exam question [4 marks] HL A streaming service mines its subscriber data. Compare how it could use classification and clustering. A3.4-026 Tap to flip A3.4.3 Exam question [4 marks] HL A streaming service mines its subscriber data. Compare how it could use classification and clustering. Classification uses predefined labels (e.g. 'will cancel' or 'will stay'), whereas clustering has no labels and discovers its own groups Classification is supervised , trained on past subscribers with known outcomes; clustering is unsupervised Classification predicts a new subscriber's class (target likely cancellers with offers); clustering describes segments (e.g. weekend bingers) for recommendations Similarity : both group subscribers to support targeted decisionsExam tip Compare means mentioning both techniques in every point, including at least one similarity, and tying each to the scenario.A3.4-026 Tap to flip back
26 / 43
A3.4.3 Definition HL What is regression as a data mining technique? A3.4-027 Tap to flip A3.4.3 Definition HL What is regression as a data mining technique? A supervised technique that models the relationship between variables to predict a continuous numeric value from historical data. Use: forecasting next month's sales from advertising spend and season. Exam tip Classification predicts a category; regression predicts a number. Old papers call this forecasting or predictive modelling.A3.4-027 Tap to flip back
27 / 43
A3.4.3 Definition HL What is association rule discovery? A3.4-028 Tap to flip A3.4.3 Definition HL What is association rule discovery? A technique that finds if-then rules between items that frequently occur together in the same transaction (if pasta, then sauce), rated by support and confidence. Use: market-basket analysis for product placement, bundles and recommendations. A3.4-028 Tap to flip back
28 / 43
A3.4.3 Compare HL How does sequential pattern discovery differ from association rule discovery? A3.4-029 Tap to flip A3.4.3 Compare HL How does sequential pattern discovery differ from association rule discovery? Association rules find items that occur together in the same transaction ; order does not matterSequential patterns find events that occur in a particular order over time , across separate transactions or visitsExample: association finds tents and pegs bought together; sequential finds a tent bought, then a sleeping bag weeks later Sequential use: predicting a customer's next purchase or a visitor's next web page A3.4-029 Tap to flip back
29 / 43
A3.4.3 Definition HL What is anomaly detection in data mining? A3.4-030 Tap to flip A3.4.3 Definition HL What is anomaly detection in data mining? Identifying outliers : records that deviate significantly from the normal pattern in the data, which are flagged for investigation. Uses: fraud detection , network intrusion, faulty sensors and manufacturing defects. Exam tip Old papers call it deviation detection. An outlier may be an error, fraud or a genuine new trend, so it is investigated, not auto-deleted.A3.4-030 Tap to flip back
30 / 43
A3.4.3 Exam question [4 marks] HL Describe how anomaly detection could help a bank spot fraudulent use of a customer's debit card. A3.4-031 Tap to flip A3.4.3 Exam question [4 marks] HL Describe how anomaly detection could help a bank spot fraudulent use of a customer's debit card. Build a model of normal behaviour for the customer from past transactions (usual amounts, places, times, shops) Set thresholds for how far a transaction may deviate Compare each new transaction with the model Flag those beyond the threshold, e.g. a large purchase abroad minutes after a local oneInvestigate : block the card or contact the customer; confirmed cases refine the modelExam tip Describe the steps in words. An SQL query is not accepted as a description of the technique.A3.4-031 Tap to flip back
31 / 43
A3.4.3 Apply it HL A supermarket wants to group shoppers, forecast weekly revenue, place items bought together, and flag suspicious refunds. Which data mining technique suits each? A3.4-032 Tap to flip A3.4.3 Apply it HL A supermarket wants to group shoppers, forecast weekly revenue, place items bought together, and flag suspicious refunds. Which data mining technique suits each? Group shoppers: clustering (no labels; finds similar groups) Forecast revenue: regression (predicts a numeric value) Items bought together: association rule discovery (if-then rules within baskets) Suspicious refunds: anomaly detection (outliers from the normal pattern) Exam tip Ask: are there known labels (classification), no labels (clustering), a number to predict (regression), or an order in time (sequential)?A3.4-032 Tap to flip back
32 / 43
A3.4.4 Definition HL What is a distributed database? A3.4-033 Tap to flip A3.4.4 Definition HL What is a distributed database? A single logical database whose data is stored across several sites (nodes) connected by a network. A distributed DBMS manages it so that users and applications see it as one database . Exam tip Contrast a centralised database: everything at one site, giving a single point of failure and a bottleneck.A3.4-033 Tap to flip back
33 / 43
A3.4.4 Explain HL Why is it difficult to keep replicated copies consistent across the sites of a distributed database? A3.4-034 Tap to flip A3.4.4 Explain HL Why is it difficult to keep replicated copies consistent across the sites of a distributed database? The same data may be replicated at several sites , and different users may update it at the same time If an update reaches one copy but not another (network delay or node failure), sites return conflicting values This causes wrong decisions, e.g. one seat sold twice So updates must be propagated to all copies and concurrent writes coordinated Exam tip Strong consistency: every read sees the latest write, but it is slower. Eventual consistency: copies briefly differ, then converge.A3.4-034 Tap to flip back
34 / 43
A3.4.4 Explain HL What role do the ACID properties play in a distributed database? A3.4-035 Tap to flip A3.4.4 Explain HL What role do the ACID properties play in a distributed database? They keep transactions reliable when one transaction spans several sites: Atomicity : it commits at every site or none Consistency : all sites move from one valid state to anotherIsolation : concurrent transactions at different sites do not see each other's partial updatesDurability : once committed, changes survive the failure of any nodeExam tip Harder than on one server, because the sites communicate over a network that can delay messages or fail.A3.4-035 Tap to flip back
35 / 43
A3.4.4 Exam question [3 marks] HL An airline's booking updates a seat record on one node and a payment record on another. Describe how atomicity is maintained. A3.4-036 Tap to flip A3.4.4 Exam question [3 marks] HL An airline's booking updates a seat record on one node and a payment record on another. Describe how atomicity is maintained. The two updates form one indivisible transaction A coordinator asks both nodes to prepare and vote, and commits only if all vote yes (two-phase commit) If either node fails, the transaction is rolled back on every node , so no seat is held without payment On success, the commit makes both changes permanent on all nodes Exam tip Key phrase: all nodes or none. Stating that a failure anywhere rolls back everywhere is what earns the marks.A3.4-036 Tap to flip back
36 / 43
A3.4.4 Definition HL What is concurrency control in a distributed database? A3.4-037 Tap to flip A3.4.4 Definition HL What is concurrency control in a distributed database? Mechanisms that manage simultaneous transactions at different sites so they do not interfere (e.g. lost updates). Examples: distributed locking (pessimistic: lock before changing) or optimistic control (check for conflicts at commit). Exam tip Pessimistic assumes conflicts are likely, so it locks first; optimistic assumes they are rare, so it checks last.A3.4-037 Tap to flip back
37 / 43
A3.4.4 Compare HL How does replication differ from data partitioning in a distributed database? A3.4-038 Tap to flip A3.4.4 Compare HL How does replication differ from data partitioning in a distributed database? Replication stores copies of the same data at several sites; partitioning (fragmentation, sharding) splits the data so each part is stored at one siteReplication improves availability and fast local reads; partitioning improves scalability and keeps data near the site that uses it Replication slows writes, as every copy must be updated; with partitioning, queries needing several parts must combine results across sites Exam tip Large systems often do both: partition for scale, then replicate each partition for fault tolerance.A3.4-038 Tap to flip back
38 / 43
A3.4.4 Compare HL What is the difference between distribution transparency and location transparency? A3.4-039 Tap to flip A3.4.4 Compare HL What is the difference between distribution transparency and location transparency? Distribution transparency is the overall goal: users interact with the system as if it were one centralised database , unaware it is spread across sitesLocation transparency is one part of it: users query data without knowing which site physically stores it , and data can move without queries changingOther parts include replication and fragmentation transparency A3.4-039 Tap to flip back
39 / 43
A3.4.4 Definition HL What is global query processing in a distributed database? A3.4-040 Tap to flip A3.4.4 Definition HL What is global query processing in a distributed database? Handling a query that needs data from several sites : it is split into sub-queries run at the sites holding the data, and the partial results are combined into one answer, using a plan that minimises network transfer. A3.4-040 Tap to flip back
40 / 43
A3.4.4 Definition HL What is fault tolerance in a distributed database? A3.4-041 Tap to flip A3.4.4 Definition HL What is fault tolerance in a distributed database? The ability to keep working correctly when a node or network link fails , because replicas at other sites take over (redundancy and failover), so there is no single point of failure and users may not notice. A3.4-041 Tap to flip back
41 / 43
A3.4.4 Apply it HL A retailer's single database server is overloaded as it expands into new countries. Explain how a distributed database would help it scale. A3.4-042 Tap to flip A3.4.4 Apply it HL A retailer's single database server is overloaded as it expands into new countries. Explain how a distributed database would help it scale. Horizontal scaling : capacity grows by adding nodes for each new region instead of buying an ever bigger serverPartitioning by region spreads data and query load, so performance holds as users growData sits near local users , cutting network delay Location transparency means applications need no changes as sites are addedExam tip Vertical scaling (a bigger single server) hits a hardware ceiling; horizontal scaling keeps going by adding machines.A3.4-042 Tap to flip back
42 / 43
A3.4.4 Explain HL How does spreading a database over many sites affect its security, and which measures help? A3.4-043 Tap to flip A3.4.4 Explain HL How does spreading a database over many sites affect its security, and which measures help? More sites and network links give attackers more points of entryData travelling between sites can be intercepted, so it is encrypted in transit and at rest Authentication and access control must be enforced consistently at every siteInput validation stops bad data spreading to replicas Data held in several countries must meet each one's data protection laws A3.4-043 Tap to flip back
43 / 43
Tip: click the card, then use the arrow keys to flip and move through the deck.
A4 Machine learning flashcards Machine learning is one of the biggest additions to the 2025 guide. Most of it is HL, but A4.1 and A4.4 are for everyone. The four decks hold 168 cards.
A4.1 Machine learning fundamentals This deck separates the five approaches the guide names (supervised, unsupervised, reinforcement, deep and transfer learning) and links each to uses such as market basket analysis, medical imaging and sentiment analysis. The second half is hardware: when a laptop is enough, and when a task needs GPUs, TPUs, ASICs, FPGAs, edge devices, cloud platforms or an HPC centre. All 29 cards are for SL and HL.
Read the full A4.1 revision guide for a quick exercise matching problems to types of learning.
A4.1 Machine learning fundamentals 29 cards
A4.1.1 Definition What is machine learning (ML), as a branch of artificial intelligence? A4.1-001 Tap to flip A4.1.1 Definition What is machine learning (ML), as a branch of artificial intelligence? A branch of AI in which a system learns patterns from data to make predictions or decisions without being explicitly programmed with rules for each case. Its performance improves with experience (more data). Exam tip The model is the set of rules the computer has learned; training is how it learns them.A4.1-001 Tap to flip back
1 / 29
A4.1.1 Compare In traditional programming a human writes the rules. What changes when a problem is solved with machine learning instead? A4.1-002 Tap to flip A4.1.1 Compare In traditional programming a human writes the rules. What changes when a problem is solved with machine learning instead? Traditional programming : rules + data go in, output comes out; the programmer designs every rule.Machine learning : data (often with known outputs) goes in and the algorithm learns the rules itself , producing a model .The model then predicts outputs for new data and can improve with more data , whereas fixed rules change only when a programmer rewrites them. Exam tip Memory hook: traditional = rules + data → answers; ML = data + answers → rules.A4.1-002 Tap to flip back
2 / 29
A4.1.1 Definition What is supervised learning, and what kind of data does it need? A4.1-003 Tap to flip A4.1.1 Definition What is supervised learning, and what kind of data does it need? Machine learning trained on labelled data : every input is paired with its known correct output (label). The model learns the input-to-output mapping so it can predict labels for new, unseen data , either a category (classification ) or a number (regression ). Exam tip Classification predicts a category (spam or not spam); regression predicts a continuous value (house price).A4.1-003 Tap to flip back
3 / 29
A4.1.1 Definition What is unsupervised learning, and what does it look for? A4.1-004 Tap to flip A4.1.1 Definition What is unsupervised learning, and what does it look for? Machine learning trained on unlabelled data , so there are no known correct outputs . The algorithm discovers hidden structure by itself, such as clusters of similar items or associations between items that often occur together. Exam tip Saying it uses 'no training data' is wrong: it trains on data, just data without labels.A4.1-004 Tap to flip back
4 / 29
A4.1.1 Definition How does a reinforcement learning agent learn what to do? A4.1-005 Tap to flip A4.1.1 Definition How does a reinforcement learning agent learn what to do? By trial and error : the agent takes actions in an environment , receives rewards or penalties , and updates its policy (strategy) to maximise cumulative reward over time. No labelled dataset is needed; the reward signal is the only feedback. Exam tip It balances exploitation (repeating actions that earned rewards) with exploration (trying new actions). Think: training a dog with treats.A4.1-005 Tap to flip back
5 / 29
A4.1.1 Definition What is deep learning, and what does 'deep' refer to? A4.1-006 Tap to flip A4.1.1 Definition What is deep learning, and what does 'deep' refer to? A subset of ML using artificial neural networks with many hidden layers ('deep' = many layers). Each layer learns more complex features than the last, so features are learned automatically from raw data. Needs large datasets and heavy processing power . Exam tip Image example: early layers detect edges, middle layers shapes, final layers whole objects such as faces.A4.1-006 Tap to flip back
6 / 29
A4.1.1 Definition What is transfer learning in machine learning? A4.1-007 Tap to flip A4.1.1 Definition What is transfer learning in machine learning? Reusing a model pre-trained on a large dataset for one task as the starting point for a related task . Its general features are kept and it is fine-tuned on a smaller task-specific dataset , saving labelled data, training time and compute . Exam tip Example: a model pre-trained on millions of everyday photos is fine-tuned to spot crop disease from a few hundred leaf images.A4.1-007 Tap to flip back
7 / 29
A4.1.1 Definition What is natural language processing (NLP), and why is human language hard for machines? A4.1-008 Tap to flip A4.1.1 Definition What is natural language processing (NLP), and why is human language hard for machines? Using ML to process and understand human language in text or speech, e.g. translation, chatbots and summarising. It is hard because meaning depends on context : words are ambiguous , spoken grammar is loose, and sarcasm, slang and spelling errors are common. Exam tip Modern NLP relies on deep learning (transformers) pre-trained on huge text collections, then fine-tuned: deep learning plus transfer learning.A4.1-008 Tap to flip back
8 / 29
A4.1.1 Definition What is sentiment analysis, and which type of machine learning does it usually use? A4.1-009 Tap to flip A4.1.1 Definition What is sentiment analysis, and which type of machine learning does it usually use? An NLP task that classifies the opinion in text (reviews, social media posts) as positive, negative or neutral . It usually uses supervised learning on text labelled with its sentiment, often with deep learning models fine-tuned from a pre-trained language model. Exam tip Sarcasm trips models up: 'Great, it broke on day one' uses a positive word for a negative opinion.A4.1-009 Tap to flip back
9 / 29
A4.1.1 Definition What is object detection and classification in images? A4.1-010 Tap to flip A4.1.1 Definition What is object detection and classification in images? Finding where each object is in an image (usually marked with a bounding box ) and assigning it to a class such as car, person or cyclist. Uses supervised learning on human-annotated images and deep learning (CNNs). Exam tip Detection = where; classification = what. Used in self-driving cars, security cameras and medical scans.A4.1-010 Tap to flip back
10 / 29
A4.1.1 Compare Compare supervised and unsupervised learning in terms of data, aim, output and evaluation. A4.1-011 Tap to flip A4.1.1 Compare Compare supervised and unsupervised learning in terms of data, aim, output and evaluation. Data : supervised uses labelled data; unsupervised uses unlabelled data.Aim : supervised learns to predict a known target ; unsupervised discovers unknown structure (clusters, associations).Output : supervised gives a class or value; unsupervised gives groups or rules that humans must interpret .Evaluation : supervised accuracy is measured against the labels ; unsupervised is harder to evaluate as there is no correct answer.Cost : supervised needs costly human labelling ; unsupervised avoids it.Exam tip Every point must name both types: two separate descriptions are not a comparison.A4.1-011 Tap to flip back
11 / 29
A4.1.1 Explain Why can a single machine learning system count as both deep learning and supervised learning? A4.1-012 Tap to flip A4.1.1 Explain Why can a single machine learning system count as both deep learning and supervised learning? The five types describe different aspects : Supervised, unsupervised and reinforcement learning describe how the model learns (labels, no labels, rewards).Deep learning describes the model's structure (many-layered neural networks).Transfer learning describes reusing a pre-trained model .So a CNN trained on labelled X-rays is DL and SL, and fine-tuning a pre-trained CNN adds TL. Exam tip In 'which type?' questions several can be right: medical imaging is often SL + DL + TL. Justify each one.A4.1-012 Tap to flip back
12 / 29
A4.1.1 Process Outline the main steps in building and training a supervised learning model. A4.1-013 Tap to flip A4.1.1 Process Outline the main steps in building and training a supervised learning model. Collect data and label each example with its correct output. Split it into training, validation and test sets.Train : the model predicts outputs for training inputs, compares them with the labels and uses the error to adjust its parameters.Repeat until the error is acceptably low, tuning with the validation set.Test on unseen data, then deploy it to predict labels for new inputs.Exam tip Never judge the model on its training data: it may have memorised it (overfitting). The test set must stay unseen.A4.1-013 Tap to flip back
13 / 29
A4.1.1 Apply it A supermarket wants to find which products are often bought together from loyalty-card transactions. Which type of machine learning fits, and why? A4.1-014 Tap to flip A4.1.1 Apply it A supermarket wants to find which products are often bought together from loyalty-card transactions. Which type of machine learning fits, and why? Unsupervised learning , specifically market basket analysis (association-rule algorithms such as Apriori).There are no labels or target output: the patterns are not known in advance. The algorithm finds frequent itemsets and association rules (customers who buy X are likely to buy Y). Results drive cross-selling , product placement and promotions. Exam tip A rule X ⇒ Y means buying X makes buying Y more likely, e.g. pasta ⇒ pasta sauce.A4.1-014 Tap to flip back
14 / 29
A4.1.1 Apply it A hospital has 2,000 brain MRI scans labelled 'tumour' or 'no tumour' by radiologists. Which types of machine learning suit this, and why? A4.1-015 Tap to flip A4.1.1 Apply it A hospital has 2,000 brain MRI scans labelled 'tumour' or 'no tumour' by radiologists. Which types of machine learning suit this, and why? Supervised learning : each scan has a label (diagnosis), so the model learns to map image to diagnosis and predict it for new scans .Deep learning : a CNN learns subtle visual features automatically from pixels, with no manual feature extraction.Transfer learning : 2,000 scans is few , so fine-tune a model pre-trained on millions of general images instead of training from scratch.Exam tip Labelled medical data is scarce: experts must annotate it and privacy limits sharing. That scarcity is the case for transfer learning.A4.1-015 Tap to flip back
15 / 29
A4.1.1 Exam question [4 marks] An online shop wants to group its 2 million customers by shopping behaviour, but no groups have been defined. Explain why unsupervised learning suits this. A4.1-016 Tap to flip A4.1.1 Exam question [4 marks] An online shop wants to group its 2 million customers by shopping behaviour, but no groups have been defined. Explain why unsupervised learning suits this. No labels exist : the segments are not known in advance, so there is no target for supervised learning to learn.Clustering groups customers with similar behaviour (spend, products, visit times) without human guidance.It can reveal unexpected segments that staff would not think to look for. It avoids the time and cost of manually labelling 2 million customers. Humans must still interpret each cluster before targeting it with marketing. Exam tip 'Because the answer is unknown' alone earns nothing. Say what is unknown here (the customer groups) and why that rules out supervised learning.A4.1-016 Tap to flip back
16 / 29
A4.1.1 Exam question [3 marks] A warehouse robot must learn to navigate between shelves while workers and trolleys keep moving. Justify using reinforcement learning rather than supervised learning. A4.1-017 Tap to flip A4.1.1 Exam question [3 marks] A warehouse robot must learn to navigate between shelves while workers and trolleys keep moving. Justify using reinforcement learning rather than supervised learning. The warehouse is dynamic : the robot (agent ) keeps learning in real time by interacting with its environment . Rewards (quick delivery) and penalties (collisions) update its policy through trial and error .RL finds an optimal sequence of moves and copes with delayed rewards . SL needs a static labelled dataset covering every situation, which is impractical, and retraining when the layout changes. Exam tip Naming RL scores nothing by itself. Structure each point: the issue, its link to the moving warehouse, why SL falls short.A4.1-017 Tap to flip back
17 / 29
A4.1.2 Explain What machine learning work suits a standard laptop, and why is it unsuitable for training large deep learning models? A4.1-018 Tap to flip A4.1.2 Explain What machine learning work suits a standard laptop, and why is it unsuitable for training large deep learning models? Suitable for learning, prototyping and testing with small datasets and simple models, and for running inference with small trained models.Unsuitable for large deep learning training: a consumer CPU has few cores and at most a low-end GPU, so the parallel matrix maths would take far too long.Limited RAM and storage mean large datasets may not fit , and long runs cause overheating and throttling . Exam tip Laptop = development and testing stage. Move to GPU servers, cloud or HPC only when the data or model size demands it.A4.1-018 Tap to flip back
18 / 29
A4.1.2 Definition What is an edge device in machine learning? A4.1-019 Tap to flip A4.1.2 Definition What is an edge device in machine learning? Hardware that runs ML models at or near the source of the data (phone, car, camera, drone) instead of sending data to a central data centre. Gives low latency and works offline , but has limited processing, memory, storage and power . Exam tip Edge computing is the scenario; the edge device is the hardware. Inside: energy-efficient CPUs, small GPUs, ASICs or FPGAs.A4.1-019 Tap to flip back
19 / 29
A4.1.2 Definition What is an application-specific integrated circuit (ASIC), and where is it used in machine learning? A4.1-020 Tap to flip A4.1.2 Definition What is an application-specific integrated circuit (ASIC), and where is it used in machine learning? A chip custom-designed for one specific task , with circuitry fixed at manufacture . For ML it gives very fast, low-power processing, so it is built into phones, consumer electronics and embedded systems . Google's TPU is an ASIC. Exam tip Downside: it cannot be changed after manufacture and is costly to design, so it pays off only at high volume.A4.1-020 Tap to flip back
20 / 29
A4.1.2 Definition What is a cloud-based platform for machine learning? A4.1-021 Tap to flip A4.1.2 Definition What is a cloud-based platform for machine learning? Remote data centres that provide virtualised compute (CPUs, GPUs, TPUs) and storage on demand over the internet. Users pay for what they use and scale resources up or down with the workload, without buying or maintaining hardware. Exam tip Best for bursty or experimental workloads. Drawbacks: ongoing costs, time to upload large datasets, and data held off-site.A4.1-021 Tap to flip back
21 / 29
A4.1.2 Definition What is a high-performance computing (HPC) centre, and when is it used for machine learning? A4.1-022 Tap to flip A4.1.2 Definition What is a high-performance computing (HPC) centre, and when is it used for machine learning? A facility of clusters of servers , together thousands of processors (CPUs and GPUs) linked by fast networks and working in parallel . Used for extreme-scale work such as training very large models on vast datasets or detailed simulations. Exam tip Older IB papers call this a 'supercomputer'. It suits jobs too big for even a powerful single GPU server.A4.1-022 Tap to flip back
22 / 29
A4.1.2 Explain Describe the three main factors to consider when choosing hardware for a machine learning task. A4.1-023 Tap to flip A4.1.2 Explain Describe the three main factors to consider when choosing hardware for a machine learning task. Processing : how much computation is needed, driven by dataset size , model complexity , repeated tuning runs and real-time demands; heavy training needs parallel hardware (GPUs/TPUs).Storage : enough capacity for datasets, checkpoints and models, and enough speed (SSDs, distributed storage) to keep processors fed.Scalability : the ability to grow with more data or users, by adding GPUs, clustering servers or renting more cloud resources.Exam tip Every choice also balances cost and energy use. In answers, tie each factor to the scenario rather than just naming it.A4.1-023 Tap to flip back
23 / 29
A4.1.2 Compare Compare the hardware demands of training a machine learning model with those of using it for inference. A4.1-024 Tap to flip A4.1.2 Compare Compare the hardware demands of training a machine learning model with those of using it for inference. Training adjusts the model's parameters over a large dataset many times ; inference runs the finished model on a new input to make one prediction .Training is far more compute-intensive , so it needs GPUs/TPUs , often clustered or in the cloud; a single inference is light enough for a CPU or edge device . Training is occasional; inference runs continuously , so serving millions of users still needs scalable servers or cloud. Exam tip Don't claim all ML needs a GPU: a phone runs face-unlock inference on its own low-power chip.A4.1-024 Tap to flip back
24 / 29
A4.1.2 Explain Why are GPUs usually preferred over CPUs for training deep learning models on large datasets? A4.1-025 Tap to flip A4.1.2 Explain Why are GPUs usually preferred over CPUs for training deep learning models on large datasets? Training is dominated by matrix operations (multiplications, convolutions) that split into many independent calculations. A GPU has thousands of small cores built for parallel processing , whereas a CPU has a few powerful cores suited to sequential tasks. So the GPU performs these calculations simultaneously , greatly reducing training time ; on a CPU alone, training on a large dataset would take far too long. Exam tip 'GPUs are faster' earns nothing alone. Give the reason: many parallel cores suit the matrix maths of neural networks.A4.1-025 Tap to flip back
25 / 29
A4.1.2 Compare Distinguish between a GPU and a TPU as hardware for machine learning. A4.1-026 Tap to flip A4.1.2 Compare Distinguish between a GPU and a TPU as hardware for machine learning. A GPU is a general-purpose parallel processor first designed for graphics; a TPU is Google's ASIC built only for neural-network ML . A GPU is flexible (graphics, simulations, most ML frameworks); a TPU is optimised for tensor (matrix) operations , so for that work it is typically faster and more energy-efficient . GPUs are installed in laptops, workstations and servers; TPUs are mostly rented through cloud platforms . Exam tip A tensor is a multi-dimensional array: a single number is 0D, a list 1D, a table 2D, and so on.A4.1-026 Tap to flip back
26 / 29
A4.1.2 Compare Compare ASICs and FPGAs as chips for accelerating ML workloads. A4.1-027 Tap to flip A4.1.2 Compare Compare ASICs and FPGAs as chips for accelerating ML workloads. An ASIC's circuitry is fixed at manufacture ; an FPGA can be reconfigured after manufacture by loading a new design. An ASIC is faster and more power-efficient at its single task; an FPGA is less efficient but flexible . New kinds of operation need a new ASIC , whereas an FPGA is simply reprogrammed . ASICs suit mass-produced devices (phones); FPGAs suit accelerating inference where requirements may change, and prototyping. Exam tip Field-programmable means it can be reprogrammed 'in the field', after it has left the factory.A4.1-027 Tap to flip back
27 / 29
A4.1.2 Apply it Suggest suitable hardware for: (a) a student prototyping a small classifier; (b) training a huge language model; (c) a smart doorbell recognising faces. A4.1-028 Tap to flip A4.1.2 Apply it Suggest suitable hardware for: (a) a student prototyping a small classifier; (b) training a huge language model; (c) a smart doorbell recognising faces. (a) Standard laptop : a multi-core CPU, moderate RAM and an SSD are enough for small datasets, learning, prototyping and running small models. (b) HPC centre or cloud GPU/TPU clusters : massive parallel processing , huge fast storage and the ability to scale across many machines. (c) Edge device with a low-power ASIC or small GPU: runs inference locally for low latency , works offline and keeps video private. Exam tip Match hardware to the job: prototyping, heavy training or real-time inference. Justify using processing, storage and scalability.A4.1-028 Tap to flip back
28 / 29
A4.1.2 Exam question [4 marks] A power-line inspection drone must dodge obstacles in real time despite weak signal. Explain why its ML model should run on an edge device. A4.1-029 Tap to flip A4.1.2 Exam question [4 marks] A power-line inspection drone must dodge obstacles in real time despite weak signal. Explain why its ML model should run on an edge device. Processing on the drone avoids a round trip to a distant server , so latency is low and it can react to obstacles in real time . It keeps working with poor or no connectivity , so losing signal cannot stop it steering. Only results are sent back, saving bandwidth and reducing exposure of data in transit . Not streaming video and using low-power edge chips saves battery , so the drone flies longer. Exam tip Each point needs its consequence for the drone: 'lower latency' alone is only half the answer.A4.1-029 Tap to flip back
29 / 29
Tip: click the card, then use the arrow keys to flip and move through the deck.
A4.2 Data preprocessing (HL only) This HL deck is the "garbage in, garbage out" topic: outliers, duplicates, incorrect, irrelevant and badly formatted data, three ways to handle missing values, and when to normalise or standardise. Then come filter, wrapper and embedded feature selection, and the curse of dimensionality, including why too many features weaken K-NN. Techniques such as PCA are beyond the guide, so the cards stay at concept level. All 29 cards are HL.
Read the full A4.2 revision guide for a worked example of cleaning a customer table.
A4.2 Data preprocessing HL 29 cards
A4.2.1 Definition HL In machine learning, what is data cleaning? A4.2-001 Tap to flip A4.2.1 Definition HL In machine learning, what is data cleaning? Detecting and correcting or removing errors, inconsistencies, duplicates and missing values in a data set before training, so the data is accurate, consistent and complete enough for a model to learn from reliably. Exam tip Cleaning fixes problems in the data. Scaling, feature selection and dimensionality reduction are separate preprocessing steps.A4.2-001 Tap to flip back
1 / 29
A4.2.1 Definition HL What is an outlier in a data set, and how can outliers be detected? A4.2-002 Tap to flip A4.2.1 Definition HL What is an outlier in a data set, and how can outliers be detected? A value that lies far from the other observations . Outliers can be spotted visually with box plots or statistically using the interquartile range (IQR) or Z-scores , flagging values beyond a chosen threshold. Exam tip An outlier is not automatically an error: a genuinely huge salary is real data. Investigate before removing it.A4.2-002 Tap to flip back
2 / 29
A4.2.1 Definition HL What is incorrect data, and how can it be identified during data cleaning? A4.2-003 Tap to flip A4.2.1 Definition HL What is incorrect data, and how can it be identified during data cleaning? Values that are present but wrong , such as an age of 203 or a negative price. They are found with validation rules (range, type and format checks), by cross-referencing trusted sources, or by anomaly detection . Exam tip Incorrect is not the same as missing: the value exists, but it is impossible or contradicts other data.A4.2-003 Tap to flip back
3 / 29
A4.2.1 Definition HL In data cleaning, what is irrelevant data, and how can it be filtered out? A4.2-004 Tap to flip A4.2.1 Definition HL In data cleaning, what is irrelevant data, and how can it be filtered out? Data that does not help predict the target , such as a customer ID number. It is filtered out by consulting domain experts or measuring each attribute's correlation with the target , then dropping the unhelpful columns. Exam tip A unique ID lets a model memorise individual records instead of learning patterns, so it fails on new data.A4.2-004 Tap to flip back
4 / 29
A4.2.1 Definition HL What is improperly formatted data, and how is it transformed during data cleaning? A4.2-005 Tap to flip A4.2.1 Definition HL What is improperly formatted data, and how is it transformed during data cleaning? Data not in the expected or standard format , such as mixed date formats, 'thirty' instead of 30, or '38,500' stored as text. It is parsed (e.g. with regular expressions) and converted to one uniform format , unit or currency. Exam tip 'Leeds' and 'leeds' look the same to you, but an algorithm treats them as two different categories.A4.2-005 Tap to flip back
5 / 29
A4.2.1 Definition HL In machine learning preprocessing, what is normalisation (min-max scaling)? A4.2-006 Tap to flip A4.2.1 Definition HL In machine learning preprocessing, what is normalisation (min-max scaling)? Rescaling a feature so its values fall in a fixed range, usually 0 to 1 , using the feature's minimum and maximum : x' = (x - min) / (max - min). Exam tip Not database normalisation (organising tables into normal forms). Here it means rescaling feature values.A4.2-006 Tap to flip back
6 / 29
A4.2.1 Definition HL In machine learning preprocessing, what is standardisation (Z-score scaling)? A4.2-007 Tap to flip A4.2.1 Definition HL In machine learning preprocessing, what is standardisation (Z-score scaling)? Rescaling a feature so it has a mean of 0 and a standard deviation of 1 : z = (x - mean) / standard deviation. The results are not bounded to a fixed range. Exam tip Memory hook: a z-score tells you how many standard deviations a value lies from the mean.A4.2-007 Tap to flip back
7 / 29
A4.2.1 Explain HL Why does the quality of training data have such a large effect on a machine learning model's performance? A4.2-008 Tap to flip A4.2.1 Explain HL Why does the quality of training data have such a large effect on a machine learning model's performance? A model can only learn from the data it is given: garbage in, garbage out . Errors and inconsistencies teach it false patterns , so its predictions become inaccurate and unreliable . Noisy or incomplete data makes it overfit to the noise, so it generalises poorly to unseen data. Unrepresentative data produces a biased model. Exam tip Better data often improves a model more than switching to a fancier algorithm.A4.2-008 Tap to flip back
8 / 29
A4.2.1 Explain HL Why should duplicate records be removed or consolidated before a model is trained? A4.2-009 Tap to flip A4.2.1 Explain HL Why should duplicate records be removed or consolidated before a model is trained? A duplicated record gets extra weight , so the model is biased towards its pattern. Copies can land in both the training and test sets , so measured accuracy is overstated . Statistics such as the mean are distorted. Exact duplicates are removed, keeping one; near duplicates with partly different fields are consolidated into a single record.Exam tip Near duplicates are harder to spot: 'J. Smith' and 'John Smith' at the same address may be one customer.A4.2-009 Tap to flip back
9 / 29
A4.2.1 Compare HL Compare trimming, capping and transforming as ways of handling outliers. A4.2-010 Tap to flip A4.2.1 Compare HL Compare trimming, capping and transforming as ways of handling outliers. Trimming removes the outlying records entirely: simple, but loses data .Capping replaces an outlier with the nearest acceptable value , so the record is kept but its extreme value is limited.Transforming applies a function such as log or square root to reduce the influence of extreme values while keeping every record.Exam tip Trim = cut it out; cap = put a ceiling on it. Never delete genuine extremes automatically.A4.2-010 Tap to flip back
10 / 29
A4.2.1 Compare HL Compare deletion, imputation and predictive modelling as ways of handling missing values. A4.2-011 Tap to flip A4.2.1 Compare HL Compare deletion, imputation and predictive modelling as ways of handling missing values. Deletion removes the affected rows (or a mostly empty column): simple , but loses data and may bias the sample.Imputation fills the gap with an estimate such as the mean, median or mode : keeps the record , but reduces natural variation.Predictive modelling predicts the missing value from other features (e.g. regression): usually more accurate , but more complex .Exam tip Mean and median imputation are one technique, not two. Exams want genuinely different techniques.A4.2-011 Tap to flip back
11 / 29
A4.2.1 Compare HL Compare normalisation and standardisation as feature-scaling techniques. A4.2-012 Tap to flip A4.2.1 Compare HL Compare normalisation and standardisation as feature-scaling techniques. Range: normalisation bounds values to a fixed range (usually 0 to 1); standardisation gives mean 0, standard deviation 1 with no fixed bounds .Outliers: one extreme value squashes normalised data into a narrow band; standardisation is less sensitive to outliers.Use: normalisation suits known limits ; standardisation suits outliers or unknown limits .Both stop large-scale features dominating.Exam tip If a question mentions extreme values, standardisation is usually the better choice. Justify it by the effect on the outliers.A4.2-012 Tap to flip back
12 / 29
A4.2.1 Apply it HL Image pixel brightness values always lie between 0 and 255. Which scaling technique suits them best, and why? A4.2-013 Tap to flip A4.2.1 Apply it HL Image pixel brightness values always lie between 0 and 255. Which scaling technique suits them best, and why? Normalisation (min-max scaling) , dividing by 255 to map every value to 0 to 1 .The minimum and maximum are known and fixed , so the range is meaningful. No value can fall outside 0 to 255, so no outlier can squash the rest of the data. Small, consistent input ranges help gradient descent in neural networks converge faster . Exam tip (x - 0) / (255 - 0) is simply x / 255: min-max scaling with known limits.A4.2-013 Tap to flip back
13 / 29
A4.2.1 Exam question [3 marks] HL K-NN predicts house prices from bedrooms (1 to 6) and floor area (30 to 600 m²). Explain why these features need scaling. [3] A4.2-014 Tap to flip A4.2.1 Exam question [3 marks] HL K-NN predicts house prices from bedrooms (1 to 6) and floor area (30 to 600 m²). Explain why these features need scaling. [3] K-NN compares houses by distance , which is dominated by the feature with the largest range . A difference of 5 bedrooms counts for almost nothing beside 100 m² of floor area, so bedrooms are effectively ignored . Scaling puts both on a comparable range , so each contributes according to its real importance . Otherwise the nearest neighbours are chosen almost entirely by floor area, lowering accuracy . Exam tip Use the ranges given in the question: mark schemes reward answers that quote them.A4.2-014 Tap to flip back
14 / 29
A4.2.1 Exam question [4 marks] HL A retailer merges customer records from several branch databases to train a sales-prediction model. Explain why the data should be cleaned before training. [4] A4.2-015 Tap to flip A4.2.1 Exam question [4 marks] HL A retailer merges customer records from several branch databases to train a sales-prediction model. Explain why the data should be cleaned before training. [4] Branches may store dates, currencies or names in different formats , which must be made consistent so values can be compared. One customer may appear in several databases; duplicates get extra weight , biasing the model. Missing or incorrect values teach the model false patterns , lowering accuracy .Noisy data causes overfitting , so the model generalises poorly to new customers.Irrelevant fields (e.g. branch codes) add noise; filtering them cuts training time .Exam tip Explain needs reasons: link each data problem to its effect on the model using 'so' or 'because'.A4.2-015 Tap to flip back
15 / 29
A4.2.2 Definition HL In machine learning, what is a feature? A4.2-016 Tap to flip A4.2.2 Definition HL In machine learning, what is a feature? An individual measurable property of the thing being observed, used as an input variable by a model. In a table each column is usually a feature, e.g. floor area or number of bedrooms for houses. Exam tip The value being predicted (e.g. house price) is the target or label, not an input feature.A4.2-016 Tap to flip back
16 / 29
A4.2.2 Definition HL What is feature selection, as a step in data preprocessing? A4.2-017 Tap to flip A4.2.2 Definition HL What is feature selection, as a step in data preprocessing? Identifying and retaining the most informative features of a data set (those that best help predict the target) while discarding irrelevant or redundant ones . The kept features are a subset of the original columns . Exam tip Rows are unchanged; only columns are dropped. Redundant = repeats another feature's information; irrelevant = unrelated to the target.A4.2-017 Tap to flip back
17 / 29
A4.2.2 Definition HL What are filter methods of feature selection? A4.2-018 Tap to flip A4.2.2 Definition HL What are filter methods of feature selection? Methods that score each feature with a statistical measure , such as its correlation with the target , independently of any model , then keep the highest-scoring features. They run before training and are fast . Exam tip Filter = statistics only, no model trained. Weakness: each feature is judged alone, so useful combinations can be missed.A4.2-018 Tap to flip back
18 / 29
A4.2.2 Definition HL What are wrapper methods of feature selection? A4.2-019 Tap to flip A4.2.2 Definition HL What are wrapper methods of feature selection? Methods that train and evaluate a model on different subsets of features , adding or removing features according to its performance, and keep the best-performing subset , e.g. forward selection or backward elimination . Exam tip Forward selection starts empty and adds the best feature each round; backward elimination starts with all and removes the worst.A4.2-019 Tap to flip back
19 / 29
A4.2.2 Definition HL What are embedded methods of feature selection? A4.2-020 Tap to flip A4.2.2 Definition HL What are embedded methods of feature selection? Methods where feature selection happens during model training itself , using the algorithm's built-in mechanism, e.g. Lasso regularisation shrinking unhelpful features' weights to zero, or a decision tree ranking feature importance . Exam tip No separate selection step: the model effectively chooses its own features as it learns.A4.2-020 Tap to flip back
20 / 29
A4.2.2 Explain HL Why does feature selection usually produce a better machine learning model? A4.2-021 Tap to flip A4.2.2 Explain HL Why does feature selection usually produce a better machine learning model? Removing irrelevant features removes noise , so the model is less likely to overfit and generalises better . Fewer features need less computation and memory , so training is faster . A simpler model with fewer inputs is easier to interpret and explain. Dropping redundant, highly correlated features focuses learning on unique information . Exam tip Fewer is not automatically better: drop a genuinely useful feature and accuracy falls. Keep the informative ones.A4.2-021 Tap to flip back
21 / 29
A4.2.2 Compare HL Compare filter, wrapper and embedded feature-selection methods in terms of speed and accuracy. A4.2-022 Tap to flip A4.2.2 Compare HL Compare filter, wrapper and embedded feature-selection methods in terms of speed and accuracy. Filter : fastest , as no model is trained, but it ignores how features interact , so it may miss useful combinations.Wrapper : usually most accurate for the chosen model, since subsets are tested with it, but computationally expensive because a model is trained for every subset.Embedded : a middle ground , cheaper than wrapper as selection happens within one training run , but tied to specific algorithms .Exam tip Memory hook: filter = sieve the ingredients; wrapper = taste-test every recipe; embedded = the chef adjusts while cooking.A4.2-022 Tap to flip back
22 / 29
A4.2.2 Apply it HL A genetics team has 20,000 features per patient and limited computing time. Suggest a feature-selection approach and justify it. A4.2-023 Tap to flip A4.2.2 Apply it HL A genetics team has 20,000 features per patient and limited computing time. Suggest a feature-selection approach and justify it. Start with a filter method (e.g. correlation with the outcome) because it is fast : no model is trained, so all 20,000 features can be scored. This cuts the data to a shortlist of promising features. Then, if time allows, apply a wrapper (or embedded) method to the shortlist: more accurate , but too expensive to run on all 20,000. Exam tip Wrappers retrain the model for every subset tried: with thousands of features, the number of subsets explodes.A4.2-023 Tap to flip back
23 / 29
A4.2.3 Definition HL What is meant by the 'curse of dimensionality'? A4.2-024 Tap to flip A4.2.3 Definition HL What is meant by the 'curse of dimensionality'? Dimensionality is the number of features in a data set. The curse of dimensionality is the set of problems, such as data sparsity , overfitting and high computational cost , that grow rapidly as the number of features increases .Exam tip Each feature adds one dimension: a 28 by 28 greyscale image has 784 dimensions, one per pixel.A4.2-024 Tap to flip back
24 / 29
A4.2.3 Definition HL What is meant by dimensionality reduction of a data set's variables? A4.2-025 Tap to flip A4.2.3 Definition HL What is meant by dimensionality reduction of a data set's variables? Reducing the number of variables (features) in a data set while preserving the relevant information it contains, either by keeping only the most useful features or by combining features into fewer new ones. Exam tip Statistical techniques such as PCA and LDA are beyond the IB scope: describe the goal and benefits, not the maths.A4.2-025 Tap to flip back
25 / 29
A4.2.3 Explain HL Why do distance-based algorithms such as K-NN become less reliable when data has very many features? A4.2-026 Tap to flip A4.2.3 Explain HL Why do distance-based algorithms such as K-NN become less reliable when data has very many features? Each extra dimension multiplies the volume of the feature space, so the same records become sparse : few points have near neighbours . In high dimensions all points end up roughly equidistant , so distance metrics such as Euclidean distance cannot separate near from far . Covering the space would need exponentially more samples , which is often impractical to collect. Exam tip Hook: with 10 possible values per feature, 1 feature gives 10 cells, 3 give 1,000, and 10 give 10 billion.A4.2-026 Tap to flip back
26 / 29
A4.2.3 Explain HL How does having very many features affect overfitting, computation, memory use and visualisation? A4.2-027 Tap to flip A4.2.3 Explain HL How does having very many features affect overfitting, computation, memory use and visualisation? Overfitting : many features relative to examples let the model fit noise , so it generalises poorly .Computation : training time and resources grow sharply with each feature, until some algorithms become impractical .Memory : each feature adds storage to every record, so more RAM and stronger hardware are needed.Visualisation : humans can see at most three dimensions , so patterns and clusters stay hidden until the data is reduced.Exam tip Flip each problem into a benefit of dimensionality reduction: less overfitting, faster training, less memory, data you can plot.A4.2-027 Tap to flip back
27 / 29
A4.2.3 Compare HL Compare feature selection with dimensionality reduction. A4.2-028 Tap to flip A4.2.3 Compare HL Compare feature selection with dimensionality reduction. Both reduce the number of features to cut overfitting and computation.Feature selection keeps a subset of the original features unchanged, so the model stays easy to interpret .Dimensionality reduction is the broader goal of fewer dimensions: it can use selection, or combine features into new ones , which can keep more information but are harder to interpret .Exam tip Feature selection is one way of achieving dimensionality reduction, not its opposite.A4.2-028 Tap to flip back
28 / 29
A4.2.3 Exam question [4 marks] HL A spam filter uses counts of 50,000 words per email but has only 10,000 labelled emails. Explain why reducing dimensions matters. [4] A4.2-029 Tap to flip A4.2.3 Exam question [4 marks] HL A spam filter uses counts of 50,000 words per email but has only 10,000 labelled emails. Explain why reducing dimensions matters. [4] There are more features than examples , so the model can overfit , learning noise instead of real patterns. Emails are sparse points in a huge space, so far more data would be needed to cover it. Fewer dimensions mean less computation , so training is faster . Each email needs less memory , so the system scales better. Data reduced to 2 or 3 dimensions can be visualised , so patterns can be inspected. Exam tip Each point needs a cause and an effect. Tie it to the scenario: 50,000 features but only 10,000 emails.A4.2-029 Tap to flip back
29 / 29
Tip: click the card, then use the arrow keys to flip and move through the deck.
A4.3 Machine learning approaches (HL only) The largest deck in the set: linear regression (slope, intercept and r²), K-NN and decision trees, accuracy, precision, recall and F1 with a calculation card, overfitting and hyperparameter tuning, k-means clustering, and association rules with support, confidence and lift. It continues with reinforcement learning, genetic algorithms, perceptrons and multi-layer networks, CNN layers, kernels and stride, and choosing between models. All 78 cards are HL.
Read the full A4.3 revision guide for worked regression and K-NN examples.
A4.3 Machine learning approaches HL 78 cards
A4.3.1 Definition HL What is linear regression, and what kind of outcome does it predict? A4.3-001 Tap to flip A4.3.1 Definition HL What is linear regression, and what kind of outcome does it predict? A supervised technique that fits a straight line of best fit to labelled data, modelling how one variable depends on another, to predict a continuous outcome : any numerical value on a scale (e.g. price, temperature), not a category. Exam tip Regression predicts a number; classification predicts a category. Both are supervised.A4.3-001 Tap to flip back
1 / 78
A4.3.1 Definition HL In linear regression, what are the independent (predictor) variable and the dependent (response) variable? A4.3-002 Tap to flip A4.3.1 Definition HL In linear regression, what are the independent (predictor) variable and the dependent (response) variable? Independent (predictor) variable : the input used to make the prediction, plotted on the x-axis (e.g. floor area).Dependent (response) variable : the output being predicted, which depends on the input, plotted on the y-axis (e.g. house price).Exam tip Ask 'what am I trying to predict?' That is the dependent variable.A4.3-002 Tap to flip back
2 / 78
A4.3.1 Definition HL What does r² (the coefficient of determination) tell you about a linear regression model? A4.3-003 Tap to flip A4.3.1 Definition HL What does r² (the coefficient of determination) tell you about a linear regression model? Its goodness of fit : the proportion of the variation in the dependent variable that the model explains . It runs from 0 (explains none) to 1 (explains all); the closer to 1, the better the line fits the data. Exam tip r² = 0.85 means 85% of the variation is explained, not '85% accurate'. A high r² does not prove causation either.A4.3-003 Tap to flip back
3 / 78
A4.3.1 Compare HL In the regression equation y = mx + c, how do the slope and the intercept differ in meaning? A4.3-004 Tap to flip A4.3.1 Compare HL In the regression equation y = mx + c, how do the slope and the intercept differ in meaning? Slope (m) : the change in y for each one-unit increase in x ; its sign gives the direction (positive: y rises as x rises) and its size the strength of the effect.Intercept (c) : the predicted value of y when x = 0 , where the line crosses the y-axis; the baseline that positions the line.Exam tip The intercept is the prediction at x = 0, not at the smallest x in the data. Never call the slope the 'starting value'.A4.3-004 Tap to flip back
4 / 78
A4.3.1 Explain HL How does linear regression find the line of best fit through a set of training data? A4.3-005 Tap to flip A4.3.1 Explain HL How does linear regression find the line of best fit through a set of training data? For each data point, the residual is the actual y value minus the y value the line predicts. Squaring the residuals makes them all positive and penalises large errors more. The algorithm picks the slope and intercept that minimise the sum of squared residuals (the least squares method). Smaller residuals overall mean a better fit to the data. Exam tip Slope and intercept are learned from the data, so they are parameters, not hyperparameters.A4.3-005 Tap to flip back
5 / 78
A4.3.1 Apply it HL A café's model is: drinks sold = 6 × temperature (°C) - 20, with r² = 0.81. Interpret the slope, intercept and r². A4.3-006 Tap to flip A4.3.1 Apply it HL A café's model is: drinks sold = 6 × temperature (°C) - 20, with r² = 0.81. Interpret the slope, intercept and r². Slope 6 : each extra 1°C is associated with 6 more drinks predicted.Intercept -20 : the predicted sales at 0°C; a negative number of drinks is impossible, so the intercept can be meaningless outside the data range.r² = 0.81 : 81% of the variation in sales is explained by temperature, a good fit ; the other 19% comes from other factors (e.g. day of the week).Exam tip Predicting far outside the range of the training data (extrapolation) is unreliable.A4.3-006 Tap to flip back
6 / 78
A4.3.1 Exam question [4 marks] HL A delivery firm wants to predict how long each delivery will take from its distance. Explain how linear regression could be used to do this. A4.3-007 Tap to flip A4.3.1 Exam question [4 marks] HL A delivery firm wants to predict how long each delivery will take from its distance. Explain how linear regression could be used to do this. Past deliveries give labelled data : distance is the independent variable, time the dependent variable. Fit time = m × distance + c , with m and c chosen to minimise the squared residuals . Slope m : extra minutes per km; intercept c : predicted time at 0 km (a fixed overhead, e.g. loading).Substitute a new distance to get a predicted time , a continuous value.r² near 1 means a good fit, so predictions are trustworthy.Exam tip Name the variables in context: 'distance is the independent variable' earns more than 'x is the input'.A4.3-007 Tap to flip back
7 / 78
A4.3.2 Definition HL What is classification in supervised learning? A4.3-008 Tap to flip A4.3.2 Definition HL What is classification in supervised learning? A technique that learns from labelled training data to assign a new item to one of a fixed set of discrete categories (classes) , such as spam or not spam, or which illness a patient has. Exam tip Classification needs labels known in advance; clustering (unsupervised) discovers groups without labels.A4.3-008 Tap to flip back
8 / 78
A4.3.2 Definition HL How is a decision tree structured to classify a new data item? A4.3-009 Tap to flip A4.3.2 Definition HL How is a decision tree structured to classify a new data item? The root and each internal node test one feature; each branch is a test outcome; each leaf node gives a class. A new item is routed from root to a leaf by its feature values and takes that leaf's class. Exam tip Trees choose splits that make child nodes as pure as possible. Very deep trees overfit, so they are often pruned.A4.3-009 Tap to flip back
9 / 78
A4.3.2 Process HL How does the K-Nearest Neighbours (K-NN) algorithm classify a new data point? A4.3-010 Tap to flip A4.3.2 Process HL How does the K-Nearest Neighbours (K-NN) algorithm classify a new data point? Place the new point in the same feature space as the labelled training data. Calculate the distance (e.g. Euclidean) from it to every training point. Select the k nearest points. Assign the class that is most common among those k neighbours (majority vote). Exam tip Normalise features first, or a large-scale feature (e.g. weight in grams) dominates the distance.A4.3-010 Tap to flip back
10 / 78
A4.3.2 Compare HL In K-NN, how does choosing a small value of k compare with choosing a large value of k? A4.3-011 Tap to flip A4.3.2 Compare HL In K-NN, how does choosing a small value of k compare with choosing a large value of k? Small k (e.g. 1) : follows local detail but is sensitive to noise and outliers , so it tends to overfit .Large k : smoother, more stable decisions but loses local detail and drifts towards the majority class, so it tends to underfit .k is a hyperparameter , tuned on validation data; with two classes an odd k avoids tied votes. Exam tip Memory hook: tiny k is jumpy (overfits); huge k lets the biggest class win every vote (underfits).A4.3-011 Tap to flip back
11 / 78
A4.3.2 Compare HL Compare K-NN and decision trees as classification algorithms. A4.3-012 Tap to flip A4.3.2 Compare HL Compare K-NN and decision trees as classification algorithms. Model : K-NN builds no model (lazy , stores all the data); a tree learns explicit rules in training.Prediction : K-NN is slow , measuring distance to every stored point; a tree is fast , a few tests per item.Interpretability : a tree's path is easy to explain; K-NN only shows similar neighbours.Scaling : K-NN needs normalised features ; trees do not.Both are supervised, using labelled data.Exam tip K-NN also struggles with very large or high-dimensional data sets, because every prediction compares against all stored points.A4.3-012 Tap to flip back
12 / 78
A4.3.2 Apply it HL A clinic wants a model that suggests a diagnosis from symptoms, which doctors can check. Why is a decision tree suitable? A4.3-013 Tap to flip A4.3.2 Apply it HL A clinic wants a model that suggests a diagnosis from symptoms, which doctors can check. Why is a decision tree suitable? Each node tests a symptom or test result (e.g. fever?), branches are the answers and leaves are diagnoses , learned from past patients' labelled records. Interpretable : a doctor can follow and justify the exact path to the diagnosis.Fast and consistent : the same questions in the same order every time.Can avoid unnecessary tests by reaching a leaf early. Exam tip Interpretability is the key word: a neural network might be accurate but cannot easily show why it decided.A4.3-013 Tap to flip back
13 / 78
A4.3.2 Apply it HL How could K-NN be used in a collaborative filtering system to recommend films to a user? A4.3-014 Tap to flip A4.3.2 Apply it HL How could K-NN be used in a collaborative filtering system to recommend films to a user? Represent each user as a vector of their film ratings (a user-item matrix). Measure similarity between the target user and every other user from their rating patterns. Select the k most similar users (nearest neighbours). Predict ratings for unseen films as the (weighted) average of the neighbours' ratings , and recommend the highest. Exam tip Collaborative filtering struggles with new users or films (cold start) and sparse ratings, because there is little data to compare.A4.3-014 Tap to flip back
14 / 78
A4.3.3 Definition HL For a binary classifier, what are true positives, false positives, true negatives and false negatives? A4.3-015 Tap to flip A4.3.3 Definition HL For a binary classifier, what are true positives, false positives, true negatives and false negatives? TP : positive cases correctly predicted positive.FP : negative cases wrongly predicted positive (false alarm).TN : negative cases correctly predicted negative.FN : positive cases wrongly predicted negative (missed case).Together they form the confusion matrix . Exam tip The second word is the prediction; 'true' or 'false' says whether that prediction was right.A4.3-015 Tap to flip back
15 / 78
A4.3.3 Definition HL How is accuracy calculated for a classifier, and when can it be misleading? A4.3-016 Tap to flip A4.3.3 Definition HL How is accuracy calculated for a classifier, and when can it be misleading? Accuracy = correct predictions ÷ all predictions = (TP + TN) ÷ (TP + TN + FP + FN). It misleads on imbalanced data : if 2% of cases are positive, always predicting negative scores 98% yet finds no positives.Exam tip Accuracy is only a fair summary when the classes are roughly balanced.A4.3-016 Tap to flip back
16 / 78
A4.3.3 Compare HL Distinguish between precision and recall as evaluation metrics. A4.3-017 Tap to flip A4.3.3 Compare HL Distinguish between precision and recall as evaluation metrics. Precision = TP ÷ (TP + FP) : of the items predicted positive, the proportion that really are positive (exactness : few false alarms).Recall = TP ÷ (TP + FN) : of the items that really are positive, the proportion the model found (completeness : few missed cases).Raising one often lowers the other. Exam tip Recall's denominator is TP + FN (all actual positives). Writing TP + FP there gives precision, a common slip.A4.3-017 Tap to flip back
17 / 78
A4.3.3 Definition HL What is the F1 score, and why is it used? A4.3-018 Tap to flip A4.3.3 Definition HL What is the F1 score, and why is it used? F1 = 2 × (precision × recall) ÷ (precision + recall) , the harmonic mean of precision and recall. It gives one score that is high only when both are high, so it suits imbalanced classes .Exam tip Harmonic mean, not a simple average: precision 1.0 with recall 0.1 gives F1 ≈ 0.18, not 0.55.A4.3-018 Tap to flip back
18 / 78
A4.3.3 Compare HL Distinguish between a model parameter and a hyperparameter. A4.3-019 Tap to flip A4.3.3 Compare HL Distinguish between a model parameter and a hyperparameter. A parameter is learned from the training data by the algorithm, e.g. a neural network's weights or a regression line's slope. A hyperparameter is a setting chosen before training that controls how learning happens and is not learned from the data, e.g. k in K-NN , maximum tree depth , learning rate , number of hidden layers. Exam tip Hyperparameters are set before training; weights are learned during it. Mixing them up is a classic exam slip.A4.3-019 Tap to flip back
19 / 78
A4.3.3 Compare HL Distinguish between overfitting and underfitting in a supervised learning model. A4.3-020 Tap to flip A4.3.3 Compare HL Distinguish between overfitting and underfitting in a supervised learning model. Overfitting : the model is too complex and learns the noise and quirks of the training data, so it scores very well on training data but poorly on new data .Underfitting : the model is too simple to capture the underlying pattern, so it performs poorly on both training and new data.The goal is generalisation : good performance on unseen data. Exam tip Training score high, test score low: overfitting. Both low: underfitting.A4.3-020 Tap to flip back
20 / 78
A4.3.3 Process HL How is hyperparameter tuning carried out when developing a supervised learning model? A4.3-021 Tap to flip A4.3.3 Process HL How is hyperparameter tuning carried out when developing a supervised learning model? Split the data into training, validation and test sets . Choose candidate values: every combination (grid search ) or random samples (random search ). Train a model with each setting on the training set. Score each on the validation set (or by cross-validation ) and keep the best . Evaluate the final model once on the unseen test set . Exam tip Cross-validation: each of k folds takes a turn as the validation set while the others train; scores are averaged. Never tune on the test set.A4.3-021 Tap to flip back
21 / 78
A4.3.3 Explain HL Explain how tuning a hyperparameter can move a model between underfitting and overfitting. A4.3-022 Tap to flip A4.3.3 Explain HL Explain how tuning a hyperparameter can move a model between underfitting and overfitting. Hyperparameters control model complexity , so they decide how closely the model can follow the training data. Too much freedom (e.g. k = 1 , a very deep tree ) lets it memorise noise, so it overfits . Too little (e.g. a very large k , a one-split tree ) makes it too simple, so it underfits . Tuning picks the value with the best validation score , between the two extremes. Exam tip Plot validation score against the hyperparameter: it usually rises, peaks, then falls. Choose the peak.A4.3-022 Tap to flip back
22 / 78
A4.3.3 Apply it HL Which metric should a cancer screening model prioritise, and which should an email spam filter prioritise? Justify each. A4.3-023 Tap to flip A4.3.3 Apply it HL Which metric should a cancer screening model prioritise, and which should an email spam filter prioritise? Justify each. Cancer screening: recall. A false negative (a missed cancer) is very costly, so the model must find as many real cases as possible, even at the cost of some false alarms.Spam filter: precision. A false positive (an important email sent to spam) is costly, so emails flagged as spam must really be spam.If both errors matter, use the F1 score . Exam tip Ask which mistake hurts more: costly false negatives point to recall; costly false positives point to precision.A4.3-023 Tap to flip back
23 / 78
A4.3.3 Exam question [3 marks] HL A fraud detector flags 25 transactions, of which 20 are fraudulent. The data contains 32 fraudulent transactions. Calculate the precision, recall and F1 score. A4.3-024 Tap to flip A4.3.3 Exam question [3 marks] HL A fraud detector flags 25 transactions, of which 20 are fraudulent. The data contains 32 fraudulent transactions. Calculate the precision, recall and F1 score. TP = 20, FP = 25 - 20 = 5, FN = 32 - 20 = 12. Precision = 20 ÷ 25 = 0.80 .Recall = 20 ÷ 32 = 0.625 .F1 = 2 × 0.80 × 0.625 ÷ (0.80 + 0.625) = 1.0 ÷ 1.425 ≈ 0.70 .Exam tip Show the formula, the substitution, then the answer: method marks can survive an arithmetic slip.A4.3-024 Tap to flip back
24 / 78
A4.3.3 Exam question [3 marks] HL A factory's image classifier flags faulty circuit boards, which are rare. Describe how an F1 score could be used to evaluate and improve the model. A4.3-025 Tap to flip A4.3.3 Exam question [3 marks] HL A factory's image classifier flags faulty circuit boards, which are rare. Describe how an F1 score could be used to evaluate and improve the model. Test on unseen labelled data and count TP, FP, FN (positive = faulty board). Precision = TP ÷ (TP + FP); recall = TP ÷ (TP + FN).F1 = 2 × precision × recall ÷ (precision + recall): high only if few faults are missed and few good boards are rejected.A low F1 means poor performance: tune hyperparameters or rebalance the training data, retrain and re-measure, repeating until F1 is acceptable. Exam tip Accuracy would mislead here: with rare faults, a model that never flags anything still scores highly.A4.3-025 Tap to flip back
25 / 78
A4.3.3 Exam question [4 marks] HL A model scores 99% on its training data but only 70% on new data. Outline two strategies to reduce this problem. A4.3-026 Tap to flip A4.3.3 Exam question [4 marks] HL A model scores 99% on its training data but only 70% on new data. Outline two strategies to reduce this problem. Overfitting. Two of, [1] strategy + [1] how it helps: More (and more varied) training data : noise averages out, so the true pattern dominates.Reduce complexity (fewer features, prune the tree, larger k): less capacity to memorise noise.Regularisation : penalises complex models during training.Early stopping : stop when validation performance starts to worsen.Cross-validation to choose settings that generalise.Exam tip For early stopping, 'train for less time' is not enough: link it to validation performance getting worse.A4.3-026 Tap to flip back
26 / 78
A4.3.4 Definition HL What is clustering in unsupervised learning? A4.3-027 Tap to flip A4.3.4 Definition HL What is clustering in unsupervised learning? A technique that groups unlabelled data into clusters so that items in the same cluster are similar in their features and different from items in other clusters. The groups are discovered by the algorithm, not defined in advance. Exam tip Clustering is not classification: there are no labels and no predefined classes.A4.3-027 Tap to flip back
27 / 78
A4.3.4 Definition HL In clustering, how is the similarity between two data points usually measured? A4.3-028 Tap to flip A4.3.4 Definition HL In clustering, how is the similarity between two data points usually measured? Each item is a point in feature space (one dimension per feature). Similarity is judged by distance , usually Euclidean : the closer two points, the more similar. Features are normalised first so large-scale features do not dominate. Exam tip Euclidean distance for two features: √((x₂ - x₁)² + (y₂ - y₁)²).A4.3-028 Tap to flip back
28 / 78
A4.3.4 Process HL What are the steps of the k-means clustering algorithm? A4.3-029 Tap to flip A4.3.4 Process HL What are the steps of the k-means clustering algorithm? Choose k , the number of clusters. Place k centroids (often at random). Assign each point to its nearest centroid (by distance).Recalculate each centroid as the mean of the points assigned to it.Repeat steps 3 and 4 until the centroids stop moving .Exam tip k must be chosen in advance, and different random starting centroids can give different clusters, so k-means is often run several times.A4.3-029 Tap to flip back
29 / 78
A4.3.4 Apply it HL How could a supermarket use clustering on its customers' purchasing data, and what could it do with the results? A4.3-030 Tap to flip A4.3.4 Apply it HL How could a supermarket use clustering on its customers' purchasing data, and what could it do with the results? Describe each customer by features such as spend per visit, visit frequency and product categories bought. Clustering (no labels) groups customers with similar buying behaviour , e.g. weekly family shoppers, occasional big spenders, budget buyers. The store can then target each segment with tailored offers, pricing or stock. It may also reveal segments nobody had thought of . Exam tip Name the segments in context: 'groups customers' earns less than a specific segment and the action it leads to.A4.3-030 Tap to flip back
30 / 78
A4.3.4 Exam question [4 marks] HL An online retailer could analyse its customer data with clustering or with classification. Compare the two techniques. A4.3-031 Tap to flip A4.3.4 Exam question [4 marks] HL An online retailer could analyse its customer data with clustering or with classification. Compare the two techniques. Supervision : classification is supervised ; clustering is unsupervised .Data : classification needs labelled training data; clustering uses unlabelled data.Groups : classification uses predefined classes ; clustering discovers groups itself.Purpose : classification predicts a new customer's class (e.g. will they cancel?); clustering describes structure (e.g. segments).Similarity : both group items using their features.Exam tip Compare means naming both techniques in every point; two separate descriptions lose marks.A4.3-031 Tap to flip back
31 / 78
A4.3.5 Definition HL What is an association rule in association rule learning? A4.3-032 Tap to flip A4.3.5 Definition HL What is an association rule in association rule learning? An if-then relationship found in a large data set, written {X} → {Y} : when the antecedent X occurs, the consequent Y tends to occur too, e.g. {bread} → {butter}. Rules are found unsupervised , from how often items co-occur. Exam tip Classic use: market basket analysis, as in 'customers who bought this also bought that'.A4.3-032 Tap to flip back
32 / 78
A4.3.5 Definition HL What is the support of an itemset in association rule mining? A4.3-033 Tap to flip A4.3.5 Definition HL What is the support of an itemset in association rule mining? The proportion of all transactions that contain the itemset : support(X) = transactions containing X ÷ total transactions. High support means the combination is common ; itemsets below a minimum support threshold are discarded. Exam tip The support of a rule {X} → {Y} is the support of X and Y appearing together.A4.3-033 Tap to flip back
33 / 78
A4.3.5 Definition HL What is the confidence of an association rule {X} → {Y}? A4.3-034 Tap to flip A4.3.5 Definition HL What is the confidence of an association rule {X} → {Y}? How often the rule holds when X occurs: confidence = support(X and Y) ÷ support(X) , i.e. the proportion of transactions containing X that also contain Y . Higher confidence means a more reliable rule. Exam tip Confidence divides by the antecedent X, so {X} → {Y} and {Y} → {X} can have different confidences.A4.3-034 Tap to flip back
34 / 78
A4.3.5 Definition HL What does the lift of an association rule {X} → {Y} measure? A4.3-035 Tap to flip A4.3.5 Definition HL What does the lift of an association rule {X} → {Y} measure? How much more likely Y is when X is present than in general: lift = confidence(X → Y) ÷ support(Y) . Above 1 : a genuine positive association .Equal to 1 : independent , no association.Below 1 : X makes Y less likely.Exam tip High confidence can mislead if Y is common anyway; lift corrects for how popular Y already is.A4.3-035 Tap to flip back
35 / 78
A4.3.5 Process HL Outline how an algorithm such as Apriori mines association rules from a set of transactions. A4.3-036 Tap to flip A4.3.5 Process HL Outline how an algorithm such as Apriori mines association rules from a set of transactions. Set a minimum support and a minimum confidence threshold. Count the support of single items; keep the frequent ones. Combine frequent itemsets into larger ones (pairs, triples...), keeping only those meeting minimum support. Generate rules from the frequent itemsets and calculate each rule's confidence . Prune rules below minimum confidence; rank the rest, e.g. by lift .Exam tip Apriori's shortcut: if an itemset is infrequent, every larger set containing it must be too, so it is skipped.A4.3-036 Tap to flip back
36 / 78
A4.3.5 Apply it HL Police data: of 80 neighbourhoods, 40 report vandalism, 48 report theft and 30 report both. Interpret the rule {vandalism} → {theft}. A4.3-037 Tap to flip A4.3.5 Apply it HL Police data: of 80 neighbourhoods, 40 report vandalism, 48 report theft and 30 report both. Interpret the rule {vandalism} → {theft}. Support = 30 ÷ 80 = 0.375 : the two crimes occur together in 37.5% of areas.Confidence = 30 ÷ 40 = 0.75 : 75% of areas with vandalism also have theft.Lift = 0.75 ÷ (48 ÷ 80) = 1.25 : theft is 1.25 times as likely where vandalism occurs, a positive association .Use: target patrols and resources at vandalism hotspots (predictive policing). It shows association, not cause . Exam tip Always finish with what the result means for the scenario: a number alone earns little.A4.3-037 Tap to flip back
37 / 78
A4.3.5 Exam question [4 marks] HL A streaming service holds viewing data for millions of users. Compare clustering with association rule learning for analysing it. A4.3-038 Tap to flip A4.3.5 Exam question [4 marks] HL A streaming service holds viewing data for millions of users. Compare clustering with association rule learning for analysing it. Similarity : both are unsupervised , need no labels and are exploratory, finding hidden patterns.Output : clustering produces groups of similar users ; association produces if-then rules , e.g. {watched A} → {watches B}.Basis : clustering uses distance between feature values ; association uses how often items co-occur (support, confidence).Use : clusters target user segments; rules drive 'viewers also watched' suggestions.Exam tip Include at least one similarity: compare questions credit likenesses as well as differences.A4.3-038 Tap to flip back
38 / 78
A4.3.6 Definition HL In reinforcement learning, what are the agent and the environment? A4.3-039 Tap to flip A4.3.6 Definition HL In reinforcement learning, what are the agent and the environment? Agent : the learner and decision-maker that chooses actions, e.g. a robot vacuum.Environment : everything the agent interacts with ; it responds to each action with a new state and a reward , e.g. the room being cleaned.Exam tip RL has no labelled data set: the agent learns only from the environment's feedback.A4.3-039 Tap to flip back
39 / 78
A4.3.6 Definition HL In reinforcement learning, what is a state and what is an action? A4.3-040 Tap to flip A4.3.6 Definition HL In reinforcement learning, what is a state and what is an action? State : the agent's current situation in the environment, as it observes it (e.g. a game character's position and nearby enemies).Action : a choice the agent can make in that state (e.g. jump, move left), which changes the state .Exam tip All possible states form the state space; all possible actions form the action space.A4.3-040 Tap to flip back
40 / 78
A4.3.6 Definition HL What is a reward in reinforcement learning? A4.3-041 Tap to flip A4.3.6 Definition HL What is a reward in reinforcement learning? A numerical feedback signal from the environment after each action, rating how good it was: positive for desirable outcomes (collecting dirt, winning) and negative (a penalty) for undesirable ones (hitting a wall, losing a life). Exam tip Rewards can be delayed: a chess move's value may only show when the game is won or lost much later.A4.3-041 Tap to flip back
41 / 78
A4.3.6 Definition HL What is a policy in reinforcement learning? A4.3-042 Tap to flip A4.3.6 Definition HL What is a policy in reinforcement learning? The agent's strategy : a mapping from states to actions that says which action to take in each state. Learning means improving the policy so that it earns more cumulative reward. Exam tip Policy = the agent's rulebook. A deterministic policy picks one action per state; a stochastic one picks using probabilities.A4.3-042 Tap to flip back
42 / 78
A4.3.6 Definition HL What is cumulative reward, and why does an RL agent try to maximise it rather than the immediate reward? A4.3-043 Tap to flip A4.3.6 Definition HL What is cumulative reward, and why does an RL agent try to maximise it rather than the immediate reward? The total reward collected over time (often counting distant rewards slightly less). Maximising it makes the agent value long-term outcomes , so it accepts small short-term costs (e.g. a detour) for a bigger payoff later. Exam tip Grabbing the biggest reward now can be a mistake: sacrificing a chess piece can win the game.A4.3-043 Tap to flip back
43 / 78
A4.3.6 Process HL Step by step, how does an RL agent improve its decisions by repeatedly interacting with its environment? A4.3-044 Tap to flip A4.3.6 Process HL Step by step, how does an RL agent improve its decisions by repeatedly interacting with its environment? The agent observes the current state . It chooses an action using its current policy. The environment returns a reward (or penalty) and a new state . The agent updates its policy so actions that led to high cumulative reward become more likely. Repeat many times, learning by trial and error .Exam tip Nobody tells the agent the right answer; it discovers good actions only through the rewards they earn.A4.3-044 Tap to flip back
44 / 78
A4.3.6 Compare HL What is the difference between exploration and exploitation for a reinforcement learning agent, and why does it need both? A4.3-045 Tap to flip A4.3.6 Compare HL What is the difference between exploration and exploitation for a reinforcement learning agent, and why does it need both? Exploitation : choose the best-known action to collect reward now.Exploration : try new or less-tested actions to discover whether something better exists.Only exploiting may lock in a suboptimal policy ; only exploring wastes reward and never uses what was learned. So agents balance them, e.g. epsilon-greedy (a random action with small probability ε), exploring more early and exploiting more later. Exam tip Restaurant analogy: always ordering your favourite dish is exploitation; trying something new on the menu is exploration.A4.3-045 Tap to flip back
45 / 78
A4.3.6 Exam question [4 marks] HL A delivery drone learns to fly through a city using reinforcement learning. Describe how it learns to make good decisions. A4.3-046 Tap to flip A4.3.6 Exam question [4 marks] HL A delivery drone learns to fly through a city using reinforcement learning. Describe how it learns to make good decisions. The drone is the agent ; the city, weather and obstacles form the environment . It observes its state (position, obstacles, battery) and takes an action (turn, climb, land). It receives a reward (on-time delivery, energy saved) or penalty (near collision, delay). It updates its policy to maximise cumulative reward over many flights. It explores new routes early, then exploits the best ones. Exam tip Answer in context: name this drone's states, actions and rewards rather than defining the terms in general.A4.3-046 Tap to flip back
46 / 78
A4.3.7 Definition HL What is a genetic algorithm? A4.3-047 Tap to flip A4.3.7 Definition HL What is a genetic algorithm? An optimisation (search) technique inspired by natural selection : a population of candidate solutions is improved over many generations by keeping the fittest and producing new solutions through crossover and mutation , until a good solution is found. Exam tip GAs find good, near-optimal solutions quickly but do not guarantee the best possible solution.A4.3-047 Tap to flip back
47 / 78
A4.3.7 Definition HL How does the fitness function steer a genetic algorithm towards better solutions? A4.3-048 Tap to flip A4.3.7 Definition HL How does the fitness function steer a genetic algorithm towards better solutions? It scores each candidate solution on how well it solves the problem. In the evaluation step every individual's fitness is calculated; fitter individuals are more likely to be selected to reproduce. Route planning: fitness = 1 ÷ total distance. Exam tip A GA only optimises what the fitness function measures: leave out safety or cost and the 'best' route ignores them.A4.3-048 Tap to flip back
48 / 78
A4.3.7 Definition HL What happens in the selection stage of a genetic algorithm? A4.3-049 Tap to flip A4.3.7 Definition HL What happens in the selection stage of a genetic algorithm? Individuals are chosen as parents (the mating pool) based on their fitness , so better solutions pass on their traits. Examples: roulette wheel (chance proportional to fitness) or tournament (the fittest of a small random group wins). Exam tip Roulette wheel gives weaker individuals some chance of selection, which preserves diversity.A4.3-049 Tap to flip back
49 / 78
A4.3.7 Definition HL What are typical termination conditions for a genetic algorithm? A4.3-050 Tap to flip A4.3.7 Definition HL What are typical termination conditions for a genetic algorithm? The loop ends when a generation limit or time limit is reached, a solution reaches an acceptable fitness , or the best fitness stops improving for several generations (a plateau, often as the population converges ). The fittest individual is returned. Exam tip Termination ends the loop; it is not an operator that creates the next generation.A4.3-050 Tap to flip back
50 / 78
A4.3.7 Compare HL Compare crossover and mutation in a genetic algorithm. A4.3-051 Tap to flip A4.3.7 Compare HL Compare crossover and mutation in a genetic algorithm. Crossover combines parts of two parents to make offspring, mixing good traits that already exist.Mutation makes a small random change to one individual (e.g. swapping two cities in a route), adding new genetic material .Mutation keeps diversity , helping escape local optima ; crossover alone can only recombine what is already there. Both are operators that create the next generation.Exam tip Mutation rate too high: the search becomes random. Too low: premature convergence on a poor solution.A4.3-051 Tap to flip back
51 / 78
A4.3.7 Process HL Outline the cycle of a genetic algorithm from start to finish. A4.3-052 Tap to flip A4.3.7 Process HL Outline the cycle of a genetic algorithm from start to finish. Initialise a random population of candidate solutions.Evaluate each one with the fitness function .Select fitter individuals as parents.Apply crossover and mutation to create offspring, which replace weaker individuals. Repeat from step 2 each generation until a termination condition is met; return the best solution.Exam tip Memory hook: Initialise, Evaluate, Select, Crossover, Mutate, then repeat until you Terminate.A4.3-052 Tap to flip back
52 / 78
A4.3.7 Apply it HL Why is a genetic algorithm a good choice for route planning problems such as the travelling salesperson problem? A4.3-053 Tap to flip A4.3.7 Apply it HL Why is a genetic algorithm a good choice for route planning problems such as the travelling salesperson problem? The number of possible routes grows factorially with the number of cities (about 6 × 10¹⁶ for just 20), so brute force is intractable . A GA searches this space efficiently, finding a near-optimal route in reasonable time. Each individual is a route (an ordering of cities); fitness rewards shorter total distance . Trade-off: no guarantee of the shortest route. Exam tip Ordinary crossover can repeat or drop cities, so route GAs use order-preserving crossover to keep each city exactly once.A4.3-053 Tap to flip back
53 / 78
A4.3.7 Exam question [4 marks] HL A college wants a genetic algorithm to build an exam timetable with as few clashes as possible. Describe how the algorithm would work. A4.3-054 Tap to flip A4.3.7 Exam question [4 marks] HL A college wants a genetic algorithm to build an exam timetable with as few clashes as possible. Describe how the algorithm would work. Population : many random timetables, each an assignment of exams to time slots and rooms.Fitness function : penalises clashes (a student with two exams at once) and overfull rooms; fewer clashes = fitter.Selection picks fitter timetables; crossover combines parts of two; mutation moves an exam to a random slot.Repeat over generations until no clashes remain or a generation limit is reached (termination ). Exam tip Keep every step in context: say what an individual, its fitness and a mutation mean for a timetable.A4.3-054 Tap to flip back
54 / 78
A4.3.8 Definition HL What is an artificial neural network (ANN)? A4.3-055 Tap to flip A4.3.8 Definition HL What is an artificial neural network (ANN)? A model of interconnected nodes ('neurons') arranged in layers and joined by weighted connections . It learns from data by adjusting the weights to reduce error, and is used for classification, regression and pattern recognition . Exam tip Do not call a connection a 'weight': the connection is the link; the weight is the number on it.A4.3-055 Tap to flip back
55 / 78
A4.3.8 Definition HL What does the activation function in a neural network node do? A4.3-056 Tap to flip A4.3.8 Definition HL What does the activation function in a neural network node do? It converts the node's weighted sum plus bias into the node's output , deciding how strongly it 'fires'. Non-linear functions (e.g. ReLU , sigmoid ) add non-linearity , letting the network learn complex, non-linear patterns . Exam tip ReLU outputs the input if positive, otherwise 0; sigmoid squashes any value into the range 0 to 1.A4.3-056 Tap to flip back
56 / 78
A4.3.8 Definition HL What is a multi-layer perceptron (MLP)? A4.3-057 Tap to flip A4.3.8 Definition HL What is a multi-layer perceptron (MLP)? A neural network with an input layer (one node per feature), one or more hidden layers , and an output layer giving the prediction: a class (classification) or a number (regression). Each layer is fully connected to the next. Exam tip An MLP with many hidden layers is a deep learning model.A4.3-057 Tap to flip back
57 / 78
A4.3.8 Compare HL In a neural network node, what is the difference between a weight and the bias? A4.3-058 Tap to flip A4.3.8 Compare HL In a neural network node, what is the difference between a weight and the bias? A weight belongs to each input connection : it scales that input, setting how strongly it influences the node. The bias is one extra value per node added to the weighted sum; it shifts the activation threshold , so the node can output a non-zero value even when all inputs are 0. Both are learned during training.Exam tip Inputs × weights, summed, plus bias: the bias is added once, not multiplied by an input.A4.3-058 Tap to flip back
58 / 78
A4.3.8 Explain HL Why can a multi-layer network model complex patterns that a single perceptron cannot? A4.3-059 Tap to flip A4.3.8 Explain HL Why can a multi-layer network model complex patterns that a single perceptron cannot? A single perceptron draws one straight-line (linear) decision boundary , so it only separates linearly separable data (it fails on XOR). In an MLP, each hidden layer applies a non-linear activation function to combinations of the previous layer's outputs. Stacking layers builds increasingly complex features , so the network can learn curved, non-linear boundaries and relationships. Exam tip Without non-linear activations, any number of layers collapses into one linear function.A4.3-059 Tap to flip back
59 / 78
A4.3.8 Process HL What happens during each training cycle of a neural network, from input to weight update? A4.3-060 Tap to flip A4.3.8 Process HL What happens during each training cycle of a neural network, from input to weight update? Forward propagation : inputs pass through the layers to produce an output.A loss function measures the error between the output and the correct label. Backpropagation passes the error backwards to find each weight's share of it (its gradient).Weights and biases are adjusted (e.g. gradient descent, scaled by the learning rate) to reduce the error.Repeat over many epochs until the loss is acceptably low.Exam tip Weights start random, so an untrained network gives meaningless outputs. Learning happens in backpropagation, not the forward pass.A4.3-060 Tap to flip back
60 / 78
A4.3.8 Exam question [3 marks] HL Sketch a single perceptron, labelling its inputs, weights, bias, activation function and output. A4.3-061 Tap to flip A4.3.8 Exam question [3 marks] HL Sketch a single perceptron, labelling its inputs, weights, bias, activation function and output. Your labelled sketch should show: Several inputs x₁, x₂, x₃ as arrows into one node. A weight w₁, w₂, w₃ labelled on each input arrow. A summation Σ (the weighted sum) with a bias b added. The sum passed through an activation function f. A single output y leaving the node. Exam tip output = f(w₁x₁ + w₂x₂ + w₃x₃ + b). All five labels are needed for full marks.A4.3-061 Tap to flip back
61 / 78
A4.3.8 Exam question [3 marks] HL Sketch a multi-layer perceptron with three inputs, one hidden layer of four nodes and two outputs. A4.3-062 Tap to flip A4.3.8 Exam question [3 marks] HL Sketch a multi-layer perceptron with three inputs, one hidden layer of four nodes and two outputs. Your labelled sketch should show: An input layer of 3 nodes, a hidden layer of 4 nodes and an output layer of 2 nodes, in order from left to right. Every node connected to every node in the next layer , with arrows showing the forward direction.Each layer labelled, with weights on the connections (each hidden and output node also has a bias and activation function). Exam tip This network has 3 × 4 + 4 × 2 = 20 weights, plus 6 biases (one per hidden and output node).A4.3-062 Tap to flip back
62 / 78
A4.3.9 Definition HL What does it mean that a CNN learns a 'spatial hierarchy of features' in images? A4.3-063 Tap to flip A4.3.9 Definition HL What does it mean that a CNN learns a 'spatial hierarchy of features' in images? Early layers detect simple, local features (edges, corners, colour blobs); deeper layers combine these into more complex features (textures, shapes such as an eye) and then whole objects (a face). The filters are learned adaptively in training, not hand-designed. Exam tip Edges, then shapes, then objects: each layer builds on the one before.A4.3-063 Tap to flip back
63 / 78
A4.3.9 Definition HL How does a convolutional layer in a CNN produce a feature map? A4.3-064 Tap to flip A4.3.9 Definition HL How does a convolutional layer in a CNN produce a feature map? The kernel (filter) , a small grid of learnable weights, slides across the image ; at each position its weights multiply the pixels beneath and are summed into one value of the feature map . High values show where the feature appears . Exam tip Because the same filter scans the whole image, a feature such as an edge is detected wherever it appears.A4.3-064 Tap to flip back
64 / 78
A4.3.9 Definition HL What does a pooling layer do in a CNN, and how does max pooling work? A4.3-065 Tap to flip A4.3.9 Definition HL What does a pooling layer do in a CNN, and how does max pooling work? It downsamples each feature map, which reduces computation , helps control overfitting and makes detection less sensitive to exact position . Max pooling keeps only the largest value in each window (e.g. each 2 × 2 block). Exam tip Example: a 2 × 2 window holding 1, 3, 4, 6 becomes 6. Pooling has no weights to learn.A4.3-065 Tap to flip back
65 / 78
A4.3.9 Process HL In what order are the main layers of a CNN arranged, from image in to prediction out? A4.3-066 Tap to flip A4.3.9 Process HL In what order are the main layers of a CNN arranged, from image in to prediction out? Input layer : the image's pixel values (e.g. three RGB channels, 0 to 255).Convolutional layers , each followed by an activation function (usually ReLU), produce feature maps.Pooling layers downsample the maps (steps 2 and 3 repeat).Fully connected layers combine the flattened features to make the decision.Output layer : a score or probability for each class (e.g. softmax).Exam tip Convolution and pooling extract the features; the fully connected layers decide what the features add up to.A4.3-066 Tap to flip back
66 / 78
A4.3.9 Compare HL How does a CNN with few convolutional layers compare with one that has many? A4.3-067 Tap to flip A4.3.9 Compare HL How does a CNN with few convolutional layers compare with one that has many? Few layers : learn only simple features (edges, basic textures); faster and need less data, but may underfit complex images (e.g. telling cat faces from dog faces).Many layers : build a deeper hierarchy of more abstract features, so they can separate subtle differences , but need more data and computation and risk overfitting .Exam tip More layers is not automatically better: the number of layers is a hyperparameter to tune.A4.3-067 Tap to flip back
67 / 78
A4.3.9 Compare HL Compare a small kernel (e.g. 3 × 3) with a large kernel (e.g. 7 × 7) in a convolutional layer. A4.3-068 Tap to flip A4.3.9 Compare HL Compare a small kernel (e.g. 3 × 3) with a large kernel (e.g. 7 × 7) in a convolutional layer. Small kernel : looks at a small patch, capturing fine local detail (fur texture, thin edges), with fewer weights per filter.Large kernel : covers a wider area , capturing larger, more global patterns (the outline of an ear) but needs more weights and computation .Kernel size is a hyperparameter chosen before training. Exam tip Think of the kernel as a magnifying glass sliding over the image: a bigger glass sees more at once but less finely.A4.3-068 Tap to flip back
68 / 78
A4.3.9 Compare HL How does a stride of 1 compare with a stride of 2 in a convolutional layer? A4.3-069 Tap to flip A4.3.9 Compare HL How does a stride of 1 compare with a stride of 2 in a convolutional layer? Stride is how many pixels the kernel moves at each step.Stride 1 : overlapping positions give a larger, more detailed feature map , but more computation and memory.Stride 2 : skips every other position, giving a feature map about half the width and height : faster and smaller but may miss fine detail .Exam tip A larger stride downsamples the image, a bit like pooling does.A4.3-069 Tap to flip back
69 / 78
A4.3.9 Explain HL How does the choice of activation function affect how a CNN learns and classifies images? A4.3-070 Tap to flip A4.3.9 Explain HL How does the choice of activation function affect how a CNN learns and classifies images? A non-linear activation after each convolution lets the network learn non-linear features; without it, stacked layers act like one linear layer. ReLU (negative values become 0) is cheap, trains faster and reduces the vanishing gradient problem, so it suits hidden layers.The output layer's function must suit the task: softmax for several classes, sigmoid for two. Exam tip ReLU outputs any non-negative real number, not just whole numbers.A4.3-070 Tap to flip back
70 / 78
A4.3.9 Explain HL What is the role of the loss function when training a CNN to classify images? A4.3-071 Tap to flip A4.3.9 Explain HL What is the role of the loss function when training a CNN to classify images? It measures the error between the network's predicted probabilities and the true labels. Training adjusts the filters and weights (by backpropagation) to minimise the loss , so the loss directs what the network learns . Cross-entropy is standard for classification: a confident wrong prediction gives a high loss and a large weight update.A loss that does not suit the task trains the model badly. Exam tip Loss function = how wrong the model is. Training is repeatedly making that number smaller.A4.3-071 Tap to flip back
71 / 78
A4.3.9 Exam question [5 marks] HL A farming app's CNN classifies leaf photos as healthy or diseased. Describe how it processes a photo to reach a decision. A4.3-072 Tap to flip A4.3.9 Exam question [5 marks] HL A farming app's CNN classifies leaf photos as healthy or diseased. Describe how it processes a photo to reach a decision. The input layer receives the photo as pixel values (RGB channels). Convolutional layers slide learned filters over it, producing feature maps (e.g. edges, spots); ReLU removes negative values.Pooling layers downsample the maps, keeping the strongest responses.Repeated layers build a hierarchy : edges, then spot patterns, then diseased-leaf features. Fully connected layers combine them; the output layer gives probabilities for healthy and diseased.Exam tip Describe the layers in order and in context; naming layers without saying what each does to the photo earns few marks.A4.3-072 Tap to flip back
72 / 78
A4.3.10 Explain HL Why can two different machine learning algorithms trained on the same data set give different results? A4.3-073 Tap to flip A4.3.10 Explain HL Why can two different machine learning algorithms trained on the same data set give different results? Each algorithm makes different assumptions about the data: linear regression assumes a straight-line relationship, K-NN assumes nearby points share labels , a decision tree splits on one feature at a time . So each captures some patterns well and misses others. How well those assumptions match this data and this type of problem decides which performs best: no algorithm is best for every problem . Exam tip 'No free lunch': test several suitable models rather than assuming one is always best.A4.3-073 Tap to flip back
73 / 78
A4.3.10 Explain HL How can the characteristics of a data set change which machine learning model performs best? A4.3-074 Tap to flip A4.3.10 Explain HL How can the characteristics of a data set change which machine learning model performs best? Size : deep networks need large data sets; small ones suit simpler models (linear regression, K-NN).Labelled or not : labels allow supervised models; unlabelled data needs clustering or association.Dimensionality : many features slow K-NN and weaken its distance measure.Noise, outliers, class imbalance : can mislead sensitive models (e.g. K-NN with small k, linear regression).Linearity : linear models fail on non-linear relationships.Exam tip Explore the data first: its size, labels, noise and shape narrow down the sensible candidate models.A4.3-074 Tap to flip back
74 / 78
A4.3.10 Compare HL When selecting a model, how do simple models compare with complex models such as deep neural networks? A4.3-075 Tap to flip A4.3.10 Compare HL When selecting a model, how do simple models compare with complex models such as deep neural networks? Simple (linear regression, shallow tree): fast to train , need less data and computing power , easy to interpret , but may underfit complex, non-linear patterns.Complex (deep neural network): capture intricate, non-linear patterns in large data sets, but need lots of data and computing power , are hard to explain (black box ) and can overfit .Choose the simplest model that performs well enough . Exam tip A more complex model is not automatically better; it must justify its extra cost on validation data.A4.3-075 Tap to flip back
75 / 78
A4.3.10 Process HL How should candidate machine learning models be compared fairly before one is chosen? A4.3-076 Tap to flip A4.3.10 Process HL How should candidate machine learning models be compared fairly before one is chosen? Train every model on the same training data , tuning each one's hyperparameters on validation data or by cross-validation . Score them all with the same evaluation metrics that fit the problem (e.g. F1 for imbalanced classes, r² or error size for regression). Compare them on unseen test data , not training data. Also weigh training and prediction time, interpretability and cost. Exam tip Judging models on training scores rewards overfitting; only unseen data shows how well they generalise.A4.3-076 Tap to flip back
76 / 78
A4.3.10 Apply it HL Which machine learning approach suits each task: pricing a house, sorting emails into folders, grouping shoppers, teaching a robot to walk, building a timetable? A4.3-077 Tap to flip A4.3.10 Apply it HL Which machine learning approach suits each task: pricing a house, sorting emails into folders, grouping shoppers, teaching a robot to walk, building a timetable? House price (a continuous number): regression , e.g. linear regression.Email folders (fixed, labelled categories): classification , e.g. a decision tree or K-NN.Grouping shoppers (no labels): clustering , e.g. k-means.Robot walking (sequential decisions, feedback from actions): reinforcement learning .Timetable (searching a huge space of possible solutions): a genetic algorithm .Exam tip First ask: is the output a number, a category, a grouping, a sequence of actions or an optimised solution?A4.3-077 Tap to flip back
77 / 78
A4.3.10 Exam question [4 marks] HL A bank is choosing a decision tree or a deep neural network to approve loans. Explain two reasons to choose the decision tree. A4.3-078 Tap to flip A4.3.10 Exam question [4 marks] HL A bank is choosing a decision tree or a deep neural network to approve loans. Explain two reasons to choose the decision tree. [1] reason + [1] explanation, twice: Interpretable : its rules can be followed, so the bank can justify each decision to customers and regulators; a neural network is a black box.Less data needed : trees work on modest tabular data; deep networks need very large data sets.Cheaper and faster to train and run, needing less computing power .Handles mixed numeric and categorical data with little preprocessing. Exam tip The desired outcome drives the choice: where decisions must be explained (loans, medicine), interpretability can outweigh a small accuracy gain.A4.3-078 Tap to flip back
78 / 78
Tip: click the card, then use the arrow keys to flip and move through the deck.
A4.4 Ethical considerations Ethics questions use the command term discuss, so this deck gives you the vocabulary to argue both sides: accountability, fairness, transparency, consent, and the sources of bias, from historical and sampling bias to proxy variables. It covers misinformation, harassment and privacy online, then quantum computing, AR, VR, pervasive AI and the digital divide. Two 6-mark discuss questions practise reaching a balanced conclusion. All 32 cards are for SL and HL.
Read the full A4.4 revision guide for a worked discussion of AI CV screening.
A4.4 Ethical considerations 32 cards
A4.4.1 Definition In machine learning ethics, what does accountability mean? A4.4-001 Tap to flip A4.4.1 Definition In machine learning ethics, what does accountability mean? Knowing who is responsible (the developer, the deploying organisation or the user) when an ML system makes a wrong or harmful decision , so that someone must answer for it and correct it. Responsibility should be agreed before deployment . Exam tip 'The AI is to blame' earns nothing: software cannot be held responsible. Name a person or organisation.A4.4-001 Tap to flip back
1 / 32
A4.4.1 Definition What is algorithmic fairness? A4.4-002 Tap to flip A4.4.1 Definition What is algorithmic fairness? The principle that an ML model's decisions should not systematically advantage or disadvantage any group, especially on protected characteristics such as gender, ethnicity or age, so that outcomes are equitable across groups . Exam tip Fairness is the goal; bias is the skew that breaks it. Check outcomes for each group, not just overall accuracy.A4.4-002 Tap to flip back
2 / 32
A4.4.1 Definition In the context of ML systems, what is meant by transparency? A4.4-003 Tap to flip A4.4.1 Definition In the context of ML systems, what is meant by transparency? Openness about how a system works: its algorithm , its data sources and how it reaches decisions , ideally with explainability (reasons for each individual decision) so that affected people can understand and challenge outcomes.Exam tip Link it to accountability: a 'black box' decision is hard to challenge, correct or pin on anyone.A4.4-003 Tap to flip back
3 / 32
A4.4.1 Definition What is informed consent when personal data is used to train an ML model? A4.4-004 Tap to flip A4.4.1 Definition What is informed consent when personal data is used to train an ML model? A person agrees to the use of their data after being told clearly what is collected, what it will be used for and who it is shared with . It must be freely given , in plain language, and can be withdrawn . Exam tip Consent buried in long terms and conditions, or given through pre-ticked boxes, is not really informed.A4.4-004 Tap to flip back
4 / 32
A4.4.1 Definition What is historical bias in training data? A4.4-005 Tap to flip A4.4.1 Definition What is historical bias in training data? Bias that arises when data accurately records past decisions or outcomes that were themselves unfair , so the model learns to repeat that discrimination . Example: a hiring model trained on years of decisions that favoured men. Exam tip The data can be 'correct' and still biased: it faithfully reflects an unfair past.A4.4-005 Tap to flip back
5 / 32
A4.4.1 Definition What is sampling (representation) bias in a training dataset? A4.4-006 Tap to flip A4.4.1 Definition What is sampling (representation) bias in a training dataset? Bias caused when the training data does not represent the population the model will be used on, so some groups are under-represented and the model is less accurate for them . Exam tip Classic case: face recognition trained mostly on lighter-skinned faces makes more errors on darker-skinned faces.A4.4-006 Tap to flip back
6 / 32
A4.4.1 Definition What is labelling bias in supervised learning? A4.4-007 Tap to flip A4.4.1 Definition What is labelling bias in supervised learning? Bias introduced when the people who assign labels to training examples make subjective or prejudiced judgements , so the 'correct answers' the model learns from are themselves skewed . Exam tip Example: annotators tagging posts written in one dialect as 'offensive' more often, so the model learns to flag that dialect.A4.4-007 Tap to flip back
7 / 32
A4.4.1 Definition What is a proxy variable, and why does it matter for bias? A4.4-008 Tap to flip A4.4.1 Definition What is a proxy variable, and why does it matter for bias? A feature that is strongly correlated with a protected characteristic , such as postcode with ethnicity. The model can still discriminate indirectly through it, even after the protected attribute itself is removed. Exam tip Deleting the 'gender' or 'race' column is not enough on its own: proxies let the bias back in.A4.4-008 Tap to flip back
8 / 32
A4.4.1 Compare How does misinformation differ from disinformation? A4.4-009 Tap to flip A4.4.1 Compare How does misinformation differ from disinformation? Intent : misinformation is shared without any intent to deceive (a mistake or misunderstanding), whereas disinformation is deliberately created and spread to mislead .Aim : disinformation often aims to sway elections or damage reputations; misinformation has no such aim.Similarity : both are false, and both can be generated and amplified by ML , e.g. deepfakes and engagement-driven feeds.Exam tip Hook: dis information is dis honest on purpose. A deepfake made to deceive is disinformation; innocently resharing it spreads misinformation.A4.4-009 Tap to flip back
9 / 32
A4.4.1 Explain Why is security an ethical issue for machine learning systems? A4.4-010 Tap to flip A4.4.1 Explain Why is security an ethical issue for machine learning systems? Attackers can poison training data or craft adversarial inputs , so the model makes harmful decisions. Models and datasets often hold personal data , so a breach exposes it. ML tools can be misused , e.g. cloned voices for fraud. Failures cause real harm and erode public trust , so developers have a duty to protect their systems. Exam tip Security protects the system from attack and misuse; privacy concerns the proper use of personal data. Related, not identical.A4.4-010 Tap to flip back
10 / 32
A4.4.1 Explain Explain the environmental impact of training and running large ML models. A4.4-011 Tap to flip A4.4.1 Explain Explain the environmental impact of training and running large ML models. Training uses many GPUs for weeks or months , consuming large amounts of electricity , so carbon emissions are high unless power is renewable. Data centres use large amounts of water for cooling . Manufacturing and replacing hardware uses raw materials and creates e-waste.Serving millions of users (inference ) keeps consuming energy. Reduce it with efficient models , reusing pre-trained models and renewable energy. Exam tip Weigh the cost against the benefit: a huge model for a trivial task is hard to justify ethically.A4.4-011 Tap to flip back
11 / 32
A4.4.1 Explain What does the societal impact of machine learning involve? A4.4-012 Tap to flip A4.4.1 Explain What does the societal impact of machine learning involve? Job displacement as routine tasks are automated, although new roles are also created.Unequal benefits : gains flow to those who own the technology, widening inequality .Changed social interaction , e.g. chatbots and feeds replacing human contact.Bias at scale can disadvantage whole communities.Responses: retraining workers , fair access to benefits and consulting affected groups. Exam tip Societal impact is wider than jobs. Balance it: automation also removes dangerous, repetitive work.A4.4-012 Tap to flip back
12 / 32
A4.4.1 Explain What harms can result when an ML model learns from biased training data? A4.4-013 Tap to flip A4.4.1 Explain What harms can result when an ML model learns from biased training data? Replicates and amplifies past discrimination, e.g. a recruitment tool marking down women.Discriminatory outcomes in high-stakes areas: lending, criminal justice, healthcare.Lower accuracy for under-represented groups, e.g. misdiagnosis.Reinforces stereotypes , e.g. in generated text.Appears objective , so the bias is hard to detect and challenge , and its outputs can feed back into future data. Exam tip Cite a real case: the COMPAS risk tool had a higher false-positive rate for Black defendants than White defendants.A4.4-013 Tap to flip back
13 / 32
A4.4.1 Explain How can machine learning increase the spread of misinformation online? A4.4-014 Tap to flip A4.4.1 Explain How can machine learning increase the spread of misinformation online? Feeds optimised for engagement , not accuracy, promote sensational posts because they hold attention. Filter bubbles : users are shown more of what they already believe, so false claims go unchallenged.Generative AI makes convincing fake text, images and deepfakes cheaply and at scale.ML-powered bots amplify false claims faster than human moderators can check them. Exam tip The algorithm is not 'trying' to spread lies: its objective rewards attention, and falsehoods often win attention.A4.4-014 Tap to flip back
14 / 32
A4.4.1 Explain Why is machine learning double-edged for online harassment and content moderation? A4.4-015 Tap to flip A4.4.1 Explain Why is machine learning double-edged for online harassment and content moderation? Helps : detects and filters hate speech and abuse at scale , faster than human moderators.Harms : bots can automate harassment campaigns or flood critics to silence dissent .False positives wrongly remove posts or suspend accounts, limiting free expression .Bias : models may flag some dialects more often, or target adverts and recommendations unequally across groups.Exam tip Strong answers keep a human appeal route: automated bans without review can silence legitimate users.A4.4-015 Tap to flip back
15 / 32
A4.4.1 Explain How can machine learning threaten anonymity and privacy online? A4.4-016 Tap to flip A4.4.1 Explain How can machine learning threaten anonymity and privacy online? De-anonymisation : linking datasets, writing style or location patterns can identify 'anonymous' users.Profiling : tracking clicks and behaviour to infer sensitive traits (health, politics) for targeted advertising .Surveillance : companies or governments can monitor what people say and do.Yet anonymity also hides trolls and harassers , so unmasking them is a genuine trade-off. Exam tip Anonymity is double-edged: it protects whistleblowers and vulnerable people, but it also shields abusers.A4.4-016 Tap to flip back
16 / 32
A4.4.1 Process Outline the steps an ML team can take, from data collection to deployment, to reduce bias. A4.4-017 Tap to flip A4.4.1 Process Outline the steps an ML team can take, from data collection to deployment, to reduce bias. Audit the data : check each group is represented; collect more or reweight where not.Remove protected attributes and check for proxies . Test for fairness : compare error rates and outcomes for each group , not just overall accuracy.Use a diverse team and human review of high-stakes decisions. Monitor after deployment and retrain when bias appears.Exam tip Bias is not only in the data: the objective, features and decision thresholds that designers choose can add it too.A4.4-017 Tap to flip back
17 / 32
A4.4.1 Apply it A fitness app wants to use users' heart-rate, sleep and location data to train an ML model. How can it uphold their privacy? A4.4-018 Tap to flip A4.4.1 Apply it A fitness app wants to use users' heart-rate, sleep and location data to train an ML model. How can it uphold their privacy? Obtain informed consent with a clear opt-out . Data minimisation : collect only what the model needs, e.g. drop exact location if not required.Anonymise or pseudonymise records before training.Encrypt the data, restrict access and delete it when no longer needed.Do not share or sell it, e.g. to insurers, without explicit permission.Exam tip Health data is especially sensitive: an insurer could use it to raise premiums or refuse cover.A4.4-018 Tap to flip back
18 / 32
A4.4.1 Apply it A skin-cancer detection model was trained mainly on images of light skin. Explain the ethical risk and suggest a remedy. A4.4-019 Tap to flip A4.4.1 Apply it A skin-cancer detection model was trained mainly on images of light skin. Explain the ethical risk and suggest a remedy. Sampling bias : darker skin is under-represented , so the model is less accurate for those patients.Result: missed or late diagnoses for some groups, widening health inequalities . Clinicians may over-trust a model that scored well overall. Remedy: collect diverse images , report accuracy for each skin type and keep a clinician's review of every result. Exam tip High overall accuracy can hide poor accuracy for a minority group. Always ask: accurate for whom?A4.4-019 Tap to flip back
19 / 32
A4.4.1 Exam question [4 marks] A bank's loan-approval model rejects far more applicants from certain postcodes. Outline two actions the bank could take to address concerns about bias. A4.4-020 Tap to flip A4.4.1 Exam question [4 marks] A bank's loan-approval model rejects far more applicants from certain postcodes. Outline two actions the bank could take to address concerns about bias. Any two: [1] for the action, [1] for its development. Independent bias audit : compare approval rates by group; postcode may be a proxy for ethnicity or income.Retrain on rebalanced data , removing proxy features that are not genuine risk factors.Human review and right to appeal , so errors are corrected.Transparency : give applicants the main reasons for a decision.Oversight committee must approve changes to the model or data.Exam tip One mark for the action, one for how it reduces bias or reassures customers. A bare list scores half.A4.4-020 Tap to flip back
20 / 32
A4.4.1 Exam question [6 marks] A police force plans to use ML trained on past arrest records to decide where to send patrols. Discuss whether it should. A4.4-021 Tap to flip A4.4.1 Exam question [6 marks] A police force plans to use ML trained on past arrest records to decide where to send patrols. Discuss whether it should. For: patrols go efficiently to likely hotspots; decisions rest on data rather than hunches.Against: arrest records reflect past over-policing , so historical bias targets the same areas; a feedback loop follows as extra patrols record more crime there.Also: area can be a proxy for ethnicity; residents get little transparency or route to appeal.Conclusion: acceptable only as decision support , with independent bias audits and human oversight.Exam tip A generic 'benefits outweigh risks' earns nothing. Tie the conclusion to this scenario and name a safeguard.A4.4-021 Tap to flip back
21 / 32
A4.4.2 Definition What is pervasive AI? A4.4-022 Tap to flip A4.4.2 Definition What is pervasive AI? AI embedded throughout everyday devices, services and environments (phones, homes, cars, cities) that works in the background , automating tasks and making data-driven decisions , often without the user explicitly asking . Exam tip Often multi-modal (voice, text, camera). Working 'in the background' is exactly why meaningful consent becomes difficult.A4.4-022 Tap to flip back
22 / 32
A4.4.2 Definition What is the digital divide, and why does it matter for equity? A4.4-023 Tap to flip A4.4.2 Definition What is the digital divide, and why does it matter for equity? The gap between people who can access and use technology (devices, fast internet, skills) and those who cannot . Emerging technologies widen inequality if their benefits reach only wealthier people, regions or nations. Exam tip Equity means fair access to the benefits, not just identical treatment. Quantum computers and VR headsets are expensive.A4.4-023 Tap to flip back
23 / 32
A4.4.2 Compare How does a qubit differ from a classical bit, and why does this matter for quantum computing? A4.4-024 Tap to flip A4.4.2 Compare How does a qubit differ from a classical bit, and why does this matter for quantum computing? State : a classical bit is always either 0 or 1, whereas a qubit can be in a superposition of 0 and 1.Linking : qubits can be entangled so their states are correlated; classical bits are independent.Result : quantum computers can solve certain problems (e.g. factoring large numbers , simulating molecules) far faster than classical computers.But they are not faster at everything : most everyday tasks gain nothing. Exam tip Avoid 'it tries every answer at once': the speed-up only applies to specific types of problem.A4.4-024 Tap to flip back
24 / 32
A4.4.2 Compare Compare augmented reality (AR) with virtual reality (VR). A4.4-025 Tap to flip A4.4.2 Compare Compare augmented reality (AR) with virtual reality (VR). AR overlays digital content (text, images, sound) on the real world , whereas VR replaces it with a fully immersive digital one.AR runs on phones, tablets or glasses; VR needs a headset that blocks out the surroundings. AR users stay aware of their surroundings ; VR users are isolated from them. Both rely on cameras and sensors that collect data, raising privacy concerns.Exam tip Hook: AR adds to reality, VR replaces it. Pokémon GO is AR; a flight-simulator headset is VR.A4.4-025 Tap to flip back
25 / 32
A4.4.2 Explain Why can't ethical guidelines for technology be written once and then left unchanged? A4.4-026 Tap to flip A4.4.2 Explain Why can't ethical guidelines for technology be written once and then left unchanged? New technologies create new dilemmas that old rules never anticipated, e.g. generative AI and deepfakes.Social values change , e.g. growing concern for privacy led to GDPR .Unforeseen consequences appear only after wide use (social media and cyberbullying), so rules need course correction .Current rules maintain public trust and add safeguards before harm occurs. Technology is global , so guidelines must suit different cultures and laws. Exam tip For balance: constant changes create uncertainty for developers, and slow regulation often lags behind fast innovation.A4.4-026 Tap to flip back
26 / 32
A4.4.2 Explain What are the potential implications of quantum computing for society, privacy and equity? A4.4-027 Tap to flip A4.4.2 Explain What are the potential implications of quantum computing for society, privacy and equity? Benefits : faster drug discovery , materials design and complex modelling (e.g. climate, finance).Privacy : a large quantum computer could break current public-key encryption (e.g. RSA), exposing banking and communications.Encrypted data stolen today could be decrypted later , so post-quantum cryptography is needed now. Equity : access concentrated in wealthy nations and corporations widens inequality.Jobs : disruption in cryptography-dependent sectors.Exam tip Encryption is the headline risk. Say 'could' and 'in future': today's quantum computers cannot yet break RSA.A4.4-027 Tap to flip back
27 / 32
A4.4.2 Explain What ethical concerns arise as augmented reality becomes part of daily life? A4.4-028 Tap to flip A4.4.2 Explain What ethical concerns arise as augmented reality becomes part of daily life? Bystander privacy : always-on cameras can record people, and facial recognition could identify strangers without consent .Constant data collection about places, movements and gaze enables surveillance and profiling.Safety : overlays distract users, risking accidents.Manipulated perception : overlays can spread false information or hidden adverts.Benefits to weigh: training, surgical guidance, education and accessibility . Exam tip Think about people who never chose the device: bystanders bear the privacy cost but get none of the benefit.A4.4-028 Tap to flip back
28 / 32
A4.4.2 Explain What are the potential implications of virtual reality for individuals and society? A4.4-029 Tap to flip A4.4.2 Explain What are the potential implications of virtual reality for individuals and society? Benefits : safe training simulations (surgeons, pilots), immersive education, therapy and remote social contact.Social isolation from over-immersion.Mental health : can trigger anxiety or traumatic memories in some users.Privacy : headsets track head, hand and eye movements , data that can identify users and reveal personal traits.Equity : costly headsets limit access; harassment also occurs in virtual spaces.Exam tip Do not just say 'VR is addictive'. Name the specific harm and who it affects.A4.4-029 Tap to flip back
29 / 32
A4.4.2 Explain What are the main benefits and risks of pervasive AI in daily life? A4.4-030 Tap to flip A4.4.2 Explain What are the main benefits and risks of pervasive AI in daily life? Benefits : convenience, personalisation and efficiency, e.g. smart homes, health monitoring, traffic control.Job displacement as routine decisions are automated.Bias at scale : one biased model can affect millions of decisions.Surveillance : always-listening devices and sensors erode privacy .Consent and autonomy : decisions happen in the background, so people may not know AI is involved.Exam tip Pair each risk with a safeguard: regulation, transparency and explainability, and public education about AI.A4.4-030 Tap to flip back
30 / 32
A4.4.2 Apply it A warehouse makes staff wear AI wristbands that track movement and productivity. How could this affect their individual rights? A4.4-031 Tap to flip A4.4.2 Apply it A warehouse makes staff wear AI wristbands that track movement and productivity. How could this affect their individual rights? Privacy : constant monitoring of movements, breaks and location.Autonomy and dignity : workers are pushed to match machine-set targets.Non-discrimination : rigid targets may penalise older or disabled staff.Due process : automated warnings or dismissals need an explanation and a right to appeal .Consent is weak, because refusing could cost the job.Exam tip Consent is not freely given when there is a power imbalance, such as between employer and employee.A4.4-031 Tap to flip back
31 / 32
A4.4.2 Exam question [6 marks] A council plans AI cameras across public spaces to manage traffic and detect crime. Discuss the implications for rights, privacy and equity. A4.4-032 Tap to flip A4.4.2 Exam question [6 marks] A council plans AI cameras across public spaces to manage traffic and detect crime. Discuss the implications for rights, privacy and equity. Benefits: smoother traffic and lower emissions; faster response to crime improves public safety .Privacy: mass surveillance of people who never consented; movement records could be shared or hacked.Rights: may deter protest and free expression ; false matches risk wrongful stops.Equity: face recognition can be less accurate for some groups ; cameras may cluster in poorer areas.Conclusion: justified for traffic, but crime detection needs strict limits and independent audits.Exam tip Address every lens the question names. Leaving one out, such as equity, makes the answer unbalanced and limits your marks.A4.4-032 Tap to flip back
32 / 32
Tip: click the card, then use the arrow keys to flip and move through the deck.
B1 Computational thinking flashcards Theme B is examined in Paper 2. B1 is its problem-solving foundation and needs no code, which makes it ideal flashcard material.
B1.1 Approaches to computational thinking The deck covers the six parts of a problem specification and the four concepts of computational thinking (decomposition, pattern recognition, abstraction and algorithmic design), applied to exam timetables, databases, machine learning and network security. Flowchart cards teach the six standard symbols, then make you trace loops with a trace table, good practice for Paper 2's algorithmic thinking question that needs no code. All 35 cards are for SL and HL.
Read the full B1.1 revision guide for a worked trace table example.
B1.1 Approaches to computational thinking 35 cards
B1.1.1 Definition What is a problem specification? B1.1-001 Tap to flip B1.1.1 Definition What is a problem specification? A clear, structured definition of a problem, written before any solution is designed, that sets out what the solution must achieve , the limits it must work within and the criteria for judging its success . Exam tip It is the foundation for design, testing and evaluation: IA criterion A is literally called Problem specification.B1.1-001 Tap to flip back
1 / 35
B1.1.1 Definition Which six components can a problem specification include? B1.1-002 Tap to flip B1.1.1 Definition Which six components can a problem specification include? Problem statement ; objectives and goals ; constraints and limitations ; input specifications ; output specifications ; evaluation criteria .Exam tip Memory hook: 'Some Owls Can Inspect Our Eggs' = Statement, Objectives, Constraints, Inputs, Outputs, Evaluation.B1.1-002 Tap to flip back
2 / 35
B1.1.1 Definition What is a problem statement, and what makes a strong one? B1.1-003 Tap to flip B1.1.1 Definition What is a problem statement, and what makes a strong one? A concise, unambiguous statement of what the problem is and why it matters. A strong one is specific , measurable (uses figures) and tied to an impact ; a weak one is vague ('the canteen is slow'). Exam tip Strong example: 'Lunch queues average 18 minutes, so 30% of students miss the start of afternoon lessons.'B1.1-003 Tap to flip back
3 / 35
B1.1.1 Definition In a problem specification, what are constraints and limitations? B1.1-004 Tap to flip B1.1.1 Definition In a problem specification, what are constraints and limitations? Restrictions the solution must work within , such as resource limits (time, budget, staff), technical limits (hardware, software, connectivity) and external factors (laws such as data protection, other systems it depends on). Good ones are specific and measurable . Exam tip Weak: 'limited budget'. Strong: 'total cost must not exceed £2,000 and it must run on the school's existing laptops'.B1.1-004 Tap to flip back
4 / 35
B1.1.1 Compare How do high-level objectives differ from specific goals in a problem specification? B1.1-005 Tap to flip B1.1.1 Compare How do high-level objectives differ from specific goals in a problem specification? An objective is a broad, directional outcome, e.g. 'make library books easier to find'. A goal is a specific, measurable, time-bound target, e.g. 'cut average search time from 6 to 2 minutes by June'. Each goal must link to an objective ; one objective usually has several goals. Exam tip If you cannot measure it, it is an objective, not a goal.B1.1-005 Tap to flip back
5 / 35
B1.1.1 Compare What is the difference between input specifications and output specifications? B1.1-006 Tap to flip B1.1.1 Compare What is the difference between input specifications and output specifications? Input specifications describe the data going into the solution: each item, its data type , format and valid range .Output specifications describe the results coming out : their content , format (report, alert, screen) and presentation to the user.Both make sure the solution is compatible with its real data and its users. Exam tip Vague answers like 'the user's details' earn little: name each item with its type and allowed values.B1.1-006 Tap to flip back
6 / 35
B1.1.1 Definition What are evaluation criteria in a problem specification? B1.1-007 Tap to flip B1.1.1 Definition What are evaluation criteria in a problem specification? Measurable benchmarks agreed in advance to judge whether the finished solution has succeeded , for example its effectiveness , efficiency , accuracy , usability and maintainability . Exam tip The IA's success criteria play the same role. Make each one testable, e.g. '95% of bookings confirmed within 3 seconds'.B1.1-007 Tap to flip back
7 / 35
B1.1.1 Exam question [4 marks] A gym's app lets members book 30-minute rowing machine slots. Construct an input and output specification for the booking feature. B1.1-008 Tap to flip B1.1.1 Exam question [4 marks] A gym's app lets members book 30-minute rowing machine slots. Construct an input and output specification for the booking feature. Inputs: member ID (string, must match an existing member)date (DD/MM/YYYY, within the next 7 days) and start time (HH:MM, on the hour or half hour, 06:00 to 21:00)machine number (integer, 1 to 6)Outputs: confirmation of member, machine, date and time, or an error message if the slot is taken or an input is invalida daily bookings list per machine for staff Exam tip Typically [2] per side. Vague items such as 'the member's details' score [1] at most: give type, format and valid range.B1.1-008 Tap to flip back
8 / 35
B1.1.1 Apply it A school wants online booking for parents' evening appointments. Construct a problem statement, one constraint, an objective with a goal, and one evaluation criterion. B1.1-009 Tap to flip B1.1.1 Apply it A school wants online booking for parents' evening appointments. Construct a problem statement, one constraint, an objective with a goal, and one evaluation criterion. Problem statement : parents book by phoning the office, which takes staff about 15 hours per event, and 30% of slots go unused.Constraint : must run in a browser on parents' phones and cost no more than £500 a year.Objective : make booking quick and fair for families. Goal : 90% of slots booked online within a week of opening.Evaluation criterion : in testing, no slot is ever double-booked.Exam tip Make every part specific and measurable: if you cannot test it, it is too vague to earn the mark.B1.1-009 Tap to flip back
9 / 35
B1.1.2 Definition What is computational thinking, and what are its four fundamental concepts? B1.1-010 Tap to flip B1.1.2 Definition What is computational thinking, and what are its four fundamental concepts? A problem-solving approach for analysing a problem and expressing its solution as clear steps that a computer or a person could carry out. Its four fundamental concepts are decomposition , pattern recognition , abstraction and algorithmic design . Exam tip Name all four concepts in exam answers; listing them without describing each one earns little.B1.1-010 Tap to flip back
10 / 35
B1.1.2 Definition What is decomposition in computational thinking? B1.1-011 Tap to flip B1.1.2 Definition What is decomposition in computational thinking? Breaking a large, complex problem or system into smaller, more manageable sub-problems , each of which can be understood, solved and tested separately before the solutions are combined. Exam tip Hook: 'divide and conquer'. Planning a school play splits into casting, set, costumes and tickets.B1.1-011 Tap to flip back
11 / 35
B1.1.2 Definition What is pattern recognition in computational thinking? B1.1-012 Tap to flip B1.1.2 Definition What is pattern recognition in computational thinking? Identifying similarities, trends or repeated elements within a problem, between different problems or in data, so that an existing solution can be reused or adapted and predictions can be made. Exam tip Example: realising exam seating and sports-team selection are both 'allocate people to limited places' problems, so one approach fits both.B1.1-012 Tap to flip back
12 / 35
B1.1.2 Definition What is abstraction in computational thinking? B1.1-013 Tap to flip B1.1.2 Definition What is abstraction in computational thinking? Removing detail that is irrelevant to the purpose and keeping only the essential features , producing a simpler, more general model of the problem that is easier to solve and can be reused.Exam tip Hook: a metro map shows stations and connections, not streets or true distances, because that is all a passenger needs.B1.1-013 Tap to flip back
13 / 35
B1.1.2 Definition What is algorithmic design in computational thinking? B1.1-014 Tap to flip B1.1.2 Definition What is algorithmic design in computational thinking? Developing a precise, ordered, unambiguous sequence of steps (an algorithm) that solves the problem, including the decisions and repetitions needed. It can be written as numbered steps, pseudocode or a flowchart, not necessarily code . Exam tip Some books say 'algorithmic thinking'; the guide's term is algorithmic design. Order matters: a step that needs a result must come after it.B1.1-014 Tap to flip back
14 / 35
B1.1.2 Compare How does decomposition differ from abstraction? B1.1-015 Tap to flip B1.1.2 Compare How does decomposition differ from abstraction? Decomposition splits a problem into smaller parts; abstraction simplifies it by removing irrelevant detail.Decomposition keeps the needed detail but spreads it across sub-problems; abstraction discards detail that does not affect the purpose. They are used together : a school timetable is split into rooms, teachers and classes, and each part ignores details such as teachers' hobbies. Exam tip Splitting = decomposition; simplifying = abstraction. Mixing them up is the most common B1.1 mistake.B1.1-015 Tap to flip back
15 / 35
B1.1.2 Exam question [3 marks] A council is building a computer model to predict traffic queues at a busy junction. Explain why abstraction is needed when designing this model. B1.1-016 Tap to flip B1.1.2 Exam question [3 marks] A council is building a computer model to predict traffic queues at a busy junction. Explain why abstraction is needed when designing this model. A real junction has countless details (car colours, drivers' names, makes of car), far too many to model or compute. Abstraction removes details that barely affect queues , so complexity is reduced and the model can be built and run quickly. It keeps the essential factors (arrival rate, light timings, number of lanes), so designers solve the right problem . The result is a general model reusable for other junctions. Exam tip Name specific details kept and dropped for this scenario; a generic definition alone rarely reaches full marks.B1.1-016 Tap to flip back
16 / 35
B1.1.2 Exam question [4 marks] A team is building a large online school-report system. Explain two benefits of decomposing it into smaller modules before coding. B1.1-017 Tap to flip B1.1.2 Exam question [4 marks] A team is building a large online school-report system. Explain two benefits of decomposing it into smaller modules before coding. Each module is a smaller, simpler problem , so it is easier to understand, design and get right . Different developers can build modules at the same time , so the system is finished sooner . Each module can be tested independently , so errors are found and located more easily . Modules can be reused and maintained separately : a change to grade calculation affects only that module. Exam tip Explain = benefit plus consequence. 'It is reusable' alone scores [1]; say what reuse saves, such as time or duplicated code.B1.1-017 Tap to flip back
17 / 35
B1.1.3 Exam question [4 marks] Explain why computational thinking does not necessarily involve programming, using a non-computing example. B1.1-018 Tap to flip B1.1.3 Exam question [4 marks] Explain why computational thinking does not necessarily involve programming, using a non-computing example. CT is a toolkit of problem-solving techniques for thinking about a problem, not a method of writing code . Its result can be a plan, process or decision that people carry out. Example, planning a school trip: decompose it into transport, consent forms and budget; abstract to numbers, costs and times only. Recognise patterns from last year's trip and reuse its plan; design an ordered checklist with decisions (an algorithm).Exam tip If your example is really a programming task, or you only list the four concepts, expect [2] at most.B1.1-018 Tap to flip back
18 / 35
B1.1.3 Apply it A school must schedule end-of-year exams so no student sits two papers at once. Apply each of the four computational thinking concepts. B1.1-019 Tap to flip B1.1.3 Apply it A school must schedule end-of-year exams so no student sits two papers at once. Apply each of the four computational thinking concepts. Decomposition : split into gathering entries, detecting clashes, assigning sessions, allocating rooms and publishing.Abstraction : keep only candidate numbers, their papers, sessions and room sizes; ignore grades, teachers and home addresses.Pattern recognition : it resembles last year's timetable, so reuse and adapt that approach.Algorithmic design : ordered steps, e.g. schedule the papers with most clashes first, checking each session for conflicts.Exam tip There is no fixed order: you might abstract first, then decompose, and revisit concepts as you learn more.B1.1-019 Tap to flip back
19 / 35
B1.1.3 Explain In software development, how does a sub-program such as calculateTax() act as an abstraction? B1.1-020 Tap to flip B1.1.3 Explain In software development, how does a sub-program such as calculateTax() act as an abstraction? It is a named block of code that performs one specific task . Other code simply calls it by name , passing in inputs and using the result. The caller does not need to know how it works inside : those details are hidden , which reduces complexity and lets the sub-program be reused . Exam tip Common two-mark pattern: one mark for what a sub-program is, one for how it is used without seeing its internal detail.B1.1-020 Tap to flip back
20 / 35
B1.1.3 Apply it A city bike-hire scheme has two years of trip data. How could pattern recognition help it plan where bikes are needed? B1.1-021 Tap to flip B1.1.3 Apply it A city bike-hire scheme has two years of trip data. How could pattern recognition help it plan where bikes are needed? Analysts look for recurring trends , e.g. stations near offices empty every weekday morning and refill each evening; demand drops when it rains. These patterns let the scheme predict demand by station, time and weather. It can then move bikes in advance and decide how many bikes and docks each station needs, instead of reacting to complaints. Exam tip Patterns must genuinely recur: check that one-off events, such as a festival, are not mistaken for trends.B1.1-021 Tap to flip back
21 / 35
B1.1.3 Explain How is abstraction used when training a machine learning model to detect spam emails? B1.1-022 Tap to flip B1.1.3 Explain How is abstraction used when training a machine learning model to detect spam emails? Each email is reduced to a set of features (e.g. number of links, sender's domain, certain key words) plus a label : spam or not spam. Irrelevant detail, such as the font, is left out . The model then learns patterns linking features to labels, so training is simpler and the model works on new emails . Exam tip ML also shows decomposition: data collection, cleaning, training, evaluation and deployment are separate stages.B1.1-022 Tap to flip back
22 / 35
B1.1.3 Explain How are abstraction and decomposition applied when designing a database for a sports club? B1.1-023 Tap to flip B1.1.3 Explain How are abstraction and decomposition applied when designing a database for a sports club? Abstraction : real-world things (members, teams, fixtures) become entities/tables holding only the attributes needed , e.g. member ID, name, date of birth, team ID; details such as eye colour are ignored.Decomposition : the design is done in stages (conceptual, logical, physical ), and data is split into separate related tables linked by keys rather than one huge table.Exam tip Pattern recognition helps too: spotting the queries run most often shows which fields are worth indexing.B1.1-023 Tap to flip back
23 / 35
B1.1.3 Explain How is pattern recognition used to protect a school network from attacks? B1.1-024 Tap to flip B1.1.3 Explain How is pattern recognition used to protect a school network from attacks? Security software compares traffic and messages against known attack signatures , e.g. typical phishing emails or malware code. It learns what normal traffic looks like and flags anomalies , such as 50 failed log-ins from one address in a minute or a sudden flood of requests (DDoS ). Algorithmic design turns this into rules, e.g. block an address after five failed attempts.Exam tip Links to A2: recognising the different types of traffic crossing a network is pattern recognition in action.B1.1-024 Tap to flip back
24 / 35
B1.1.4 Definition What is a flowchart, and what three things does it show? B1.1-025 Tap to flip B1.1.4 Definition What is a flowchart, and what three things does it show? A diagram of an algorithm built from standard symbols joined by flowlines (arrows). It shows the processes (actions), the decisions and the flow of control : the order in which steps are carried out. Exam tip Read from top to bottom and left to right unless an arrow sends you elsewhere, e.g. back up to repeat a loop.B1.1-025 Tap to flip back
25 / 35
B1.1.4 Definition Describe the shape of each of the six standard flowchart symbols. B1.1-026 Tap to flip B1.1.4 Definition Describe the shape of each of the six standard flowchart symbols. Start/End (terminator): rounded rectangle or oval, marking where the algorithm begins and finishesProcess/Operation : rectangleInput/Output : parallelogramDecision : diamondConnector : small circleFlowline : arrowed line showing the direction of flowExam tip Hook: a diamond points two ways like a fork in the road (decision); a slanted parallelogram is data sliding in or out.B1.1-026 Tap to flip back
26 / 35
B1.1.4 Compare How does a Process/Operation symbol differ from an Input/Output symbol in a flowchart? B1.1-027 Tap to flip B1.1.4 Compare How does a Process/Operation symbol differ from an Input/Output symbol in a flowchart? A Process (rectangle) changes data inside the algorithm: a calculation or assignment, e.g. total = total + mark. An Input/Output (parallelogram) moves data in or out : reading a value, e.g. input mark, or displaying a result, e.g. output total. Exam tip 'Output total' belongs in a parallelogram even though it uses a variable; only calculations and assignments go in rectangles.B1.1-027 Tap to flip back
27 / 35
B1.1.4 Definition What must a flowchart decision symbol contain, and how many exits does it have? B1.1-028 Tap to flip B1.1.4 Definition What must a flowchart decision symbol contain, and how many exits does it have? A yes/no or true/false question (a condition such as count < 10?) and exactly two exits , each flowline labelled with the answer that leads along it. The answer decides which path the algorithm follows. Exam tip A choice between three or more options needs a chain of diamonds, each asking one yes/no question.B1.1-028 Tap to flip back
28 / 35
B1.1.4 Definition What is the purpose of a connector symbol in a flowchart? B1.1-029 Tap to flip B1.1.4 Definition What is the purpose of a connector symbol in a flowchart? A small labelled circle that joins two parts of a flowchart without drawing a long flowline. Flow leaving one connector continues at the connector with the same label , avoiding crossing or tangled lines in a complicated chart. Exam tip Connectors change nothing in the algorithm: they are only a drawing shortcut, so trace straight through them.B1.1-029 Tap to flip back
29 / 35
B1.1.4 Explain How are sequence, selection and iteration each shown in a flowchart? B1.1-030 Tap to flip B1.1.4 Explain How are sequence, selection and iteration each shown in a flowchart? Sequence : symbols one after another, joined by flowlines, carried out in order.Selection : a decision whose two exits lead to different paths , which may later rejoin.Iteration : a decision where one exit has a flowline that loops back to an earlier step , so steps repeat until the condition changes.Exam tip If the decision comes before the loop body, the body may run zero times; if after, it always runs at least once.B1.1-030 Tap to flip back
30 / 35
B1.1.4 Explain Why might a programmer represent an algorithm as a flowchart before writing any code? B1.1-031 Tap to flip B1.1.4 Explain Why might a programmer represent an algorithm as a flowchart before writing any code? It is visual , so the logic and flow of control are easier to follow than text. It is language-independent with no syntax , so it can be coded in any language and checked by non-programmers. Logic errors and missing paths can be spotted cheaply before coding .It can be traced with test data to check the output. Exam tip For a one-mark 'state one reason', 'diagrammatic', 'language-independent' or 'no syntax to follow' each scores.B1.1-031 Tap to flip back
31 / 35
B1.1.4 Process What are the steps for tracing a flowchart with a trace table? B1.1-032 Tap to flip B1.1.4 Process What are the steps for tracing a flowchart with a trace table? Draw a column for each variable , each decision and the output . Start at Start and record any initial values . Follow the flowlines; at each process , write the variable's new value on a new row. At each decision , test the condition with the current values , record TRUE/FALSE and take that exit. Record each output when it happens; stop at End . Exam tip Record the final FALSE that ends each loop: mark schemes expect it, and stopping one row early is a classic slip.B1.1-032 Tap to flip back
32 / 35
B1.1.4 Exam question [3 marks] Flowchart: x = 2, total = 0; decision x <= 8? (true: total = total + x, x = x + 3, loop back; false: output total). Trace it. B1.1-033 Tap to flip B1.1.4 Exam question [3 marks] Flowchart: x = 2, total = 0; decision x <= 8? (true: total = total + x, x = x + 3, loop back; false: output total). Trace it. x : 2, 5, 8, 11total : 0, 2, 7, 15x <= 8? : TRUE, TRUE, TRUE, FALSEOutput: 15 (the loop body ran 3 times)Exam tip Boundary trap: 8 <= 8 is TRUE, so x = 8 is still added. Check every <= and >= carefully.B1.1-033 Tap to flip back
33 / 35
B1.1.4 Exam question [3 marks] Flowchart, N = 6: decision N > 0? (true: output N MOD 2, N = N DIV 2, loop back; false: End). State the outputs and purpose. B1.1-034 Tap to flip B1.1.4 Exam question [3 marks] Flowchart, N = 6: decision N > 0? (true: output N MOD 2, N = N DIV 2, loop back; false: End). State the outputs and purpose. N : 6, 3, 1, 0 (then N > 0? is FALSE, so End)Outputs : 0, 1, 1Purpose : converts a denary number to binary , giving the bits in reverse order (least significant first): 6 = 110 .Exam tip DIV is whole-number division (7 DIV 2 = 3); MOD is the remainder (7 MOD 2 = 1). Mixing them up wrecks the trace.B1.1-034 Tap to flip back
34 / 35
B1.1.4 Apply it A flowchart finding the largest of ten inputs starts with MAX = 0. When does it give a wrong answer, and how is it fixed? B1.1-035 Tap to flip B1.1.4 Apply it A flowchart finding the largest of ten inputs starts with MAX = 0. When does it give a wrong answer, and how is it fixed? Fails when every input is negative : none is bigger than 0, so it wrongly outputs 0 , a value that was never entered.Fix : set MAX to the first input and compare only the remaining nine, or start MAX at a value lower than any possible input .Exam tip Always test a flowchart with awkward data (negatives, zeros, equal values): a variable's initial value is a favourite exam error.B1.1-035 Tap to flip back
35 / 35
Tip: click the card, then use the arrow keys to flip and move through the deck.
B3 Object-oriented programming flashcards OOP theory runs through Paper 2, and any code on these cards is shown in Python or Java. B3.1 is for everyone and B3.2 is HL only, with 82 cards between them.
B3.1 Fundamentals of OOP for a single class This deck defines classes, objects and the core OOP ideas, then weighs OOP's pros and cons for a large team project against a one-off script. You practise UML class diagrams (with +, - and # visibility), static against instance members, constructors and instantiation, and encapsulation with private attributes, getters and setters. All 43 cards are for SL and HL.
Read the full B3.1 revision guide for a worked BankAccount class.
B3.1 Fundamentals of OOP for a single class 43 cards
B3.1.1 Definition What is object-oriented programming (OOP)? B3.1-001 Tap to flip B3.1.1 Definition What is object-oriented programming (OOP)? A programming paradigm that models a program as a set of interacting objects , each bundling its own data (attributes) with the methods that act on it. Its core concepts are classes, objects, inheritance, encapsulation and polymorphism . Exam tip Procedural code is organised around a sequence of steps; OOP is organised around the 'things' in the problem.B3.1-001 Tap to flip back
1 / 43
B3.1.1 Definition In OOP, what is a class? B3.1-002 Tap to flip B3.1.1 Definition In OOP, what is a class? A blueprint (template) that defines the attributes and methods that every object of that type will have. It describes objects but is not one itself, so it holds no per-object data. Exam tip Cookie cutter (class) and cookies (objects): one cutter, many separate cookies.B3.1-002 Tap to flip back
2 / 43
B3.1.1 Definition In OOP, what is an object? B3.1-003 Tap to flip B3.1.1 Definition In OOP, what is an object? A specific instance of a class , created while the program runs, that is allocated memory and holds its own values for the attributes (its state) while using the methods defined in the class. Exam tip 'Instance of a class' plus 'its own attribute values' is what earns marks. 'A thing in the program' earns nothing.B3.1-003 Tap to flip back
3 / 43
B3.1.1 Definition What is inheritance in OOP? B3.1-004 Tap to flip B3.1.1 Definition What is inheritance in OOP? A relationship in which a subclass (child) gains the attributes and methods of a superclass (parent) and can add new members or override inherited ones, so shared code is written once. Example: Car and Ship both inherit owner from Vehicle. Exam tip Use the 'is-a' test: a Car is a Vehicle. Coding inheritance is HL (B3.2); at SL know what it is and why it helps.B3.1-004 Tap to flip back
4 / 43
B3.1.1 Definition What is polymorphism in OOP? B3.1-005 Tap to flip B3.1.1 Definition What is polymorphism in OOP? Literally 'many forms': the same method call (one name, one interface) produces different behaviour depending on the object it acts on. Example: area() gives a different calculation for a Circle than for a Square. Exam tip Overloading (same name, different parameters) is another form, covered at HL in B3.2. Python does not support overloading that way.B3.1-005 Tap to flip back
5 / 43
B3.1.1 Apply it A vet clinic models each pet in OOP. Suggest two attributes and two methods for a Pet class, and what each kind represents. B3.1-006 Tap to flip B3.1.1 Apply it A vet clinic models each pet in OOP. Suggest two attributes and two methods for a Pet class, and what each kind represents. Attributes represent the pet's state (data stored): e.g. name, weightKg.Methods represent its behaviour (actions on that data): e.g. recordVisit(date), updateWeight(kg).Each real pet becomes one object of the Pet class with its own values. Store only what the clinic needs (abstraction): a favourite toy is probably irrelevant. Exam tip State changes over time; behaviour is how it changes: calling updateWeight() changes the weightKg part of the state.B3.1-006 Tap to flip back
6 / 43
B3.1.1 Explain What are the main advantages of using OOP? B3.1-007 Tap to flip B3.1.1 Explain What are the main advantages of using OOP? Modularity : a large problem splits into self-contained classes that are easier to understand, test and debug.Reusability : classes, libraries and inheritance let code be reused, saving development time.Maintainability : a class's internals can change without breaking code that uses its public methods.Teamwork : developers build different classes in parallel.Natural modelling : classes mirror real-world entities.Exam tip Always add the 'so what': 'reusable, so less code to write and test'. A bare 'easier' or 'faster' earns nothing.B3.1-007 Tap to flip back
7 / 43
B3.1.1 Explain What are the main disadvantages of using OOP? B3.1-008 Tap to flip B3.1.1 Explain What are the main disadvantages of using OOP? Overkill for small tasks : designing classes adds complexity for little gain when there is one simple job.More design effort : the problem must be broken into well-chosen classes before coding.Larger programs that may run slower and use more memory, e.g. when many objects are created and destroyed.Steeper learning curve : developers may need OOP training.Exam tip A short one-off script is the classic case where OOP is a poor choice: no entities to model, just one task.B3.1-008 Tap to flip back
8 / 43
B3.1.1 Exam question [4 marks] Evaluate the use of OOP for a large hospital records system built by several development teams. [4] B3.1-009 Tap to flip B3.1.1 Exam question [4 marks] Evaluate the use of OOP for a large hospital records system built by several development teams. [4] For : patients, doctors and appointments become classes, so the model mirrors the hospital.For : teams build and test classes in parallel; private data stops one team corrupting another's.Against : needs careful up-front design, and a poor design is costly to fix.Against : larger code, some speed and memory overhead, and staff need OOP skills.Judgement : a large, long-lived, multi-team system, so the benefits outweigh the costs: OOP suits it.Exam tip Evaluate needs both sides plus a verdict tied to the scenario. A one-sided answer is capped.B3.1-009 Tap to flip back
9 / 43
B3.1.1 Apply it A teacher needs a one-off 20-line script that renames every file in a folder. Would OOP be a good choice? Justify your answer. B3.1-010 Tap to flip B3.1.1 Apply it A teacher needs a one-off 20-line script that renames every file in a folder. Would OOP be a good choice? Justify your answer. No, OOP is a poor fit here. There are no real entities with their own state and behaviour to model, only one short sequence of steps. Designing classes, constructors and access methods adds overhead and complexity with no reuse or teamwork benefit. A short procedural script is quicker to write, read and test. OOP would only pay off if the tool grew into a larger, long-lived program. Exam tip Judge the scenario: OOP suits many interacting entities and large teams; it is overkill for a small, single-task program.B3.1-010 Tap to flip back
10 / 43
B3.1.2 Definition How is a single class laid out in a UML class diagram? B3.1-011 Tap to flip B3.1.2 Definition How is a single class laid out in a UML class diagram? As a box with three compartments : the class name at the top, the attributes (with visibility and data types) in the middle, and the methods (with visibility, parameters and return types) at the bottom. Exam tip UML stands for Unified Modelling Language, not 'Universal', which is a common slip.B3.1-011 Tap to flip back
11 / 43
B3.1.2 Definition In a UML class diagram, what do the symbols +, - and # before a member mean? B3.1-012 Tap to flip B3.1.2 Definition In a UML class diagram, what do the symbols +, - and # before a member mean? + public : accessible from any class.- private : accessible only within its own class.# protected : accessible within the class and its subclasses (and, in Java, the same package).An underlined member is static . Exam tip Encapsulated designs show attributes as - and interface methods as +. Attributes drawn as + lose the visibility mark.B3.1-012 Tap to flip back
12 / 43
B3.1.2 Definition In UML, how are an attribute's data type and a method's parameters and return type written? B3.1-013 Tap to flip B3.1.2 Definition In UML, how are an attribute's data type and a method's parameters and return type written? Attribute: visibility name: Type, e.g. - price: double Method: visibility name(param: Type): ReturnType, e.g. + setPrice(p: double): void void means nothing is returned; a getter shows its return type, e.g. + getPrice(): doubleExam tip UML puts the name before the type (price: double), the reverse of a Java declaration (double price).B3.1-013 Tap to flip back
13 / 43
B3.1.2 Process How do you derive classes, attributes and methods from a set of application requirements? B3.1-014 Tap to flip B3.1.2 Process How do you derive classes, attributes and methods from a set of application requirements? Pick out the main entities (nouns) the system manages: these become classes . List the details each must store: these become attributes , each with a data type. List the actions (verbs) each performs or has done to it: these become methods . Keep only what the requirements need (abstraction). Make attributes private ; add a constructor and public getters and setters as needed. Exam tip A requirement such as 'record whether a locker is in use' signals a boolean attribute plus methods that change it.B3.1-014 Tap to flip back
14 / 43
B3.1.2 Explain Why are UML class diagrams used when designing object-oriented software? B3.1-015 Tap to flip B3.1.2 Explain Why are UML class diagrams used when designing object-oriented software? They let developers plan classes, attributes and methods before coding , so design flaws are found early and cheaply. The notation is standard , so any developer can read the design without lengthy explanation. They show relationships between classes at a glance. They help communicate the design within a team or to non-technical stakeholders. They serve as documentation for later maintenance. Exam tip Link each purpose to a benefit ('standard notation, so less time explaining'), not just 'it helps planning'.B3.1-015 Tap to flip back
15 / 43
B3.1.2 Compare How are association, aggregation, composition and inheritance drawn between classes in a UML class diagram? B3.1-016 Tap to flip B3.1.2 Compare How are association, aggregation, composition and inheritance drawn between classes in a UML class diagram? Association : a plain solid line; the classes are linked or use each other.Aggregation : a hollow diamond at the 'whole' end; the part can exist on its own (Team and Player).Composition : a filled diamond at the 'whole' end; the part cannot exist without the whole (Book and Chapter).Inheritance : a hollow triangle arrowhead pointing to the parent (Cat to Animal).Exam tip Filled diamond: the whole is 'filled with' parts that are destroyed with it. Relationships are developed further at HL (B3.2).B3.1-016 Tap to flip back
16 / 43
B3.1.2 Apply it A hotel system's Room class must now record whether each room has a sea view. What changes are needed to the class design? B3.1-017 Tap to flip B3.1.2 Apply it A hotel system's Room class must now record whether each room has a sea view. What changes are needed to the class design? Add a private attribute of a suitable type: - seaView: boolean (only two states). Add it to the constructor's parameters and initialise it there. Add a public getter hasSeaView(): boolean and, if it can change, a setter . Update any methods that use it, such as toString() or a room-search method. Exam tip Choose the type from the number of states: two suits boolean, but four fuel types would need int, char or String.B3.1-017 Tap to flip back
17 / 43
B3.1.2 Exam question [4 marks] Construct a UML class diagram for a Parcel class with private trackingCode, weightKg and delivered, a constructor, a weight getter and markDelivered(). [4] B3.1-018 Tap to flip B3.1.2 Exam question [4 marks] Construct a UML class diagram for a Parcel class with private trackingCode, weightKg and delivered, a constructor, a weight getter and markDelivered(). [4] Parcel- trackingCode: String- weightKg: double- delivered: boolean+ Parcel(code: String, kg: double)+ getWeightKg(): double+ markDelivered(): voidThree compartments, class name on top. Every attribute shown with its data type. Methods shown with parameters and return types. - on the attributes and + on the methods.Exam tip Every method except the constructor needs a return type, even if it is void.B3.1-018 Tap to flip back
18 / 43
B3.1.3 Definition What is a static (class) variable? B3.1-019 Tap to flip B3.1.3 Definition What is a static (class) variable? A variable that belongs to the class , not to any object: one copy is shared by all instances , it is created once , independently of any object, and it can be accessed through the class name . Exam tip Static does not mean constant: that is final. Mark schemes reject 'its value cannot change'.B3.1-019 Tap to flip back
19 / 43
B3.1.3 Definition What is an instance (non-static) variable? B3.1-020 Tap to flip B3.1.3 Definition What is an instance (non-static) variable? A variable that belongs to an individual object : each instance has its own copy , created when that object is created (usually set in the constructor), so changing it in one object does not affect any other. Exam tip Java attributes declared without static are instance variables, as are attributes Python creates on self in __init__.B3.1-020 Tap to flip back
20 / 43
B3.1.3 Compare Distinguish between a static method and an instance (non-static) method. B3.1-021 Tap to flip B3.1.3 Compare Distinguish between a static method and an instance (non-static) method. Static : belongs to the class ; called through the class name without an object (Ticket.getIssued()).Instance : called on a specific object (t1.getSeat()).Static cannot use this/self or directly read instance variables; it works with static members or objects passed to it.Instance can use that object's instance variables as well as static members.CodePython Java class Ticket:
issued = 0 # class (static) variable
def __init__(self, seat):
self._seat = seat # instance variable
Ticket.issued += 1
@staticmethod
def getIssued():
return Ticket.issued
def getSeat(self):
return self._seatpublic class Ticket {
private static int issued = 0; // one shared copy
private int seat; // one per object
public Ticket(int seat) { this.seat = seat; issued++; }
public static int getIssued() { return issued; }
public int getSeat() { return seat; }
}Exam tip Java's main is static so it can run before any object exists. Math.sqrt() is a static method you already use.B3.1-021 Tap to flip back
21 / 43
B3.1.3 Compare Distinguish static and instance variables in terms of scope, lifetime and the effect of changing them. B3.1-022 Tap to flip B3.1.3 Compare Distinguish static and instance variables in terms of scope, lifetime and the effect of changing them. Scope : a static variable is usable anywhere in the class, including static methods, and (if public) elsewhere via the class name ; an instance variable is reached only through its own object (this/self or a reference).Lifetime : static lasts the whole program run ; instance lasts only as long as its object .Changes : a static change is seen by every object ; an instance change affects one object only.Exam tip Static uses less memory for shared data: one copy in total instead of one per object.B3.1-022 Tap to flip back
22 / 43
B3.1.3 Compare How are static variables and static methods declared in Java compared with Python? B3.1-023 Tap to flip B3.1.3 Compare How are static variables and static methods declared in Java compared with Python? Java : the static keyword, e.g. private static int count = 0; and public static int getCount().Python : no keyword for variables; a class attribute is assigned in the class body outside any method (count = 0) and read as ClassName.count.Python methods : @staticmethod (no self parameter) or @classmethod (receives the class as cls).Exam tip In Python, self.count += 1 creates a new instance attribute that hides the class one. Update it through ClassName.count.B3.1-023 Tap to flip back
23 / 43
B3.1.3 Apply it A BankAccount class stores owner, balance and an interest rate that is the same for every account. Which should be static, and why? B3.1-024 Tap to flip B3.1.3 Apply it A BankAccount class stores owner, balance and an interest rate that is the same for every account. Which should be static, and why? interestRate should be static : one value shared by all accounts , so changing it once updates every account and it is not duplicated in memory.owner and balance should be instance variables : they differ for each account , and a deposit into one must not change another.Rule: data that varies per object is instance; data common to the whole class (or a running total) is static. Exam tip If one object's change would wrongly alter every other object, the variable must be an instance variable.B3.1-024 Tap to flip back
24 / 43
B3.1.3 Exam question [3 marks] A Ticket class has a static integer issued, starting at 0 and increased by 1 in the constructor. Explain the role of issued. [3] B3.1-025 Tap to flip B3.1.3 Exam question [3 marks] A Ticket class has a static integer issued, starting at 0 and increased by 1 in the constructor. Explain the role of issued. [3] issued belongs to the class , so there is one copy shared by every Ticket object.Each time a Ticket is instantiated , the constructor adds 1, so it counts how many tickets have been created . It is not reset for each new object, so its value persists across all objects for the whole run. It can be read through the class name (Ticket.issued or a static getter) without needing an object . Exam tip An instance counter would start at 0 in every new object, so each ticket would only ever show 1.B3.1-025 Tap to flip back
25 / 43
B3.1.4 Definition In OOP, what is a constructor, and when does it run? B3.1-026 Tap to flip B3.1.4 Definition In OOP, what is a constructor, and when does it run? A special method that runs automatically when an object is instantiated and initialises its state by giving its attributes starting values. In Java it has the class's name and no return type ; in Python it is __init__. CodePython Java class Pet:
def __init__(self, name, age): # constructor
self._name = name
self._age = agepublic class Pet {
private String name;
private int age;
public Pet(String name, int age) { // constructor
this.name = name;
this.age = age;
}
}Exam tip Not even void goes before a Java constructor's name: adding a return type turns it into an ordinary method.B3.1-026 Tap to flip back
26 / 43
B3.1.4 Definition What is instantiation, and how is it written in Java and Python? B3.1-027 Tap to flip B3.1.4 Definition What is instantiation, and how is it written in Java and Python? Creating a new object (an instance) from a class by calling its constructor with starting values. Java uses new: Pet p = new Pet("Rex", 3); while Python calls the class directly: p = Pet("Rex", 3).Exam tip 'Create an object' means instantiate an existing class, not write a new class definition.B3.1-027 Tap to flip back
27 / 43
B3.1.4 Definition In a class, what do this (Java) and self (Python) refer to? B3.1-028 Tap to flip B3.1.4 Definition In a class, what do this (Java) and self (Python) refer to? The current object : the particular instance whose method or constructor is running. They are used to reach that object's own attributes and to tell an attribute apart from a parameter of the same name , as in this.name = name. Exam tip In Python, self is the first parameter of every instance method but is never passed in the call.B3.1-028 Tap to flip back
28 / 43
B3.1.4 Explain Why should a constructor give every attribute of a new object a value? B3.1-029 Tap to flip B3.1.4 Explain Why should a constructor give every attribute of a new object a value? An object's state is the set of its current attribute values; the constructor sets the initial state at creation. Setting every attribute means the object starts valid and ready to use , with nothing undefined or null. Parameters give each object its own characteristics (e.g. a name); other attributes get sensible defaults (e.g. occupied = false).Later methods can then rely on those values. Exam tip Java supplies a no-argument default constructor only when you write none; attributes then keep defaults (0, false, null).B3.1-029 Tap to flip back
29 / 43
B3.1.4 Process What happens, step by step, when the statement Pet p = new Pet("Rex", 3); is executed? B3.1-030 Tap to flip B3.1.4 Process What happens, step by step, when the statement Pet p = new Pet("Rex", 3); is executed? Memory is allocated for a new Pet object.The constructor is called with the arguments "Rex" and 3. The constructor initialises the attributes (name to "Rex", age to 3). A reference to the new object is stored in the variable p, which is then used to access it. Exam tip Python's p = Pet("Rex", 3) does the same; self is filled in automatically, never passed by the caller.B3.1-030 Tap to flip back
30 / 43
B3.1.4 Compare How does defining a class with attributes and a constructor differ between Java and Python? B3.1-031 Tap to flip B3.1.4 Compare How does defining a class with attributes and a constructor differ between Java and Python? Attributes : Java declares them with types in the class body (private String name;); Python creates them by assigning to self in __init__.Constructor : Java's has the class name and no return type; Python's is always __init__.Current object : Java's this is implicit; Python's self is an explicit first parameter.Files : a public Java class must be saved in a file of the same name (Pet.java); Python has no such rule.Exam tip Python is dynamically typed, so attributes and parameters carry no type declarations.B3.1-031 Tap to flip back
31 / 43
B3.1.4 Exam question [3 marks] Using a Pet class as the example, explain how a class differs from an instance of it. [3] B3.1-032 Tap to flip B3.1.4 Exam question [3 marks] Using a Pet class as the example, explain how a class differs from an instance of it. [3] A class is a blueprint (template) defining the attributes and methods its objects will have, e.g. Pet defines name, age and getName(). An instance is an actual object created from the class, with its own attribute values held in memory , e.g. rex with name "Rex" and age 3. One class can produce many independent instances (rex, bella), each with different values.Exam tip Questions that say 'with reference to' a class cap you at 1 mark without an example from that class.B3.1-032 Tap to flip back
32 / 43
B3.1.4 Exam question [3 marks] A Book class has constructor Book(String title, int pages). Construct code that creates a Book called novel for "Dune", 412 pages. [3] B3.1-033 Tap to flip B3.1.4 Exam question [3 marks] A Book class has constructor Book(String title, int pages). Construct code that creates a Book called novel for "Dune", 412 pages. [3] Java: Book novel = new Book("Dune", 412); Python: novel = Book("Dune", 412) Variable novel declared (in Java, with type Book). new Book(...) in Java, or a call to Book(...) in Python.Arguments in constructor order: the title in quotes, the pages as an integer. Exam tip Order matters: Book(412, "Dune") fails to compile in Java and silently swaps the values in Python.B3.1-033 Tap to flip back
33 / 43
B3.1.5 Definition What is encapsulation in OOP? B3.1-034 Tap to flip B3.1.5 Definition What is encapsulation in OOP? Bundling an object's attributes and the methods that operate on them into a single unit, the class , usually with the data restricted so that outside code can use it only through the class's methods.Exam tip Think of a capsule: everything sealed in one unit that you can use without seeing inside.B3.1-034 Tap to flip back
34 / 43
B3.1.5 Definition What is information hiding in OOP? B3.1-035 Tap to flip B3.1.5 Definition What is information hiding in OOP? Concealing an object's internal data and implementation details from other code, which can use the object only through its public interface (its public methods). Users know what a class does, not how . It is achieved by making attributes private . Exam tip Vending machine: you press the buttons (public methods) but cannot reach the cash or stock (private data). The buttons enforce the rules.B3.1-035 Tap to flip back
35 / 43
B3.1.5 Definition What do the private and public access modifiers do? B3.1-036 Tap to flip B3.1.5 Definition What do the private and public access modifiers do? private: the member is accessible only inside its own class ; other classes cannot read or change it directly.public: the member is accessible from any class .Typically attributes are private and the methods forming the interface are public . CodePython Java class Account:
def __init__(self):
self._balance = 0.0 # private by convention
def getBalance(self): # public
return self._balancepublic class Account {
private double balance; // hidden
public double getBalance() { // interface
return balance;
}
}
// acc.balance = -50; compile error in any other classExam tip Access modifiers are the tool; information hiding is the goal they achieve.B3.1-036 Tap to flip back
36 / 43
B3.1.5 Definition What are accessor (getter) and mutator (setter) methods? B3.1-037 Tap to flip B3.1.5 Definition What are accessor (getter) and mutator (setter) methods? Accessor (getter) : a public method that returns a private attribute's value , e.g. getBalance().Mutator (setter) : a public method that changes a private attribute's value in a controlled way, e.g. setPin(p), usually checking the new value first.Exam tip A getter with no setter makes an attribute read-only to other classes.B3.1-037 Tap to flip back
37 / 43
B3.1.5 Compare How do encapsulation and information hiding differ, and how are they related? B3.1-038 Tap to flip B3.1.5 Compare How do encapsulation and information hiding differ, and how are they related? Encapsulation is about structure : grouping data and the methods that use it into one class.Information hiding is about access : keeping internals private so only the public interface is visible.Relationship : encapsulation provides the unit and information hiding protects it. A class with all-public attributes is bundled but hides nothing, so it gives no protection.Exam tip For a 1-mark definition of encapsulation either idea scores, but a full answer mentions bundling and restricted access.B3.1-038 Tap to flip back
38 / 43
B3.1.5 Explain Does Python enforce private attributes in the same way Java does? B3.1-039 Tap to flip B3.1.5 Explain Does Python enforce private attributes in the same way Java does? No. Java's private is enforced by the compiler , but Python has no access-modifier keywords : a leading underscore (self._balance) marks an attribute as private by convention , as in IB Python code; a double underscore (self.__balance) triggers name mangling , which makes accidental outside access harder, but in an Account class it is still reachable as obj._Account__balance. Python privacy relies on programmers respecting the convention. Exam tip The textbook uses __ for private and _ for protected; both are conventions. Saying Python 'blocks' access is wrong.B3.1-039 Tap to flip back
39 / 43
B3.1.5 Explain How can a mutator method protect the integrity of an object's state? B3.1-040 Tap to flip B3.1.5 Explain How can a mutator method protect the integrity of an object's state? It validates each new value (range, type, format) before assigning it and rejects invalid ones, so the object can never hold impossible data such as a score of 150. It can keep related attributes consistent , e.g. recalculating a total whenever a price changes. Because the attribute is private , the mutator is the only route in , so its checks cannot be bypassed. CodePython Java def setScore(self, s):
if 0 <= s <= 100: # reject out-of-range values
self._score = sprivate int score;
public void setScore(int s) {
if (s >= 0 && s <= 100) { // reject out-of-range values
score = s;
}
}Exam tip Integrity means the data stays valid and consistent. Name the actual check (e.g. 'rejects negative ages') to earn the mark.B3.1-040 Tap to flip back
40 / 43
B3.1.5 Explain Why does limiting access to an object's attributes improve the security of its state? B3.1-041 Tap to flip B3.1.5 Explain Why does limiting access to an object's attributes improve the security of its state? Private attributes cannot be read or changed directly by outside code, so accidental or malicious changes from other classes are blocked.Every access goes through methods the class controls , which decide what is allowed. Sensitive data can be made read-only (getter, no setter) or never exposed at all, e.g. a stored PIN with only a checkPin() method. Exam tip 'Security' alone scores little: say what is protected (the object's data), from whom (other classes) and how (private plus methods).B3.1-041 Tap to flip back
41 / 43
B3.1.5 Apply it Other code sets a Thermostat object's public targetTemp to 500. How should the class be redesigned using encapsulation? B3.1-042 Tap to flip B3.1.5 Apply it Other code sets a Thermostat object's public targetTemp to 500. How should the class be redesigned using encapsulation? Make targetTemp private , so outside code can no longer assign to it directly. Add a public getter getTargetTemp() for read access. Add a public setter setTargetTemp(t) that accepts only a sensible range (e.g. 5 to 30 degrees) and rejects anything else. Now setTargetTemp(500) is refused, so the object's state stays valid. Exam tip Validate in the constructor too, or a bad starting value can still slip in when the object is created.B3.1-042 Tap to flip back
42 / 43
B3.1.5 Exam question [4 marks] Describe two ways encapsulation benefits a team building a large program. [4] B3.1-043 Tap to flip B3.1.5 Exam question [4 marks] Describe two ways encapsulation benefits a team building a large program. [4] Benefit 1: easier maintenance A class's internal code can be changed or fixed without editing other classes, because they rely only on its public methods , which stay the same. Benefit 2: safer parallel development Each programmer can build and test a class in isolation , and private data cannot be changed accidentally by teammates' code. Exam tip Do not mix clusters: each expansion must explain the benefit you named, not a different one.B3.1-043 Tap to flip back
43 / 43
Tip: click the card, then use the arrow keys to flip and move through the deck.
B3.2 Fundamentals of OOP for multiple classes (HL only) This HL deck covers inheritance (and how private, protected, public and default access affect a subclass), polymorphism through overriding and overloading, abstract classes and methods, and the lifetime test that separates composition from aggregation. It ends with the singleton, factory and observer patterns, each paired with a scenario so you can spot which one a question describes. All 39 cards are HL.
Read the full B3.2 revision guide for polymorphism traced through a worked example.
B3.2 Fundamentals of OOP for multiple classes HL 39 cards
B3.2.1 Definition HL What is inheritance in OOP, and what other names are used for the parent and child classes? B3.2-001 Tap to flip B3.2.1 Definition HL What is inheritance in OOP, and what other names are used for the parent and child classes? A child class (subclass, derived class) acquires the attributes and methods of a parent class (superclass, base class) and can add or override members. It models an "is-a" relationship: a Car is a Vehicle. Exam tip Learn the name pairs: parent = superclass = base; child = subclass = derived. Test with "X is a Y": if it sounds wrong, it is not inheritance.B3.2-001 Tap to flip back
1 / 39
B3.2.1 Explain HL How does a child class extend a parent class and reuse the parent's constructor, in Java and in Python? B3.2-002 Tap to flip B3.2.1 Explain HL How does a child class extend a parent class and reuse the parent's constructor, in Java and in Python? The class header names the parent: Java class Dog extends Animal, Python class Dog(Animal): The child's constructor passes the parent's share of the data to the parent constructor with super(...) (Java) or super().__init__(...) (Python), so inherited attributes are initialised without rewriting that code It then sets only its own new attributes CodePython Java class Animal:
def __init__(self, name):
self.name = name
class Dog(Animal):
def __init__(self, name, breed):
super().__init__(name) # parent sets name
self.breed = breed # child sets its ownclass Animal {
protected String name;
Animal(String name) { this.name = name; }
}
class Dog extends Animal {
private String breed;
Dog(String name, String breed) {
super(name); // parent sets name
this.breed = breed; // child sets its own
}
}Exam tip If asked for the header, write the whole line, class Dog extends Animal; the keyword extends on its own is not enough.B3.2-002 Tap to flip back
2 / 39
B3.2.1 Explain HL How can a child class add to an inherited method's behaviour rather than rewriting that method from scratch? B3.2-003 Tap to flip B3.2.1 Explain HL How can a child class add to an inherited method's behaviour rather than rewriting that method from scratch? Override the method and, inside it, call the parent's version with super.describe() (Java) or super().describe() (Python), then add the child-specific part. The parent's tested logic is reused, not duplicated , so a later fix in the parent also reaches the child.CodePython Java class Animal:
def __init__(self, name):
self.name = name
def describe(self):
return "Name: " + self.name
class Dog(Animal):
def describe(self):
return super().describe() + " (dog)" # reuse, then addclass Animal {
protected String name;
String describe() { return "Name: " + name; }
}
class Dog extends Animal {
@Override
String describe() {
return super.describe() + " (dog)"; // reuse, then add
}
}Exam tip Copying the parent's logic into the override duplicates code and loses marks; super exists so you can extend instead.B3.2-003 Tap to flip back
3 / 39
B3.2.1 Exam question [4 marks] HL A booking system has Flight and TrainJourney classes that both extend a Trip superclass. Outline two advantages of using inheritance here. B3.2-004 Tap to flip B3.2.1 Exam question [4 marks] HL A booking system has Flight and TrainJourney classes that both extend a Trip superclass. Outline two advantages of using inheritance here. Code reuse : shared attributes and methods (departure time, price, getDuration()) are written once in Trip So Flight and TrainJourney do not duplicate that code, which saves development time Easier maintenance : a change or bug fix is made once in the superclass And it is inherited automatically by both subclasses, so nothing is updated twice Also creditable: extensibility , e.g. a new BusJourney subclass adds only what is new Exam tip "Faster" or "easier" with no reason scores nothing. Name the scenario's classes: generic answers are capped.B3.2-004 Tap to flip back
4 / 39
B3.2.1 Explain HL What are the main drawbacks of using inheritance? B3.2-005 Tap to flip B3.2.1 Explain HL What are the main drawbacks of using inheritance? Tight coupling : a change to the parent can unintentionally break or alter every childComplexity : in deep hierarchies it is hard to trace where a member is defined or overriddenPoor fit : a child inherits everything, even parent members that do not suit itLimited flexibility : a Java class can extend only one superclassExam tip Use inheritance only when "is-a" is genuinely true; otherwise a has-a relationship (aggregation or composition) is usually safer.B3.2-005 Tap to flip back
5 / 39
B3.2.1 Compare HL In Java, how does each access modifier on a parent class member affect whether a child class can use that member? B3.2-006 Tap to flip B3.2.1 Compare HL In Java, how does each access modifier on a parent class member affect whether a child class can use that member? public : accessible everywhere , including in any child classprotected : accessible in child classes (in any package) and anywhere in the same package default (no keyword, package-private): accessible only within the same package , so a child in another package cannot use itprivate : accessible only inside the declaring class ; a child must go through the parent's public or protected methodsExam tip From most to least open: public, protected, default, private. A private member is hidden even from the child.B3.2-006 Tap to flip back
6 / 39
B3.2.1 Compare HL What are the trade-offs of declaring a parent class's attributes protected instead of private? B3.2-007 Tap to flip B3.2.1 Compare HL What are the trade-offs of declaring a parent class's attributes protected instead of private? protected : a child can read and change the attribute directly , so less code is needed, but encapsulation is weaker : a child could store invalid values and becomes tied to the parent's internal designprivate : stronger data hiding , so the parent controls and validates every change and can alter its internals safely, but the child needs accessor and mutator methods , meaning extra codeExam tip An Evaluate question here needs both sides plus a verdict, e.g. private for sensitive data, protected for closely related subclasses.B3.2-007 Tap to flip back
7 / 39
B3.2.1 Explain HL A Python parent class Account sets self._owner and self.__balance. Can its child class Savings use each one directly? B3.2-008 Tap to flip B3.2.1 Explain HL A Python parent class Account sets self._owner and self.__balance. Can its child class Savings use each one directly? self._owner: yes . A single underscore marks it protected by convention only , so the child (or any other code) can still use itself.__balance: not by that name . Name mangling stores it as _Account__balance, so self.__balance written in Savings looks for _Savings__balance and raises an AttributeError The child should call the parent's getter instead Python has no package-based default access level Exam tip Python trusts the programmer: underscores are signals, not locks. Only Java enforces private, protected and default.B3.2-008 Tap to flip back
8 / 39
B3.2.1 Apply it HL A school system has Student and Teacher classes that both store a name and email and print contact details. How should inheritance be used? B3.2-009 Tap to flip B3.2.1 Apply it HL A school system has Student and Teacher classes that both store a name and email and print contact details. How should inheritance be used? Create a Person superclass holding the shared attributes (name, email) and the printContact() method Make Student and Teacher subclasses of Person, so each inherits these instead of redeclaring them Each subclass adds only its own members , e.g. studentId and yearGroup, or staffCode and subject A subclass can override printContact() if it needs extra output Exam tip Always name the real superclass and subclasses from the scenario; a generic description of inheritance earns limited marks.B3.2-009 Tap to flip back
9 / 39
B3.2.2 Definition HL What is polymorphism in OOP, and what are its two forms? B3.2-010 Tap to flip B3.2.2 Definition HL What is polymorphism in OOP, and what are its two forms? "Many forms": the same method name or call produces different behaviour depending on the object it is called on (or, for overloading, the arguments supplied). Its two forms are dynamic polymorphism (overriding) and static polymorphism (overloading). Exam tip Memory hook: one call, many behaviours. animal.speak() gives "Woof" for a Dog and "Meow" for a Cat.B3.2-010 Tap to flip back
10 / 39
B3.2.2 Definition HL What is method overriding? B3.2-011 Tap to flip B3.2.2 Definition HL What is method overriding? A child class provides its own implementation of a method it inherited , keeping the same name and parameter list (signature). Calling that method on a child object runs the child's version instead of the parent's. CodePython Java class Animal:
def speak(self):
return "..."
class Cat(Animal):
def speak(self): # same signature
return "Meow"
pet = Cat()
print(pet.speak()) # Meowclass Animal {
String speak() { return "..."; }
}
class Cat extends Animal {
@Override
String speak() { return "Meow"; } // same signature
}
Animal pet = new Cat();
System.out.println(pet.speak()); // MeowExam tip Java's @Override makes the compiler check the signature matches; without it, a typo silently creates a new method instead.B3.2-011 Tap to flip back
11 / 39
B3.2.2 Definition HL What is dynamic (run-time) polymorphism? B3.2-012 Tap to flip B3.2.2 Definition HL What is dynamic (run-time) polymorphism? The version of an overridden method that runs is chosen at run time from the actual class of the object , not the variable's declared type. So after Animal a = new Dog();, a.speak() runs Dog's overriding version. Exam tip The declared type only limits which methods the compiler lets you call; the object itself decides which version runs.B3.2-012 Tap to flip back
12 / 39
B3.2.2 Definition HL What is method overloading? B3.2-013 Tap to flip B3.2.2 Definition HL What is method overloading? Two or more methods (often constructors) in the same class share a name but have different parameter lists (number, type or order of parameters). The compiler picks the version whose parameters match the arguments in the call. CodePython Java class Rectangle:
# no true overloading: one method with a default value
def __init__(self, w, h=None):
self.w = w
self.h = w if h is None else h
Rectangle(5) # square
Rectangle(4, 2) # rectangleclass Rectangle {
double w, h;
Rectangle(double side) { w = side; h = side; } // square
Rectangle(double w, double h) { this.w = w; this.h = h; }
}
new Rectangle(5); // calls the first constructor
new Rectangle(4, 2); // calls the second constructorExam tip Return type alone cannot separate overloads: int f(int x) and double f(int x) will not compile together.B3.2-013 Tap to flip back
13 / 39
B3.2.2 Explain HL What is static (compile-time) polymorphism, and how does it help make code efficient? B3.2-014 Tap to flip B3.2.2 Explain HL What is static (compile-time) polymorphism, and how does it help make code efficient? It is achieved by method overloading : the compiler binds each call to one version by matching the number and types of arguments The choice is fixed before the program runs , so there is no run-time lookup cost One meaningful name covers related operations (area(r), area(w, h)), so there are fewer method names to write and remember Exam tip Dynamic polymorphism costs a little extra processing because the version is found while the program runs; static does not.B3.2-014 Tap to flip back
14 / 39
B3.2.2 Explain HL Why does Python not support true method overloading, and how do programmers get a similar effect? B3.2-015 Tap to flip B3.2.2 Explain HL Why does Python not support true method overloading, and how do programmers get a similar effect? Python does not choose methods by parameter list: a second def with the same name replaces the first, so only the last definition survives A similar effect comes from default parameter values (def area(self, w, h=None)) or variable arguments (*args), with one method checking what was supplied Exam tip Never claim Python supports overloading. In exam answers, one method with a default parameter is the accepted Python equivalent.B3.2-015 Tap to flip back
15 / 39
B3.2.2 Compare HL How does method overriding differ from method overloading? B3.2-016 Tap to flip B3.2.2 Compare HL How does method overriding differ from method overloading? Where : overriding redefines an inherited method in a child class ; overloading adds same-named methods in the same class Signature : overriding keeps it identical ; overloading needs different parameter lists Inheritance : required for overriding, not for overloadingBinding : overriding is resolved at run time (dynamic); overloading at compile time (static)Exam tip Hook: overLoading = Lots of parameter lists in one class; overRiding = Rewriting the parent's method in a child.B3.2-016 Tap to flip back
16 / 39
B3.2.2 Exam question [4 marks] HL A game stores Goblin, Dragon and Troll objects, all subclasses of Enemy, in one list. Explain how polymorphism makes this code flexible and reusable. B3.2-017 Tap to flip B3.2.2 Exam question [4 marks] HL A game stores Goblin, Dragon and Troll objects, all subclasses of Enemy, in one list. Explain how polymorphism makes this code flexible and reusable. Each subclass is an Enemy, so all of them can be held in one list of Enemy references One loop calls attack() on every item, and each object runs its own overridden version , chosen at run time No if/else checks on type are needed, so the code is shorter and generic A new subclass (e.g. Witch) can be added without changing the loop , so existing code is reused unchanged Exam tip Tie every point to the scenario's classes. Flexibility means new types plug in without editing code that already works.B3.2-017 Tap to flip back
17 / 39
B3.2.3 Definition HL What is abstraction in object-oriented programming? B3.2-018 Tap to flip B3.2.3 Definition HL What is abstraction in object-oriented programming? Showing what an object does through its public methods while hiding how it does it. Users of a class see only the essential operations ; unnecessary implementation detail is hidden, which reduces complexity. Exam tip Abstraction hides how something works; encapsulation hides data behind methods. The essential features stay visible, never hidden.B3.2-018 Tap to flip back
18 / 39
B3.2.3 Definition HL What is an abstract class? B3.2-019 Tap to flip B3.2.3 Definition HL What is an abstract class? A class that cannot be instantiated ; it exists only to be extended . It may contain abstract methods (no body) as well as attributes, a constructor and concrete methods that subclasses inherit. Only its concrete subclasses can become objects. Exam tip It cannot be instantiated because it is incomplete: an abstract method has no code to run, and a general "Shape" is not a real object.B3.2-019 Tap to flip back
19 / 39
B3.2.3 Definition HL What is an abstract method? B3.2-020 Tap to flip B3.2.3 Definition HL What is an abstract method? A method that is declared (name, parameters, return type) without a body . Every concrete subclass must override it with its own implementation; a subclass that leaves one unimplemented is itself abstract and cannot be instantiated . Exam tip Think of it as a promise made by the parent: "every subclass can do this", while each child decides how.B3.2-020 Tap to flip back
20 / 39
B3.2.3 Explain HL How is an abstract class with an abstract method written in Java and in Python? B3.2-021 Tap to flip B3.2.3 Explain HL How is an abstract class with an abstract method written in Java and in Python? Java : mark the class and the bodiless method with the abstract keyword; new Shape() is a compile-time error Python : import from the abc module, inherit from ABC and mark the method with @abstractmethod; calling Shape() raises a TypeError when the program runs In both, a concrete subclass must implement the method before it can be instantiated CodePython Java from abc import ABC, abstractmethod
class Shape(ABC):
@abstractmethod
def area(self):
pass # no body
class Circle(Shape):
def __init__(self, r):
self.r = r
def area(self):
return 3.14159 * self.r ** 2abstract class Shape {
abstract double area(); // no body
String label() { return "Area: " + area(); } // concrete
}
class Circle extends Shape {
double r;
Circle(double r) { this.r = r; }
@Override
double area() { return Math.PI * r * r; }
}Exam tip In Python, forgetting to inherit from ABC means @abstractmethod is not enforced, so the class could still be instantiated.B3.2-021 Tap to flip back
21 / 39
B3.2.3 Explain HL Why is abstraction significant when developing modular code? B3.2-022 Tap to flip B3.2.3 Explain HL Why is abstraction significant when developing modular code? Other code depends only on a class's public methods , not its internals, so each class acts as an independent module A module's implementation can be changed, fixed or tested separately without breaking the code that uses it Classes sharing an abstract parent are interchangeable : any subclass can be swapped in Teams can build modules in parallel , agreeing only the list of methods Exam tip Explain answers need the reason: link the feature to its effect with "so" or "because".B3.2-022 Tap to flip back
22 / 39
B3.2.3 Exam question [4 marks] HL A payroll system has an abstract Employee class with subclasses Intern and Manager. Explain how Employee gives these subclasses a common interface. B3.2-023 Tap to flip B3.2.3 Exam question [4 marks] HL A payroll system has an abstract Employee class with subclasses Intern and Manager. Explain how Employee gives these subclasses a common interface. Employee declares abstract methods such as monthlyPay() with no body Intern and Manager must implement them, so both are guaranteed to offer the same operations Payroll code can hold any employee as an Employee reference and call monthlyPay() without knowing the subclass Shared behaviour (e.g. printPayslip()) is written once as a concrete method in Employee New employee types fit in by implementing the same methods Exam tip "Interface" here means the agreed set of methods every subclass offers, not only Java's interface keyword.B3.2-023 Tap to flip back
23 / 39
B3.2.4 Definition HL What is aggregation in OOP? B3.2-024 Tap to flip B3.2.4 Definition HL What is aggregation in OOP? A "has-a" relationship where a container object refers to component objects that exist independently of it: they may also belong to other containers and survive if the container is deleted. Example: a Team and its Players. Exam tip Test: if the team disbands, do the players still exist? Yes, so it is aggregation (hollow diamond).B3.2-024 Tap to flip back
24 / 39
B3.2.4 Definition HL What is composition in OOP? B3.2-025 Tap to flip B3.2.4 Definition HL What is composition in OOP? A strong "has-a" (part-of) relationship in which the components are tightly coupled to the whole: they are created and owned by it, cannot exist outside it and are destroyed with it. Example: a House and its Rooms. Exam tip Ask: does the part die with the whole? If yes, it is composition (filled diamond).B3.2-025 Tap to flip back
25 / 39
B3.2.4 Apply it HL In a UML diagram, Order joins OrderLine with a filled diamond at the Order end and multiplicities 1 and 1..*. What does this show? B3.2-026 Tap to flip B3.2.4 Apply it HL In a UML diagram, Order joins OrderLine with a filled diamond at the Order end and multiplicities 1 and 1..*. What does this show? Composition : Order is the whole and OrderLine the part (the diamond sits at the whole end)Each OrderLine belongs to exactly one Order and cannot exist without it : deleting the Order deletes its lines Each Order has one or more OrderLines (1..*) A hollow diamond would mean aggregation: the lines could outlive the Order Exam tip Filled means fatal: the part dies with the whole. Inheritance would instead be a hollow triangle pointing to the parent.B3.2-026 Tap to flip back
26 / 39
B3.2.4 Explain HL Why design a complex object from smaller component objects instead of one large class? B3.2-027 Tap to flip B3.2.4 Explain HL Why design a complex object from smaller component objects instead of one large class? Each component class has one clear job , so it is simpler to write, test and debug Components can be reused in other classes (one Engine class used by Car and Boat) A component can be changed or replaced with little effect on the rest of the system It mirrors the real "has-a" structure, so the design is easier to understand Exam tip Choose has-a when is-a is not true: a Car has an Engine; it is not an Engine.B3.2-027 Tap to flip back
27 / 39
B3.2.4 Compare HL How does code typically show the difference between aggregation and composition? B3.2-028 Tap to flip B3.2.4 Compare HL How does code typically show the difference between aggregation and composition? Aggregation : the component is created outside and passed in (through a constructor or add method), so other references to it can exist and it outlives the containerComposition : the container creates its components itself (in its constructor) and never shares them, so they disappear with the containerCodePython Java class Team: # aggregation
def __init__(self):
self.players = []
def add_player(self, p): # made elsewhere
self.players.append(p)
class House: # composition
def __init__(self):
self.rooms = [Room() for _ in range(3)] # made hereclass Team { // aggregation
private ArrayList<Player> players = new ArrayList<>();
void addPlayer(Player p) { players.add(p); } // made elsewhere
}
class House { // composition
private Room[] rooms = new Room[3];
House() {
for (int i = 0; i < 3; i++) rooms[i] = new Room(); // made here
}
}Exam tip Look at where the part is created: inside the owner suggests composition; passed in from outside suggests aggregation.B3.2-028 Tap to flip back
28 / 39
B3.2.4 Compare HL How does an inheritance relationship between two classes differ from an aggregation relationship? B3.2-029 Tap to flip B3.2.4 Compare HL How does an inheritance relationship between two classes differ from an aggregation relationship? Inheritance is "is-a" : the child is a more specific kind of the parent (a Car is a Vehicle); aggregation is "has-a" : one object contains others (a Garage has Cars)Inheritance passes on code (attributes and methods); aggregation only holds references to other objects A Java class has one superclass but can aggregate many objects Exam tip Say it aloud: "a Garage is a Car" is nonsense, so that link cannot be inheritance.B3.2-029 Tap to flip back
29 / 39
B3.2.4 Exam question [4 marks] HL A School object creates its own Classroom objects and holds Student objects that can transfer elsewhere. Explain how these two relationships differ. B3.2-030 Tap to flip B3.2.4 Exam question [4 marks] HL A School object creates its own Classroom objects and holds Student objects that can transfer elsewhere. Explain how these two relationships differ. School and Classroom: composition , because classrooms are created by the school and cannot exist outside it Deleting the School therefore destroys its Classrooms: their lifetimes are tied (tight coupling) School and Student: aggregation , because students exist independently and can belong to another schoolDeleting the School leaves the Student objects intact UML: filled diamond for composition, hollow diamond for aggregation Exam tip Naming the relationship without a reason rarely scores: always add the lifetime test (does the part survive the whole?).B3.2-030 Tap to flip back
30 / 39
B3.2.4 Apply it HL A programmer makes Car a subclass of Engine so that Car can reuse Engine's start() method. Why is this poor design, and what is better? B3.2-031 Tap to flip B3.2.4 Apply it HL A programmer makes Car a subclass of Engine so that Car can reuse Engine's start() method. Why is this poor design, and what is better? It fails the is-a test : a Car is not an Engine, so Car would inherit engine members that make no sense for it Better: composition , where Car has an Engine attribute created in its own constructor Car's start() calls engine.start() (delegation ), so the Engine code is still reused Car stays free to extend a genuine parent such as Vehicle Exam tip Inheriting just to borrow a method is a classic trap. Remember the guideline: favour composition over inheritance.B3.2-031 Tap to flip back
31 / 39
B3.2.5 Definition HL What is a design pattern in OOP? B3.2-032 Tap to flip B3.2.5 Definition HL What is a design pattern in OOP? A general, reusable, proven solution to a design problem that keeps recurring in software development. It is a template for how classes and objects are organised and interact, not finished code, so it is adapted to each program and language. Exam tip Know three: singleton and factory (both about creating objects) and observer (about how objects communicate).B3.2-032 Tap to flip back
32 / 39
B3.2.5 Explain HL Why do developers use design patterns instead of inventing their own solutions to common problems? B3.2-033 Tap to flip B3.2.5 Explain HL Why do developers use design patterns instead of inventing their own solutions to common problems? Tried and tested : the solution is already proven, so there are fewer design errors and development is quickerShared vocabulary : saying "use an observer" tells another developer the whole structure at onceMaintainability : code follows a familiar structure, so it is easier to understand, extend and changeLanguage-independent : the same idea works in Java, Python or any OO languageExam tip Avoid a bare "faster" or "easier": say why, e.g. quicker because the design has already been worked out and tested.B3.2-033 Tap to flip back
33 / 39
B3.2.5 Definition HL What is the singleton design pattern? B3.2-034 Tap to flip B3.2.5 Definition HL What is the singleton design pattern? Ensures a class has only one instance , with a single global point of access . A private constructor blocks outside new, and a static getInstance() method creates the object on first call and returns that same object every time. CodePython Java class Config:
_instance = None
def __new__(cls):
if cls._instance is None: # first use
cls._instance = super().__new__(cls)
return cls._instance # always the same
a = Config()
b = Config()
print(a is b) # Trueclass Config {
private static Config instance; // the one object
private Config() { } // no outside 'new'
public static Config getInstance() {
if (instance == null) {
instance = new Config(); // created on first use
}
return instance;
}
}Exam tip Python cannot make a constructor private; one common approach overrides __new__ so every Config() call returns the same object.B3.2-034 Tap to flip back
34 / 39
B3.2.5 Definition HL What is the factory design pattern? B3.2-035 Tap to flip B3.2.5 Definition HL What is the factory design pattern? Object creation is delegated to a factory method or class: the caller asks for an object, the factory decides which concrete class to instantiate , and returns it as a common supertype (interface or abstract class). Exam tip Hook: the caller orders a product without knowing which production line made it; it never writes new Circle() itself.B3.2-035 Tap to flip back
35 / 39
B3.2.5 Definition HL What is the observer design pattern? B3.2-036 Tap to flip B3.2.5 Definition HL What is the observer design pattern? A subject (publisher) keeps a list of observers (subscribers), which can register or unregister themselves. When the subject's state changes , it notifies every observer automatically , usually by calling each one's update() method. Exam tip Like following an artist on a music app: you are told about new releases instead of checking every day (no polling).B3.2-036 Tap to flip back
36 / 39
B3.2.5 Apply it HL A delivery app creates Bike, Van or Drone objects based on parcel size, and more types will follow. Which design pattern fits, and why? B3.2-037 Tap to flip B3.2.5 Apply it HL A delivery app creates Bike, Van or Drone objects based on parcel size, and more types will follow. Which design pattern fits, and why? Factory :A DeliveryFactory.create(size) method decides which class to instantiate and returns a common Delivery type Calling code works only with Delivery, so it is not tied to Bike, Van or Drone Creation logic sits in one place , so a new type needs a new subclass plus one change in the factory, not edits throughout the app Exam tip Factory clue: many related types, chosen at run time, with more types expected later.B3.2-037 Tap to flip back
37 / 39
B3.2.5 Apply it HL When a patient's heart-rate reading changes, a ward screen, a doctor's phone and a log must all update. Which design pattern fits, and why? B3.2-038 Tap to flip B3.2.5 Apply it HL When a patient's heart-rate reading changes, a ward screen, a doctor's phone and a log must all update. Which design pattern fits, and why? Observer :The patient monitor is the subject ; the screen, phone app and logger are observers registered with it On each new reading the subject notifies all registered observers automatically , so none has to poll New observers (e.g. a nurse's tablet) can be added without changing the subject, because it only calls a common update() method Exam tip Observer clue: one object changes and many others must react. The subject need not know what each observer is.B3.2-038 Tap to flip back
38 / 39
B3.2.5 Exam question [3 marks] HL In a cinema booking app, every part of the app must work with the same SeatManager object. Explain how the singleton pattern helps. B3.2-039 Tap to flip B3.2.5 Exam question [3 marks] HL In a cinema booking app, every part of the app must work with the same SeatManager object. Explain how the singleton pattern helps. SeatManager gets a private constructor , so no other class can create a second copy with new A static getInstance() method creates the object once and returns that same instance to every caller So all parts of the app read and update one shared set of seat data This prevents conflicting copies , e.g. the same seat sold twice by two separate SeatManager objects Exam tip Full marks need the problem the singleton solves (duplicate, conflicting copies), not just its definition.B3.2-039 Tap to flip back
39 / 39
Tip: click the card, then use the arrow keys to flip and move through the deck.
B4 Abstract data types flashcards B4 is HL only and is examined in Paper 2. Its single deck covers every structure you may be asked to sketch, trace or code.
B4.1 Fundamentals of ADTs (HL only) The deck separates an ADT's interface from its implementation, then covers singly, doubly and circular linked lists: sketches, pointer changes and when they beat arrays. BST cards cover insertion, deletion in all three cases, and pre-order, in-order and post-order traversals. Sets and hash tables (hashing, collisions, load factor, linear probing) finish the deck, with HashMap, HashSet, dict and set code. All 49 cards are HL.
Read the full B4.1 revision guide for a step-by-step BST build and traversal.
B4.1 Fundamentals of ADTs HL 49 cards
B4.1.1 Definition HL What is an abstract data type (ADT), and what does its definition deliberately leave out? B4.1-001 Tap to flip B4.1.1 Definition HL What is an abstract data type (ADT), and what does its definition deliberately leave out? A high-level description of a type of data in terms of the values it can hold and the operations that can be performed on it (and how they behave), without specifying how it is implemented . Exam tip Two marks need both halves: data plus operations, and implementation hidden. 'It has methods' on its own earns nothing.B4.1-001 Tap to flip back
1 / 49
B4.1.1 Compare HL How does an ADT differ from the data structure used to implement it? B4.1-002 Tap to flip B4.1.1 Compare HL How does an ADT differ from the data structure used to implement it? An ADT is the logical interface : what operations exist and how they behave. Examples: list, stack, queue, set, map (dictionary), tree. A data structure is the concrete implementation : how the data is laid out in memory and the operations coded. Examples: array, linked list, hash table. One ADT can have several implementations : a queue can be built on an array or on a linked list. Exam tip Memory hook: the ADT is the menu; the data structure is the kitchen.B4.1-002 Tap to flip back
2 / 49
B4.1.1 Explain HL Explain the benefits of separating an ADT's interface from its implementation. B4.1-003 Tap to flip B4.1.1 Explain HL Explain the benefits of separating an ADT's interface from its implementation. Abstraction : users need to know only what each operation does, so large programs are simpler to design and reason about.Encapsulation : the data can be changed only through the operations , so it is protected from misuse.Modularity : the implementation can be swapped or improved without changing the code that uses it , provided the interface stays the same.Reusability : one ADT can be reused across many programs.Exam tip In explain answers, follow each property with 'so...' or 'because...': naming it alone earns little.B4.1-003 Tap to flip back
3 / 49
B4.1.1 Exam question [3 marks] HL Explain why a stack built on an array and a stack built on a linked list are the same ADT. B4.1-004 Tap to flip B4.1.1 Exam question [3 marks] HL Explain why a stack built on an array and a stack built on a linked list are the same ADT. A stack is defined by its operations (push, pop, peek, isEmpty) and their LIFO behaviour . Both versions provide the same interface , so code using them gets identical results . The array or linked list is a hidden implementation detail . The choice affects only performance and memory use , so one can replace the other without changing the code that uses it. Exam tip Describing how the array version works internally answers a different question.B4.1-004 Tap to flip back
4 / 49
B4.1.2 Definition HL What is a linked list, and what does each of its nodes contain? B4.1-005 Tap to flip B4.1.2 Definition HL What is a linked list, and what does each of its nodes contain? A dynamic, linear collection of nodes . Each node stores data and a pointer (reference) to the next node . An external head pointer locates the first node, and the last node's pointer is null , marking the end. Exam tip Nodes can sit anywhere in memory: the pointers, not physical positions, define the order.B4.1-005 Tap to flip back
5 / 49
B4.1.2 Compare HL How do singly, doubly and circular linked lists differ in their pointers and in how they can be traversed? B4.1-006 Tap to flip B4.1.2 Compare HL How do singly, doubly and circular linked lists differ in their pointers and in how they can be traversed? Singly : each node points to the next node only; the last node's pointer is null ; traversal is one way , from the head.Doubly : each node points to the next and the previous node; the first node's previous and the last node's next are null; traversal in both directions .Circular : the last node points back to the first , so there is no null ; traversal can loop round continuously.Exam tip Circular describes the ends, not the pointer count: a circular list can be singly or doubly linked.B4.1-006 Tap to flip back
6 / 49
B4.1.2 Exam question [3 marks] HL Sketch a singly linked list that holds 12, 5 and 30 in that order. B4.1-007 Tap to flip B4.1.2 Exam question [3 marks] HL Sketch a singly linked list that holds 12, 5 and 30 in that order. An external head pointer to the first node. Each node drawn with a data field and a pointer field , linked in order 12 → 5 → 30. The last node's pointer set to null (written null or ∅). In words: head → [12 | •] → [5 | •] → [30 | null] Exam tip The two marks most often lost: no head pointer, and a last pointer left blank instead of null.B4.1-007 Tap to flip back
7 / 49
B4.1.2 Definition HL What must a sketch of a doubly linked list show? B4.1-008 Tap to flip B4.1.2 Definition HL What must a sketch of a doubly linked list show? A head pointer to the first node (usually a tail pointer too). Nodes with three fields : previous pointer, data, next pointer. Next arrows forwards and previous arrows backwards.Null in the first node's previous and the last node's next.Exam tip For a circular version, the last node's next points to the first node (and the first's previous to the last): no nulls.B4.1-008 Tap to flip back
8 / 49
B4.1.2 Process HL In a singly linked list, describe the pointer changes needed to insert a node holding 7 between the nodes holding 4 and 9. B4.1-009 Tap to flip B4.1.2 Process HL In a singly linked list, describe the pointer changes needed to insert a node holding 7 between the nodes holding 4 and 9. Create a new node holding 7. Traverse from the head to the node holding 4 (the previous node). Set the new node's next to 4's next (the node holding 9). Then set 4's next to the new node .Result: ... → 4 → 7 → 9 → ..., with the rest of the list unchanged. Exam tip Order matters: if 4's pointer changes first, the link to 9 and the rest of the list is lost.B4.1-009 Tap to flip back
9 / 49
B4.1.2 Compare HL Compare a linked list with a static array in terms of memory utilisation. B4.1-010 Tap to flip B4.1.2 Compare HL Compare a linked list with a static array in terms of memory utilisation. An array reserves a fixed block of contiguous memory up front, so unused slots waste space and it overflows when full; a linked list allocates memory per node , only when needed. An array stores only the data ; every linked-list node also stores one or two pointers , an overhead on each item. Array elements sit together in memory; list nodes are scattered , so access is less cache-friendly. Exam tip Both statements hold: a linked list never has empty slots, yet uses more memory per item stored.B4.1-010 Tap to flip back
10 / 49
B4.1.2 Compare HL Compare the time complexity of a linked list and an array for accessing, inserting, deleting and searching. B4.1-011 Tap to flip B4.1.2 Compare HL Compare the time complexity of a linked list and an array for accessing, inserting, deleting and searching. Access by position : array O(1) , direct by index; linked list O(n) , traverse from the head.Insert or delete once the position is found (holding the node before it): linked list O(1) , only pointers change; array O(n) , later elements must be shifted .Search (unsorted) : both O(n) .Search (sorted) : an array allows binary search, O(log n) ; a linked list does not.Exam tip Linked list O(1) insertion assumes you already hold the right node: finding it first is O(n).B4.1-011 Tap to flip back
11 / 49
B4.1.2 Exam question [4 marks] HL Customers join a cafe waiting list at the end but may leave from anywhere. Evaluate using a linked list rather than a static array. B4.1-012 Tap to flip B4.1.2 Exam question [4 marks] HL Customers join a cafe waiting list at the end but may leave from anywhere. Evaluate using a linked list rather than a static array. Strength : it grows and shrinks with demand, with no fixed maximum or wasted slots.Strength : a customer leaving mid-list is removed by changing a pointer , with no shifting of later customers.Limitation : extra memory for a pointer in every node.Limitation : no direct access ; locating a named customer needs an O(n) traversal .Judgement : size varies and customers are served in order, so a linked list is the better choice .Exam tip Evaluate needs both sides and a verdict: a one-sided answer is capped. Choose an array instead when fast access by index matters most.B4.1-012 Tap to flip back
12 / 49
B4.1.3 Definition HL What fields does a node need in a singly linked list, and what extra field does a doubly linked list node need? B4.1-013 Tap to flip B4.1.3 Definition HL What fields does a node need in a singly linked list, and what extra field does a doubly linked list node need? Singly: the data and a next reference to the following node (null/None at the end). Doubly: also a prev reference to the preceding node (null/None for the first node). CodePython Java class Node:
def __init__(self, data):
self.data = data
self.next = None # None if this is the last node
self.prev = None # doubly linked lists onlyclass Node {
int data;
Node next; // null if this is the last node
Node prev; // doubly linked lists only
Node(int data) {
this.data = data;
}
}Exam tip Keep Node and LinkedList as separate classes: the list holds head (and tail); each node holds only its own fields.B4.1-013 Tap to flip back
13 / 49
B4.1.3 Process HL Describe how to add a node at the head of a singly linked list, and at the tail when a tail pointer is kept. B4.1-014 Tap to flip B4.1.3 Process HL Describe how to add a node at the head of a singly linked list, and at the tail when a tail pointer is kept. At the head , O(1):Create the node and set newNode.next = head. Set head = newNode (if the list was empty, tail = newNode too). At the tail , O(1) with a tail pointer:Create the node (its next is null). If the list is empty, set head and tail to it; otherwise set tail.next = newNode, then tail = newNode. CodePython Java def append(self, value):
new_node = Node(value)
if self.head is None:
self.head = new_node # empty list: it is head and tail
else:
self.tail.next = new_node # link the old tail to it first
self.tail = new_node # then move the tail pointervoid append(int value) {
Node newNode = new Node(value);
if (head == null) {
head = newNode; // empty list: it is head and tail
} else {
tail.next = newNode; // link the old tail to it first
}
tail = newNode; // then move the tail pointer
}Exam tip Without a tail pointer, appending is O(n): you must walk the whole list to find the last node.B4.1-014 Tap to flip back
14 / 49
B4.1.3 Process HL How do you search a singly linked list for a target value, and what is the time complexity? B4.1-015 Tap to flip B4.1.3 Process HL How do you search a singly linked list for a target value, and what is the time complexity? Set a temporary pointer to the head . Compare the current node's data with the target; if they match, it is found : stop.Otherwise follow the next pointer and repeat. If the pointer becomes null , the end is reached: the value is not in the list . Worst case O(n) : every node may be visited. CodePython Java def contains(self, target):
temp = self.head
while temp is not None:
if temp.data == target:
return True
temp = temp.next
return Falseboolean contains(int target) {
Node temp = head;
while (temp != null) {
if (temp.data == target) return true;
temp = temp.next;
}
return false;
}Exam tip Even a sorted linked list cannot be binary searched, because there is no direct access to the middle node.B4.1-015 Tap to flip back
15 / 49
B4.1.3 Process HL How do you delete the first node holding a given value from a singly linked list? B4.1-016 Tap to flip B4.1.3 Process HL How do you delete the first node holding a given value from a singly linked list? If the list is empty, stop. If the head holds the value, set head = head.next . Otherwise traverse with a previous pointer, checking previous.next each time. When found, bypass it: previous.next = previous.next.next . The bypassed node is no longer referenced, so its memory is reclaimed. CodePython Java def delete(self, value):
if self.head is None:
return
if self.head.data == value:
self.head = self.head.next
return
prev = self.head
while prev.next is not None and prev.next.data != value:
prev = prev.next
if prev.next is not None:
prev.next = prev.next.nextvoid delete(int value) {
if (head == null) return;
if (head.data == value) { head = head.next; return; }
Node prev = head;
while (prev.next != null && prev.next.data != value) {
prev = prev.next;
}
if (prev.next != null) prev.next = prev.next.next;
}Exam tip Deleting the head is special because the external head pointer must change. If a tail pointer is kept, update it when the last node goes.B4.1-016 Tap to flip back
16 / 49
B4.1.3 Exam question [5 marks] HL A singly linked list is kept in ascending order. Describe how a new value is inserted in its correct position. B4.1-017 Tap to flip B4.1.3 Exam question [5 marks] HL A singly linked list is kept in ascending order. Describe how a new value is inserted in its correct position. Create a new node holding the value. Starting at the head , traverse with current and previous pointers, comparing values until the insertion point is found. At the front : new node's next = head, then head = new node .At the end : last node's next = new node; the new node's next stays null .In the middle : copy previous.next into newNode.next , then set previous.next to the new node.Exam tip Linking previous first loses the rest of the list. Inserting only at the front or end, when a middle position is needed, is capped.B4.1-017 Tap to flip back
17 / 49
B4.1.3 Explain HL Why is deleting a given node O(n) in a singly linked list but O(1) in a doubly linked list? B4.1-018 Tap to flip B4.1.3 Explain HL Why is deleting a given node O(n) in a singly linked list but O(1) in a doubly linked list? To remove a node, its predecessor's next pointer must be changed to skip it. A singly linked node does not know its predecessor , so the list must be traversed from the head to find it: O(n) . A doubly linked node's prev pointer leads straight to it, so only a fixed number of pointers change: O(1) . Exam tip Both assume you already hold a reference to the node. Finding a node by value is O(n) in either list.B4.1-018 Tap to flip back
18 / 49
B4.1.3 Process HL Describe the pointer changes needed to insert a new node N between adjacent nodes A and B in a doubly linked list. B4.1-019 Tap to flip B4.1.3 Process HL Describe the pointer changes needed to insert a new node N between adjacent nodes A and B in a doubly linked list. Set N.prev = A . Set N.next = B . Set A.next = N . Set B.prev = N . Four pointers change, against two in a singly linked list. If N becomes the first or last node, also update the head or tail pointer. Exam tip Deleting a node X reverses this: set X.prev.next = X.next and X.next.prev = X.prev.B4.1-019 Tap to flip back
19 / 49
B4.1.3 Process HL How do you visit every node of a circular linked list exactly once? B4.1-020 Tap to flip B4.1.3 Process HL How do you visit every node of a circular linked list exactly once? If head is null, the list is empty: stop. Set current = head. Process current, then move current = current.next. Stop when current is back at the head : there is no null to mark the end.The last node is the one whose next equals the head . CodePython Java if self.head is not None:
cur = self.head
while True:
print(cur.data)
cur = cur.next
if cur is self.head:
breakif (head != null) {
Node cur = head;
do {
System.out.println(cur.data);
cur = cur.next;
} while (cur != head);
}Exam tip A loop that waits for null never ends in a circular list.B4.1-020 Tap to flip back
20 / 49
B4.1.3 Apply it HL Which linked list type best suits each: browser back/forward history, round-robin CPU scheduling, and an undo stack that only works at the front? B4.1-021 Tap to flip B4.1.3 Apply it HL Which linked list type best suits each: browser back/forward history, round-robin CPU scheduling, and an undo stack that only works at the front? Browser history: doubly , because the user moves backwards and forwards from the current page.Round-robin scheduling: circular , because after the last process the scheduler returns to the first , giving each a turn in a repeating cycle.Undo stack: singly , because push and pop happen only at the head , in O(1), so a prev pointer would waste memory .Exam tip Justify with the property used: two-way movement means doubly; a repeating cycle means circular.B4.1-021 Tap to flip back
21 / 49
B4.1.4 Definition HL In a binary tree, what is meant by root, parent, child, leaf, subtree and height? B4.1-022 Tap to flip B4.1.4 Definition HL In a binary tree, what is meant by root, parent, child, leaf, subtree and height? Root : the top node, with no parent .Parent/child : a node directly above/below another; at most two children each.Leaf : a node with no children .Subtree : a node plus all its descendants .Height : edges on the longest root-to-leaf path .Exam tip Some sources count height in levels (nodes) rather than edges; state which you are using.B4.1-022 Tap to flip back
22 / 49
B4.1.4 Definition HL What is a binary search tree (BST)? B4.1-023 Tap to flip B4.1.4 Definition HL What is a binary search tree (BST)? A binary tree in which each node holds a key , a left pointer and a right pointer , and for every node all keys in its left subtree are smaller and all in its right subtree are larger . Exam tip The rule covers whole subtrees, not just direct children: every key deep in the left subtree must still be smaller.B4.1-023 Tap to flip back
23 / 49
B4.1.4 Process HL Describe how a BST is searched for a target value. B4.1-024 Tap to flip B4.1.4 Process HL Describe how a BST is searched for a target value. Start at the root . If the current key equals the target, it is found . If the target is smaller , move to the left child ; if larger , to the right child . Repeat from step 2. If an empty (null) child is reached, the target is not in the tree . Exam tip Each comparison rules out a whole subtree: about half the remaining nodes in a balanced tree.B4.1-024 Tap to flip back
24 / 49
B4.1.4 Process HL Describe how a new value is inserted into a BST. B4.1-025 Tap to flip B4.1.4 Process HL Describe how a new value is inserted into a BST. If the tree is empty, the new node becomes the root . Otherwise compare the value with the current node, starting at the root. Move to the left subtree if smaller , the right subtree if larger . Repeat (a recursive call on that subtree's root) until an empty (null) position is reached: the base case . Attach the new node there as a leaf . Exam tip Existing nodes never move on insertion, so the insertion order alone decides the tree's shape.B4.1-025 Tap to flip back
25 / 49
B4.1.4 Exam question [3 marks] HL Explain why the insert operation of a BST is naturally written as a recursive method. B4.1-026 Tap to flip B4.1.4 Exam question [3 marks] HL Explain why the insert operation of a BST is naturally written as a recursive method. The method is first given the root and compares the new key with that node's key. The result chooses the left subtree (smaller) or the right subtree (larger). Each subtree is itself a smaller BST , so the method calls itself with that subtree's root, repeating the same steps. When the chosen subtree is empty (null) , the base case is reached and the new node is attached there. Exam tip Full marks need both parts: the method calling itself on a subtree, and the base case (an empty position) that ends the recursion.B4.1-026 Tap to flip back
26 / 49
B4.1.4 Exam question [3 marks] HL Sketch the BST produced by inserting 34, 19, 52, 7, 26, 41, 63, 22, in that order, into an empty tree. B4.1-027 Tap to flip B4.1.4 Exam question [3 marks] HL Sketch the BST produced by inserting 34, 19, 52, 7, 26, 41, 63, 22, in that order, into an empty tree. 34 is the root; 19 is its left child and 52 its right child.7 and 26 are the left and right children of 19.41 and 63 are the left and right children of 52.22 is the left child of 26 (22 < 34, 22 > 19, 22 < 26).Exam tip Trace every new key down from the root, writing each comparison: checking only against the last node placed causes most errors.B4.1-027 Tap to flip back
27 / 49
B4.1.4 Compare HL How does a balanced BST differ from a skewed (unbalanced) BST in shape and in efficiency? B4.1-028 Tap to flip B4.1.4 Compare HL How does a balanced BST differ from a skewed (unbalanced) BST in shape and in efficiency? Balanced : each node's subtrees have similar heights, so the height grows only with log n ; search, insert and delete are O(log n) .Skewed : nodes form a long chain down one side, height close to n ; it behaves like a linked list , so operations degrade to O(n) .Inserting keys that are already sorted , such as a BST's own in-order output, produces a skewed tree. Exam tip Never claim O(log n) for a BST without saying it must be balanced. Re-inserting pre-order output, by contrast, rebuilds the original shape.B4.1-028 Tap to flip back
28 / 49
B4.1.4 Compare HL In what order does each of pre-order, in-order and post-order traversal visit a node and its two subtrees? B4.1-029 Tap to flip B4.1.4 Compare HL In what order does each of pre-order, in-order and post-order traversal visit a node and its two subtrees? Each visits the left subtree before the right; they differ in when the node itself is visited : Pre-order : node, left, right ; the root comes first .In-order : left, node, right ; for a BST this outputs the keys in ascending order .Post-order : left, right, node ; the root comes last .Exam tip Memory hook: pre, in and post say where the node goes: before, between or after its two subtrees.B4.1-029 Tap to flip back
29 / 49
B4.1.4 Exam question [3 marks] HL 30, 15, 41, 8, 22, 47 are inserted in that order into an empty BST. State the pre-order, in-order and post-order traversals. B4.1-030 Tap to flip B4.1.4 Exam question [3 marks] HL 30, 15, 41, 8, 22, 47 are inserted in that order into an empty BST. State the pre-order, in-order and post-order traversals. Tree: root 30; left child 15 (children 8 and 22); right child 41 (right child 47). Pre-order: 30, 15, 8, 22, 41, 47 In-order: 8, 15, 22, 30, 41, 47 Post-order: 8, 22, 15, 47, 41, 30 Exam tip Quick check: in-order must be sorted; pre-order starts with the root; post-order ends with it.B4.1-030 Tap to flip back
30 / 49
B4.1.4 Process HL Describe how a node is deleted from a BST in each of the three possible cases. B4.1-031 Tap to flip B4.1.4 Process HL Describe how a node is deleted from a BST in each of the three possible cases. Leaf (no children): set the parent's pointer that refers to it to null .One child : link its parent directly to that child .Two children : replace its key with its in-order successor (smallest key in the right subtree ) or in-order predecessor (largest key in the left subtree ), then delete that node from its old place, which is case 1 or 2.Exam tip To find the successor: go right once, then left as far as possible. Either replacement keeps the BST ordering.B4.1-031 Tap to flip back
31 / 49
B4.1.4 Apply it HL A BST is built by inserting 60, 35, 80, 20, 45, 70, 90. Describe the tree after deleting the root using its in-order successor. B4.1-032 Tap to flip B4.1.4 Apply it HL A BST is built by inserting 60, 35, 80, 20, 45, 70, 90. Describe the tree after deleting the root using its in-order successor. The successor is the smallest key in the right subtree : go right to 80, then left to 70 . 70 replaces 60 as the root; 70 was a leaf, so its old position is simply removed. Result: root 70 ; left subtree 35 (children 20 and 45) unchanged; right child 80 , which now has only the right child 90 . Exam tip The in-order predecessor (45, the largest key on the left) is also accepted unless a method is specified.B4.1-032 Tap to flip back
32 / 49
B4.1.4 Compare HL Compare a BST with a singly linked list for storing data that is searched often and must stay in order. B4.1-033 Tap to flip B4.1.4 Compare HL Compare a BST with a singly linked list for storing data that is searched often and must stay in order. Search : a balanced BST discards about half the remaining nodes per comparison, O(log n) ; a linked list is searched linearly , O(n) .Order : a BST keeps data sorted automatically , output by in-order traversal ; a list needs each item inserted in position.Memory : a BST node needs two child pointers ; a singly linked node needs one.Weakness : an unbalanced BST degrades to O(n), and its deletion is more complex.Exam tip A linked list may still be preferred when data changes constantly but is rarely searched: its pointer changes are simpler.B4.1-033 Tap to flip back
33 / 49
B4.1.5 Definition HL What are the two defining characteristics of a set? B4.1-034 Tap to flip B4.1.5 Definition HL What are the two defining characteristics of a set? A set is unordered : elements have no index or position , so they cannot be accessed by position. Its elements are unique : no duplicates , so adding a value already present leaves the set unchanged . Exam tip If a task needs repeat counts or a fixed sequence, a set is the wrong choice; saying why can earn a mark.B4.1-034 Tap to flip back
34 / 49
B4.1.5 Definition HL Define the union, intersection and difference of two sets A and B. B4.1-035 Tap to flip B4.1.5 Definition HL Define the union, intersection and difference of two sets A and B. Union : elements in A or B (or both) , each listed once.Intersection : elements in both A and B .Difference A - B : elements in A but not in B .Exam tip Difference is not symmetric: with A = {1, 4, 6} and B = {4, 9}, A - B = {1, 6} but B - A = {9}.B4.1-035 Tap to flip back
35 / 49
B4.1.5 Explain HL How do you test membership, add an element and remove an element with Java's HashSet and Python's set? B4.1-036 Tap to flip B4.1.5 Explain HL How do you test membership, add an element and remove an element with Java's HashSet and Python's set? Membership : Java s.contains(x); Python x in s; both give true or false.Add : s.add(x) in both; adding an element already present changes nothing (Java's add returns false).Remove : s.remove(x) in both; if x is absent, Java just returns false, but Python raises a KeyError (s.discard(x) avoids this).Exam tip In Python an empty set is written set(): {} creates an empty dictionary.B4.1-036 Tap to flip back
36 / 49
B4.1.5 Explain HL How are union, intersection and difference coded in Java and Python, and what trap do Java's methods hide? B4.1-037 Tap to flip B4.1.5 Explain HL How are union, intersection and difference coded in Java and Python, and what trap do Java's methods hide? Python: a | b, a & b and a - b (or union, intersection, difference) return new sets . Java: addAll (union), retainAll (intersection) and removeAll (difference) change the set they are called on . So in Java, copy the set first with new HashSet<>(a); otherwise later operations work on already altered data. CodePython Java union = a | b # or a.union(b)
common = a & b # or a.intersection(b)
only_a = a - b # or a.difference(b)Set<Integer> union = new HashSet<>(a);
union.addAll(b);
Set<Integer> common = new HashSet<>(a);
common.retainAll(b);
Set<Integer> onlyA = new HashSet<>(a);
onlyA.removeAll(b);Exam tip Calling addAll, retainAll and removeAll one after another on the same set gives wrong results.B4.1-037 Tap to flip back
37 / 49
B4.1.5 Explain HL What do subset and superset mean, and how is each checked in Java and Python? B4.1-038 Tap to flip B4.1.5 Explain HL What do subset and superset mean, and how is each checked in Java and Python? A is a subset of B if every element of A is also in B ; B is then a superset of A. Java: b.containsAll(a) is true when A is a subset of B (and B a superset of A). Python: a.issubset(b) or a <= b; b.issuperset(a) or b >= a. Exam tip Java has no superset method by name: A is a superset of B exactly when a.containsAll(b) is true.B4.1-038 Tap to flip back
38 / 49
B4.1.5 Apply it HL A website logs a user ID for every page view, with many repeats. How could a set give the number of unique visitors? B4.1-039 Tap to flip B4.1.5 Apply it HL A website logs a user ID for every page view, with many repeats. How could a set give the number of unique visitors? Add every logged ID to a set ; repeats are ignored automatically because set elements are unique . The set's size (s.size() in Java, len(s) in Python) is the number of distinct visitors . Each add is O(1) on average because sets are hash-based, much faster than checking a growing list for each ID (O(n)). Exam tip If visits per user were also needed, use a map from ID to count: a set cannot record repeats.B4.1-039 Tap to flip back
39 / 49
B4.1.5 Exam question [4 marks] HL Set students holds a whole class; set submitted holds those who handed in homework. Outline how to find non-submitters and check whether everyone submitted. B4.1-040 Tap to flip B4.1.5 Exam question [4 marks] HL Set students holds a whole class; set submitted holds those who handed in homework. Outline how to find non-submitters and check whether everyone submitted. Non-submitters: the difference students - submitted, the students in students but not in submitted . In Java: copy students, then call removeAll(submitted) on the copy. Everyone submitted if students is a subset of submitted: students.issubset(submitted) / submitted.containsAll(students). Equivalently, the difference students - submitted is empty . Exam tip Order matters in a difference: submitted - students answers a different question.B4.1-040 Tap to flip back
40 / 49
B4.1.6 Definition HL What is a hash table? B4.1-041 Tap to flip B4.1.6 Definition HL What is a hash table? A data structure that stores key-value pairs in an array of slots (buckets) . A hash function applied to each key computes the index where its pair is stored, so insertion, look-up and deletion take O(1) time on average . Exam tip Its speed depends on three things: the hash function, the collision resolution strategy and the load factor.B4.1-041 Tap to flip back
41 / 49
B4.1.6 Definition HL What does a hashing function do in a hash table, and what properties should a good one have? B4.1-042 Tap to flip B4.1.6 Definition HL What does a hashing function do in a hash table, and what properties should a good one have? It converts a key into an index in the table. A good hash function is: Deterministic : the same key always gives the same index.Fast to compute.Uniform : spreads keys evenly across the slots, keeping collisions rare.Exam tip A simple example is key mod table size. Do not confuse this with cryptographic hashing, which has different goals.B4.1-042 Tap to flip back
42 / 49
B4.1.6 Definition HL What is a collision in a hash table, and why can collisions not be avoided completely? B4.1-043 Tap to flip B4.1.6 Definition HL What is a collision in a hash table, and why can collisions not be avoided completely? A collision happens when two different keys hash to the same index . There are far more possible keys than slots , so some keys must share an index; a good hash function can only make collisions rare . Exam tip A collision is not an error: the table needs a resolution strategy so that both entries can be stored.B4.1-043 Tap to flip back
43 / 49
B4.1.6 Compare HL Compare separate chaining and open addressing as ways of resolving collisions in a hash table. B4.1-044 Tap to flip B4.1.6 Compare HL Compare separate chaining and open addressing as ways of resolving collisions in a hash table. Chaining : each slot holds a list (bucket) of every entry that hashes there; a collision just adds to that list , searched on look-up.Open addressing : entries are stored in the array itself ; after a collision the table is probed for a free slot, e.g. linear probing tries the next slot, wrapping round.Chaining uses extra memory for its lists but never fills up; an open-addressing table can become full . Exam tip Other probe sequences: quadratic probing, and double hashing, where a second hash function sets the step size.B4.1-044 Tap to flip back
44 / 49
B4.1.6 Definition HL What is the load factor of a hash table, and what happens when it becomes too high? B4.1-045 Tap to flip B4.1.6 Definition HL What is the load factor of a hash table, and what happens when it becomes too high? Load factor = entries stored ÷ number of slots. As it rises, collisions increase and operations slow towards O(n) . Past a threshold (e.g. 0.75), the table is resized and every entry is rehashed into it.Exam tip Entries are rehashed, not copied across, because each index depends on the table size. Example: 6 entries in 8 slots gives 0.75.B4.1-045 Tap to flip back
45 / 49
B4.1.6 Apply it HL A 7-slot hash table uses index = key mod 7 with linear probing. Where do 15, 22 and 8 go, inserted in that order? B4.1-046 Tap to flip B4.1.6 Apply it HL A 7-slot hash table uses index = key mod 7 with linear probing. Where do 15, 22 and 8 go, inserted in that order? 15 : 15 mod 7 = 1; slot 1 is free, so slot 1 .22 : 22 mod 7 = 1, a collision ; probe slot 2, free, so slot 2 .8 : 8 mod 7 = 1, a collision; slot 2 is taken too; probe slot 3, free, so slot 3 .Load factor is now 3/7, about 0.43. Exam tip Linear probing wraps from the last slot back to slot 0. Keys bunching into neighbouring slots (clustering) make later probes longer.B4.1-046 Tap to flip back
46 / 49
B4.1.6 Explain HL How does a HashSet (or Python set) use hashing to store its elements and reject duplicates? B4.1-047 Tap to flip B4.1.6 Explain HL How does a HashSet (or Python set) use hashing to store its elements and reject duplicates? A set is built on a hash table in which each element is itself the key (no value is needed). To add x, x is hashed to find its slot, and that slot (or its chain) is checked for an equal element . If one is found, x is a duplicate and is not stored ; otherwise it is added. So add, remove and membership tests are all O(1) on average . Exam tip This is why set elements must be hashable: in Python a tuple can go in a set, but a list cannot.B4.1-047 Tap to flip back
47 / 49
B4.1.6 Compare HL How do Java's HashMap and HashSet, and Python's dict and set, differ in what they store? B4.1-048 Tap to flip B4.1.6 Compare HL How do Java's HashMap and HashSet, and Python's dict and set, differ in what they store? HashMap (Java) and dict (Python) store key-value pairs : each unique key maps to a value, looked up by key .HashSet (Java) and set (Python) store single unique elements ; you can only ask whether an element is present .All four are hash tables underneath: O(1) average add, look-up and remove, but no sorted order. CodePython Java ages = {}
ages["Ana"] = 17 # add or update a pair
age = ages["Ana"] # 17
seen = set()
seen.add("Ana") # element only
found = "Ana" in seen # TrueHashMap<String, Integer> ages = new HashMap<>();
ages.put("Ana", 17); // add or update a pair
int age = ages.get("Ana"); // 17
HashSet<String> seen = new HashSet<>();
seen.add("Ana"); // element only
boolean found = seen.contains("Ana"); // trueExam tip Putting an existing key into a map again overwrites its old value: keys stay unique, values need not.B4.1-048 Tap to flip back
48 / 49
B4.1.6 Exam question [3 marks] HL A shop's till looks up each product's price from its barcode. Describe how a Java HashMap or Python dict supports this. B4.1-049 Tap to flip B4.1.6 Exam question [3 marks] HL A shop's till looks up each product's price from its barcode. Describe how a Java HashMap or Python dict supports this. It stores key-value pairs : each barcode is the key (unique) and its price is the value . Pairs are added with prices.put(code, price) / prices[code] = price. Passing a barcode to get returns the matching price ; the key is hashed straight to its slot, so look-up is O(1) on average . A barcode not stored gives null (Java) or None (Python get). Exam tip Name the key and the value explicitly: the key is what you search by; the value is what comes back.B4.1-049 Tap to flip back
49 / 49
Tip: click the card, then use the arrow keys to flip and move through the deck.
Why is there no B2 programming deck? B2 (programming fundamentals, data structures, constructs, algorithms and file processing) is tested in Paper 2 by asking you to read, trace and write code. You improve at that by coding, not by memorising answers, so a deck would only give false confidence. Work through the B2 revision guides with your Python or Java editor open instead:
Common mistakes when revising IB CS with flashcards Flipping too early. If you flip before committing to an answer, you only recognise it, and recognising feels like knowing when it is not.
Accepting "roughly right". If you said the PC holds "the instruction" rather than the address of the next instruction, count it as a miss.
Repeating easy cards. Once a card is easy three sessions running, spend that time on the ones you keep missing.
Skipping the exam-style cards. They are closest to real questions. Answer in full sentences, one distinct point per mark.
Sticking to one deck. Mix decks in a session, such as A2.3, A3.2 and B1.1. Switching feels harder, and that effort makes recall last.
Treating cards as the whole plan. Flashcards build recall; past papers build exam technique. Use both.
Quick recap 888 flashcards in 20 decks for the 2025 IB Computer Science guide, first examined in 2027.
Covers A1 to A4, B1, B3 and B4 . B2 is learned by coding, so it has no deck.
374 cards are HL only and carry an HL badge. The other 514 are for SL and HL.
Card types: definitions, compare, explain, process, apply (scenarios) and 119 exam-style questions with marks.
Tap or click to flip, arrows to move, a Python/Java switch on code decks, no sign-up.
Every deck links to the full revision guide for its subtopic.
Looking for an IB Computer Science tutor? Hi, I'm Yuness, the tutor behind Shuttle Learning. I work one to one with IB Computer Science students at SL and HL, and I deliberately take on only a handful each year so every student gets my full attention. Most go on to earn the 6s and 7s they were aiming for, in the final exams and the IA alike. If you would like that kind of support, book a free 15-minute call and tell me what you are stuck on. You can also explore the full IB Computer Science guide library while you are here.
Frequently asked questions Are these flashcards for the new 2027 IB Computer Science syllabus? Yes. Every card is written for the 2025 IB Computer Science guide, which is first examined in 2027, and the decks follow its subtopic codes. Content that was only in the old syllabus is not included.
Do the flashcards cover HL as well as SL? Yes. 374 of the 888 cards are HL only, including whole decks for A1.4, A3.4, A4.2, A4.3, B3.2 and B4.1. Every HL card carries an HL badge, so SL students can skip them and still cover all 514 cards they need.
Are the IB Computer Science flashcards free? Yes, all 888 are free to use on this page. There is no sign-up and nothing is saved, so you can open the page on a phone or laptop and start straight away.
How were the flashcards made? They were built from the 2025 IB Computer Science guide, the Oxford 2025 textbook, and past papers and mark schemes from 2014 to 2025, then checked by independent reviewers. Where sources disagree, the IB guide wins, and all wording is original.
How many flashcards should I do a day? About 20 to 30 new cards a day, plus a quick pass through the ones you missed before, works well for most students. At 30 a day, HL students get through all 888 in about a month, and SL students cover their 514 in under three weeks.
Do the flashcards cover Paper 1 and Paper 2? Yes. The A1 to A4 decks cover theme A, which is examined in Paper 1, and the B1, B3 and B4 decks cover the theory in theme B, which is examined in Paper 2. They do not replace coding practice for B2 or your research on the pre-seen case study in Paper 1.