GCSE

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

Gareth Edgell

Head of CS · Senior Examiner · 15+ years tutoring

OCRGCSEJ277Computer Systemsalgorithmsprogrammingrevisionexam tipsCPUnetworksdata representationPython

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?

  1. Higher clock speed (GHz) — more cycles per second
  2. More cores — run multiple instructions in parallel
  3. 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

RAMROM
Volatile?Yes (lost when power off)No (permanent)
Writable?YesNo
StoresRunning programs, open files, OSBIOS, 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:

TypeSpeedCost/GBGood for
HDD (magnetic)SlowCheapBulk storage, backups
SSD (solid state)FastMore expensiveOS drives, laptops
USB / FlashMediumMediumPortable transfer
Optical (CD/DVD/Blu-ray)SlowVery cheapDistribution, 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:

DevicePurpose
RouterRoutes packets between different networks
SwitchSends data to the correct device on a LAN
WAP (Wireless Access Point)Connects wireless devices to a wired network
NICHardware in each device that connects it to the network

TCP/IP model layers:

LayerProtocol examplesWhat it does
ApplicationHTTP, HTTPS, FTP, SMTP, DNSApplication communication
TransportTCP, UDPSegmentation, error checking
InternetIPRouting via IP addresses
LinkEthernet, Wi-FiPhysical bit transmission

IP address = logical, changes with network. MAC address = physical, built into NIC, permanent.

Cybersecurity threats:

ThreatWhat it doesCountermeasure
MalwareDamages or spies on a systemAntivirus, updates
PhishingFake emails/sites steal credentialsUser training, spam filters
Brute forceTries every password combinationLockout, strong passwords
SQL injectionMalicious SQL via input fieldsInput validation, parameterised queries
DDoSFloods server to take it offlineFirewall, 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.

DecimalBinaryHex
101010A
111011B
121100C
131101D
141110E
151111F

Example: 10110100 → 1011 = B, 0100 = 4 → B4

Two’s complement (negative numbers):

  1. Write positive number in binary
  2. Flip all bits
  3. 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

ABNOT AA AND BA OR BA XOR B
001000
011011
100011
110110

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:

  1. Decomposition — breaking a large problem into smaller, manageable sub-problems
  2. Abstraction — removing unnecessary detail; focusing on what is relevant
  3. Algorithmic thinking — creating step-by-step solutions
  4. 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:

  1. Find middle element: mid = (low + high) ÷ 2
  2. If target = middle → found
  3. If target < middle → high = mid − 1 (search left half)
  4. If target > middle → low = mid + 1 (search right half)
  5. 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] ✓
AlgorithmBest caseWorst caseSpaceStable?
Bubble sortO(n)O(n²)O(1)Yes
Merge sortO(n log n)O(n log n)O(n)Yes
Binary searchO(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 wordWhat you must do
StateBrief factual answer — no explanation needed
DescribeWhat something is or how it works
ExplainGive the reason WHY
CompareState both similarities AND differences
EvaluateAdvantages AND disadvantages, then a conclusion
IdentifyName 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.

Gareth Edgell

Want personalised help?

Book a 1-to-1 session with Gareth — your spec, your pace, your gaps fixed.

More GCSE articles