REVISION WORKSHEETS
AQA GCSE Computer Science 8525 (v1.2) — Complete revision notes, exam-style questions and mark schemes for every specification topic.
Fundamentals of Algorithms
Summary Notes
Computational Thinking
Decomposition is breaking a complex problem into smaller, more manageable sub-problems. Abstraction is removing unnecessary detail to focus on what is important. Algorithmic thinking is creating a step-by-step solution (an algorithm) that can be followed to solve a problem.
Pseudocode (AQA Syntax)
AQA pseudocode uses ← for assignment, e.g. x ← 5. Comparison uses =, ≠, <, >, ≤, ≥. Output uses OUTPUT, input uses USERINPUT. Selection uses IF … THEN … ELSE … ENDIF. Iteration uses FOR … ENDFOR, WHILE … ENDWHILE, and REPEAT … UNTIL.
AQA Pseudocode Examples
x ← USERINPUT
IF x > 10 THEN
OUTPUT 'Big'
ELSE
OUTPUT 'Small'
ENDIF
FOR i ← 1 TO 5
OUTPUT i
ENDFOR
WHILE x ≠ 0
x ← x - 1
ENDWHILE
REPEAT
x ← x + 1
UNTIL x = 10
SUBROUTINE sayHello(name)
OUTPUT 'Hello ' + name
ENDSUBROUTINEFlowcharts
Flowcharts use standard symbols: oval (terminal — start/stop), rectangle (process), parallelogram (input/output), diamond (decision — yes/no), and arrows to show flow. Decisions have exactly two exits (Yes and No).
Searching Algorithms
| Algorithm | How it works | Efficiency | Requirement |
|---|---|---|---|
| Linear search | Checks each item one by one from the start until the item is found or the end is reached | O(n) — slow on large lists | Works on any list (sorted or unsorted) |
| Binary search | Finds the middle item, compares to target, discards the half that cannot contain it, repeats | O(log n) — much faster on large lists | List must be sorted first |
Sorting Algorithms
| Algorithm | How it works | Efficiency |
|---|---|---|
| Bubble sort | Compares adjacent pairs, swaps if in wrong order, repeats passes until no swaps needed | O(n²) — simple but slow on large lists |
| Merge sort | Divides the list in half repeatedly until single items, then merges sublists back in order | O(n log n) — faster but uses more memory |
In the exam, you may be asked to compare searching or sorting algorithms. Always mention time efficiency AND whether any preconditions are needed (e.g. binary search requires sorted data).
Trace Tables
A trace table is used to dry-run an algorithm. Each row represents one iteration or step. Columns represent each variable and the output. You must update values systematically, line by line. Trace tables are commonly tested with loops and conditional statements.
Exam Questions
Define the term 'decomposition' in computational thinking.
2 marksDefine the term 'abstraction' and give an example related to designing a sat-nav system.
3 marksDescribe how a binary search algorithm would find the value 42 in the following sorted list.
4 marks| Index | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|---|
| Value | 7 | 15 | 23 | 42 | 56 | 71 | 89 |
State one advantage and one disadvantage of binary search compared to linear search.
2 marksComplete the trace table for the following pseudocode.
4 marksx ← 1
y ← 0
WHILE x ≤ 4
y ← y + x
x ← x + 1
ENDWHILE
OUTPUT yExplain why merge sort is generally more efficient than bubble sort for large data sets.
3 marksDraw a flowchart that asks a user for a number and outputs whether it is positive, negative or zero.
3 marks