OCR GCSE Computer Science — Complete Revision Guide for Both Papers (J277)
Full revision guide for OCR GCSE Computer Science J277. Covers both Component 01 (Computer Systems) and Component 02 (Computational Thinking, Algorithms and Programming) with worked examples, mark-scheme tips and key exam vocabulary.
Gareth Edgell
Head of CS · Senior Examiner · 15+ years tutoring
OCR GCSE Computer Science (J277) has two written components. This guide covers both papers with the mark-scheme language, worked examples and exam tips that help students score maximum marks.
- Component 01 (Paper 1) — Computer Systems: 1.5 hours, 80 marks, 50% of GCSE
- Component 02 (Paper 2) — Computational Thinking, Algorithms and Programming: 1.5 hours, 80 marks, 50% of GCSE
PAPER 1 — Computer Systems
1. CPU Architecture
The FDE Cycle (Fetch–Decode–Execute)
This is the most commonly examined topic in Paper 1.
Fetch:
- Address in the Program Counter (PC) is sent to the Memory Address Register (MAR)
- Instruction at that address is fetched into the Memory Data Register (MDR)
- PC is incremented (points to next instruction)
- Instruction copied to Current Instruction Register (CIR)
Decode: The Control Unit (CU) decodes the instruction in the CIR
Execute: The ALU carries out the operation; result stored in the Accumulator (ACC)
Exam tip: “Describe the FDE cycle” (3–4 marks): name each register, state what it holds, and remember — the PC increments during Fetch, not Execute.
What makes a CPU faster?
- Higher clock speed (GHz) — more cycles per second
- More cores — run multiple instructions in parallel
- Larger cache — data closer to CPU, fewer slow RAM accesses
Cache memory: sits between CPU and RAM. L1 (fastest, smallest) → L2 → L3 (slowest, largest). A cache hit means data is found in cache; a cache miss means the CPU must wait for RAM.
2. Memory and Storage
| RAM | ROM | |
|---|---|---|
| Volatile? | Yes (lost when power off) | No (permanent) |
| Writable? | Yes | No |
| Stores | Running programs, open files, OS | BIOS, boot instructions |
Virtual memory: When RAM is full, the OS uses hard drive space as extra memory. Much slower than RAM. Excessive use causes thrashing.
Storage types:
| Type | Speed | Cost/GB | Good for |
|---|---|---|---|
| HDD (magnetic) | Slow | Cheap | Bulk storage, backups |
| SSD (solid state) | Fast | More expensive | OS drives, laptops |
| USB / Flash | Medium | Medium | Portable transfer |
| Optical (CD/DVD/Blu-ray) | Slow | Very cheap | Distribution, archiving |
3. Networks
LAN (Local Area Network) — single site, owned by organisation WAN (Wide Area Network) — multiple sites; uses leased telecoms infrastructure
The Internet is the world’s largest WAN, not a LAN.
Network hardware:
| Device | Purpose |
|---|---|
| Router | Routes packets between different networks |
| Switch | Sends data to the correct device on a LAN |
| WAP (Wireless Access Point) | Connects wireless devices to a wired network |
| NIC | Hardware in each device that connects it to the network |
TCP/IP model layers:
| Layer | Protocol examples | What it does |
|---|---|---|
| Application | HTTP, HTTPS, FTP, SMTP, DNS | Application communication |
| Transport | TCP, UDP | Segmentation, error checking |
| Internet | IP | Routing via IP addresses |
| Link | Ethernet, Wi-Fi | Physical bit transmission |
IP address = logical, changes with network. MAC address = physical, built into NIC, permanent.
Cybersecurity threats:
| Threat | What it does | Countermeasure |
|---|---|---|
| Malware | Damages or spies on a system | Antivirus, updates |
| Phishing | Fake emails/sites steal credentials | User training, spam filters |
| Brute force | Tries every password combination | Lockout, strong passwords |
| SQL injection | Malicious SQL via input fields | Input validation, parameterised queries |
| DDoS | Floods server to take it offline | Firewall, CDN |
Encryption = scrambles data so only the intended recipient can read it. Firewall = monitors traffic and blocks suspicious connections.
4. Data Representation
Binary ↔ Denary conversions
Place values: 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1
Example: 10110100 = 128 + 32 + 16 + 4 = 180
Denary → Binary: divide by 2 repeatedly, read remainders bottom to top.
Binary → Hexadecimal: group bits in 4s from right, convert each group.
| Decimal | Binary | Hex |
|---|---|---|
| 10 | 1010 | A |
| 11 | 1011 | B |
| 12 | 1100 | C |
| 13 | 1101 | D |
| 14 | 1110 | E |
| 15 | 1111 | F |
Example: 10110100 → 1011 = B, 0100 = 4 → B4
Two’s complement (negative numbers):
- Write positive number in binary
- Flip all bits
- Add 1
Example: −35 in 8-bit: 00100011 → flip: 11011100 → add 1: 11011101
Range: −128 to +127 (8-bit)
Binary addition — watch for overflow:
- 0+0=0, 0+1=1, 1+1=0 carry 1, 1+1+1=1 carry 1
- Overflow = result requires more bits than available
Characters: ASCII (7-bit, 128 chars, English only) → Unicode (16/32-bit, all languages, emoji)
Images: File size = width × height × colour depth (bits) ÷ 8 (bytes)
- Example: 800×600, 24-bit = 800 × 600 × 24 ÷ 8 = 1,440,000 bytes (1.44 MB)
Sound: File size = sample rate × bit depth × duration × channels ÷ 8
Compression:
- Lossy = permanently removes data (JPEG, MP3) — smaller, quality reduced
- Lossless = no data lost (PNG, ZIP, RLE) — original fully restored
- Run-length encoding (RLE) = replace runs of identical values: AAAABBB → 4A3B
5. Boolean Logic
| A | B | NOT A | A AND B | A OR B | A XOR B |
|---|---|---|---|---|---|
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 | 1 | 0 |
You need to draw and recognise AND, OR, NOT, NAND, NOR and XOR gates.
To write a Boolean expression from a truth table: write one AND term for each row where the output is 1, combining with OR.
PAPER 2 — Computational Thinking, Algorithms and Programming
6. Computational Thinking
Four key concepts:
- Decomposition — breaking a large problem into smaller, manageable sub-problems
- Abstraction — removing unnecessary detail; focusing on what is relevant
- Algorithmic thinking — creating step-by-step solutions
- Pattern recognition — identifying similarities to use the same solution
Example exam question: “Explain how decomposition could be used to design a school timetable system.” Answer: The overall problem could be broken down into: allocating subjects to rooms; scheduling teacher availability; creating student timetables; avoiding clashes — each becoming a smaller, solvable sub-problem.
7. Algorithms
Searching algorithms:
Linear search — O(n): check each item one by one until found or end reached. Works on unsorted data.
Binary search — O(log n): requires sorted data. Repeatedly halve the search space:
- Find middle element: mid = (low + high) ÷ 2
- If target = middle → found
- If target < middle → high = mid − 1 (search left half)
- If target > middle → low = mid + 1 (search right half)
- Repeat until found or low > high
Binary search on 1024 items needs at most 10 comparisons (log₂ 1024 = 10). Linear search needs up to 1024.
Sorting algorithms:
Bubble sort — O(n²): compare adjacent pairs, swap if out of order, repeat.
Pass 1: [5, 2, 8, 1] → compare 5,2 → swap → [2,5,8,1] → compare 5,8 → no swap → compare 8,1 → swap → [2,5,1,8]
Pass 2: [2,5,1,8] → compare 2,5 → no swap → compare 5,1 → swap → [2,1,5,8]
Pass 3: [2,1,5,8] → compare 2,1 → swap → [1,2,5,8] ✓
Merge sort — O(n log n): split list in half repeatedly until single items, then merge back in order.
[5,2,8,1] → [5,2] [8,1] → [5][2] [8][1] → [2,5] [1,8] → [1,2,5,8] ✓
| Algorithm | Best case | Worst case | Space | Stable? |
|---|---|---|---|---|
| Bubble sort | O(n) | O(n²) | O(1) | Yes |
| Merge sort | O(n log n) | O(n log n) | O(n) | Yes |
| Binary search | O(1) | O(log n) | O(1) | — |
8. Pseudocode and Flowcharts
OCR pseudocode — key syntax:
// Variables and output
myVar = 5
print("Hello " + name)
// Input
name = input("Enter name: ")
// Selection
if score >= 50 then
print("Pass")
else if score >= 40 then
print("Borderline")
else
print("Fail")
end if
// Count-controlled loop
for i = 1 to 10
print(i)
next i
// Condition-controlled loop
while count < 5 do
count = count + 1
end while
// Arrays
scores = [72, 65, 89, 91]
print(scores[0]) // 72
// Subroutine / function
function square(n)
return n * n
end function
result = square(6) // 36
Flowchart shapes:
- Oval/stadium — Start / Stop (terminator)
- Rectangle — Process (assignment, output)
- Diamond — Decision (yes/no branch)
- Parallelogram — Input / Output
9. Programming Concepts
These are tested with short Python code snippets or pseudocode. Know all of these:
Data types: integer (int), real/float, Boolean, string, character
String operations:
name = "Alice"
len(name) # 5
name.upper() # "ALICE"
name[0] # "A"
name[1:4] # "lic"
name + " Smith" # "Alice Smith"
List operations:
scores = [5, 3, 8, 1]
scores.append(9) # [5, 3, 8, 1, 9]
scores.remove(3) # [5, 8, 1, 9]
len(scores) # 4
scores[0] # 5
scores[-1] # 9 (last element)
Functions and parameters:
def greet(name):
return "Hello, " + name
message = greet("Byte") # "Hello, Byte"
File handling:
file = open("data.txt", "r")
content = file.read()
file.close()
# Writing
file = open("output.txt", "w")
file.write("Hello\n")
file.close()
Exception handling:
try:
x = int(input("Enter number: "))
print(10 / x)
except ValueError:
print("Not a number!")
except ZeroDivisionError:
print("Can't divide by zero!")
10. Producing Robust Programs
Input validation — check data before processing:
- Type check (is it an integer?)
- Range check (is it between 1 and 100?)
- Presence check (is it not empty?)
- Format check (does it match a pattern like a postcode?)
Authentication — username/password, 2-factor authentication
Testing strategies:
- Normal data — valid input within expected range (e.g., age = 25)
- Boundary data — at the edges of valid range (e.g., age = 0, age = 150)
- Erroneous data — invalid input that should be rejected (e.g., age = “hello”)
Trace tables — track variable values through a program step by step.
11. Computational Logic
Logic gates (same as Paper 1 — see above)
Half adder: adds two 1-bit numbers.
- Sum = A XOR B
- Carry = A AND B
Full adder: adds two bits plus a carry-in.
12. Translators and Programming Languages
Low-level languages:
- Machine code — binary, directly executed by CPU, machine-specific
- Assembly language — uses mnemonics (MOV, ADD, CMP); assembled by an assembler
High-level languages (Python, Java, C#):
- Human-readable, portable, easier to write and debug
- Must be translated to machine code before execution
Translators:
- Compiler — translates entire source code to machine code in one go; resulting executable runs without the compiler; errors reported after translation
- Interpreter — translates and executes line by line; errors reported immediately; no standalone executable produced; slower
- Assembler — translates assembly language to machine code
Exam tip: “Give one advantage of a compiler over an interpreter.” Accept: compiled program runs without the translator; executes faster; source code is hidden (can’t be read by end user).
Key command words — what examiners mean
| Command word | What you must do |
|---|---|
| State | Brief factual answer — no explanation needed |
| Describe | What something is or how it works |
| Explain | Give the reason WHY |
| Compare | State both similarities AND differences |
| Evaluate | Advantages AND disadvantages, then a conclusion |
| Identify | Name or point out — no description needed |
Revision checklist — both papers
Paper 1:
- FDE cycle with correct register names
- Convert binary ↔ denary ↔ hexadecimal
- Two’s complement for negative numbers
- Calculate image and sound file sizes
- LAN vs WAN, name 4 threats and countermeasures
- Lossy vs lossless compression with examples
- Truth tables for AND, OR, NOT, XOR
Paper 2:
- Trace a bubble sort and merge sort
- Binary search algorithm step by step
- Write pseudocode for selection, loops, arrays
- Describe normal, boundary and erroneous test data
- Difference between compiler and interpreter
- Explain decomposition, abstraction, pattern recognition
For past-paper practice with instant AI marking, try the Question Bank or the Mock Exam Generator.