BIT BY BYTE

REVISION WORKSHEETS

AQA GCSE Computer Science 8525 (v1.2) — Complete revision notes, exam-style questions and mark schemes for every specification topic.

8 sections169 marks totalPaper 1 & Paper 2
Section 1Spec ref: 3.1|Paper 1|21 marks

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

pseudocode
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
ENDSUBROUTINE

Flowcharts

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

AlgorithmHow it worksEfficiencyRequirement
Linear searchChecks each item one by one from the start until the item is found or the end is reachedO(n) — slow on large listsWorks on any list (sorted or unsorted)
Binary searchFinds the middle item, compares to target, discards the half that cannot contain it, repeatsO(log n) — much faster on large listsList must be sorted first

Sorting Algorithms

AlgorithmHow it worksEfficiency
Bubble sortCompares adjacent pairs, swaps if in wrong order, repeats passes until no swaps neededO(n²) — simple but slow on large lists
Merge sortDivides the list in half repeatedly until single items, then merges sublists back in orderO(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

21 marks total
1

Define the term 'decomposition' in computational thinking.

2 marks
2

Define the term 'abstraction' and give an example related to designing a sat-nav system.

3 marks
3

Describe how a binary search algorithm would find the value 42 in the following sorted list.

4 marks
Index0123456
Value7152342567189
4

State one advantage and one disadvantage of binary search compared to linear search.

2 marks
5

Complete the trace table for the following pseudocode.

4 marks
x ← 1
y ← 0
WHILE x ≤ 4
    y ← y + x
    x ← x + 1
ENDWHILE
OUTPUT y
6

Explain why merge sort is generally more efficient than bubble sort for large data sets.

3 marks
7

Draw a flowchart that asks a user for a number and outputs whether it is positive, negative or zero.

3 marks