Free A Level Computer Science 9618 Study Guide — Edvia College
← Free ResourcesEDVIA COLLEGEApply Now

A Level Computer Science 9618 — all 20 sections, free.

A complete study guide for Cambridge International AS & A Level Computer Science 9618, covering all 20 syllabus sections and all 44 sub-sections for exams in 2027, 2028 and 2029.

Sitting exams in 2026? Cambridge states there are no significant changes which affect teaching in this version, so this guide covers the earlier cycle too — but confirm your exam year with your school.

Sections 1–12 are AS Level (Papers 1 and 2). Sections 13–20 are A2 (Papers 3 and 4). One thing to internalise on day one: calculators are not allowed in any paper, so every binary, hexadecimal and floating-point conversion has to be done by hand.

CAIE 9618 · exams 2027–202920 sections · 44 sub-sectionsAS: Papers 1 & 2A Level: adds Papers 3 & 4No calculators in any paperFree & shareable
Start here

The papers

PaperLength & marksCoversWeight
Paper 1
Theory Fundamentals
1 h 30 min · 75 marksSections 1–8. Written paper, all questions answered.50% of AS
25% of A Level
Paper 2
Fundamental Problem-solving and Programming Skills
2 h · 75 marksSections 9–12. Answers written in pseudocode.50% of AS
25% of A Level
Paper 3
Advanced Theory
1 h 30 min · 75 marksSections 13–20. Written paper.25% of A Level
Paper 4
Practical
2 h 30 min · 75 marksSections 19–20, except low-level and declarative programming. Done on a computer with no internet. You submit complete program code and evidence of testing, in Java, VB.NET or Python (console mode).25% of A Level

Three routes. AS Level only = Papers 1 and 2. A Level staged over two years = Papers 1 and 2 in year 1, Papers 3 and 4 in year 2. A Level in one series = all four papers.

Calculators must not be used in any paper. That is unusual and it changes how you revise: binary arithmetic, two's complement, hexadecimal conversion, BCD and floating-point normalisation all have to be fluent on paper. Practise them until they are automatic.
AS Level · Paper 1 · 3 sub-sections

1 · Information representation

1.1Data representation

1 byte = 8 bits · 1 KiB = 2¹⁰ B · 1 MiB = 2²⁰ B · 1 GiB = 2³⁰ B · 1 TiB = 2⁴⁰ B

Know denary, binary, hexadecimal and binary coded decimal (BCD), and convert freely between them. Understand why hexadecimal is used — one hex digit is exactly four bits, so it is a compact, human-readable shorthand for binary in MAC addresses, colour codes, memory dumps and error codes.

Two's complement represents signed integers: to negate, invert every bit and add one. An n-bit two's complement number covers −2n−1 to +2n−1 − 1, so 8 bits covers −128 to +127.

Character sets: ASCII uses 7 bits (128 characters), extended ASCII 8 bits; Unicode uses more bits per character so it can represent every writing system, at the cost of larger files.

Worked example — two's complement

Represent −37 in 8-bit two's complement.

  1. +37 in binary: 32 + 4 + 1 = 0010 0101.
  2. Invert every bit: 1101 1010.
  3. Add one: 1101 1011.
  4. Check: 1101 1011 as unsigned is 219, and 219 − 256 = −37 ✓
BCD is not binaryIn BCD each denary digit gets its own 4-bit group, so 59 is 0101 1001 — not 0011 1011. BCD is used where exact decimal values matter (currency, calculator displays) because binary cannot represent many decimal fractions exactly.

1.2Multimedia — graphics and sound

bitmap file size ≈ width × height × colour depth · sound file size ≈ sample rate × resolution × duration × channels

Bitmap images store a colour value per pixel: resolution is the number of pixels, colour depth is the bits per pixel. Enlarging a bitmap causes pixellation. Vector images store a list of drawing objects with properties, so they scale without loss of quality and are usually much smaller — but they are unsuitable for photographs.

Sound is captured by sampling: the sampling rate is samples per second, the sampling resolution is bits per sample. Higher values give a more accurate reproduction and a larger file.

Worked example — file sizes

(a) A bitmap is 800 × 600 pixels with 24-bit colour. (b) A 30-second mono sound clip is sampled at 44 100 Hz with 16-bit resolution.

  1. (a) 800 × 600 = 480 000 pixels × 24 bits = 11 520 000 bits = 1 440 000 bytes ≈ 1.37 MiB.
  2. (b) 44 100 × 16 × 30 = 21 168 000 bits = 2 646 000 bytes ≈ 2.52 MiB.

Always state the unit you have used and whether you divided by 1024 or 1000. Show the working — the marks are on the method, and there is no calculator.

1.3Compression

Lossless compression allows the original file to be reconstructed exactly — run-length encoding, and dictionary methods used in ZIP and PNG. Essential for text, program code and spreadsheets. Lossy compression discards data permanently — JPEG, MP3 — giving far smaller files, acceptable for photographs and music where small losses are imperceptible.

Justify the choice from the use case: "lossy, because the file is a photograph for a website where download speed matters more than perfect reproduction" scores; "lossy because it is smaller" does not.
AS Level · 1 sub-section

2 · Communication

2.1Networks including the internet

LAN covers a small geographic area under one organisation's control; WAN spans large distances using third-party infrastructure. Topologies: bus, star, mesh, hybrid — know an advantage and a disadvantage of each.

Hardware: a switch forwards frames only to the destination port using MAC addresses; a router connects different networks and forwards packets using IP addresses; a NIC gives a device its MAC address; a server provides services to clients.

Client–server centralises data and control, which makes backup and security easier but creates a single point of failure. Peer-to-peer shares resources directly between equal machines, with no central server.

The internet: IP addressing (IPv4 is 32-bit and running out; IPv6 is 128-bit), public versus private IP addresses, static versus dynamic addressing, URL structure, and the DNS which translates domain names into IP addresses. Understand the difference between the internet (the global network infrastructure) and the World Wide Web (a service running on it).

MAC address versus IP addressThe MAC address is fixed in hardware and used within a local network; the IP address is assigned logically and used to route between networks. Questions frequently ask which is used where — switches use MAC, routers use IP.
AS Level · 2 sub-sections

3 · Hardware

3.1Computers and their components

The von Neumann model: a processor, a single memory holding both data and instructions, and buses. Primary storage — RAM (volatile, working memory) and ROM (non-volatile, holds the bootstrap). Secondary storage — HDD (magnetic), SSD (flash, no moving parts, faster, more shock-resistant), optical discs. Off-line storage for backup and archive.

Match input and output devices to applications and justify the match: a barcode scanner at a supermarket checkout, a touch screen on a self-service kiosk, a 3D printer for prototyping.

3.2Logic gates and logic circuits

GateOutput is 1 when…Boolean
NOTthe input is 0Ā
ANDboth inputs are 1A·B
ORat least one input is 1A + B
NANDNOT both inputs are 1(A·B)‾
NORneither input is 1(A + B)‾
XORthe inputs are differentA ⊕ B

Build and interpret logic circuits, produce truth tables from circuits and circuits from problem statements or truth tables.

For a three-input truth table, list the 8 rows in strict binary counting order 000 to 111. Working the rows out in a random order is how candidates lose track and drop the whole question.
AS Level · 3 sub-sections

4 · Processor fundamentals

4.1CPU architecture

Components: ALU, control unit, system clock, immediate access store, and the registers — PC (program counter, address of the next instruction), MAR (memory address register), MDR (memory data register), CIR (current instruction register), ACC (accumulator), IX (index register), SR (status register).

Buses: the address bus is unidirectional and its width sets the maximum addressable memory; the data bus is bidirectional and its width affects the amount of data moved per cycle; the control bus carries signals such as read, write and interrupt.

Fetch–Execute cycle: MAR ← [PC] · PC ← [PC] + 1 · MDR ← [[MAR]] · CIR ← [MDR] · decode · execute

Factors affecting performance: clock speed, number of cores, cache size and level, bus width. Explain each in terms of why it helps — more cache means fewer slow trips to main memory, more cores means genuine parallel execution.

Interrupts: a signal that causes the processor to suspend the current program, save its state on the stack, run the appropriate interrupt service routine, then restore the state and resume. The check for interrupts happens at the end of each fetch–execute cycle.

4.2Assembly language

Assembly is a low-level language with a one-to-one relationship to machine code, translated by an assembler. Learn the addressing modes: immediate (the operand is the value), direct (the operand is an address), indirect (the operand is the address of an address), indexed (the address plus the contents of IX), and relative.

You are given an instruction set in the exam. The skill is tracing a short program with a trace table, showing the contents of the accumulator, the index register and any memory locations after each instruction.

Immediate versus direct is one characterIn most Cambridge instruction sets LDM #20 loads the value 20, while LDD 20 loads the contents of address 20. Misreading the mode makes every subsequent line of the trace wrong.

4.3Bit manipulation

Logical shifts move bits left or right, filling with zeros — a left shift multiplies by 2, a right shift divides by 2 (integer division). An arithmetic right shift preserves the sign bit. A cyclic shift moves the bit that falls off one end round to the other.

Bit masking uses AND to test or clear bits, OR to set bits, and XOR to toggle them — for example, AND with 0000 1111 keeps only the lower nibble.

Worked example

The byte 0011 0110 (54) is shifted logically left by 2 places.

  1. Result: 1101 1000 = 216.
  2. 54 × 4 = 216 ✓ — the shift multiplied by 2² as expected.
  3. Shift left once more and the leading 1 is lost: 1011 0000 = 176, not 432. Overflow.
AS Level · 2 sub-sections

5 · System software

5.1Operating systems

The OS manages memory, files, security, input/output, processes and the user interface, and provides a virtual machine — hiding hardware complexity so that applications and users need not deal with it directly.

Utility software: disk defragmenter, backup, file compression, anti-virus, formatting. The bootstrap in ROM loads the OS from secondary storage into RAM at start-up.

5.2Language translators

CompilerInterpreterAssembler
Translateswhole program at onceline by line, each time it runsassembly to machine code, one to one
Outputexecutable filenone savedobject code
Errorsfull list after compilationstops at the first error foundreports invalid mnemonics
Speed of executionfastslowerfast
Best fordistributing finished softwaredevelopment and debugginglow-level work

Integrated development environments support writing, editing and debugging: syntax highlighting, auto-completion, prettyprinting, breakpoints, single-stepping, variable watch windows and a report window.

AS Level · 2 sub-sections

6 · Security, privacy and data integrity

6.1Data security

Threats: malware (virus, worm, trojan, spyware, ransomware), hacking, phishing, pharming, and accidental damage. Protection: firewalls, authentication (passwords, biometrics, two-factor), access rights, anti-malware, encryption, physical security, backups and a disaster recovery plan.

Security, privacy and integrity are three different thingsSecurity is protecting data from unauthorised access or loss. Privacy is controlling who may see data about a person. Integrity is data being accurate and consistent. Encryption protects security and privacy — it does nothing for integrity.

6.2Data integrity

Validation checks that data is reasonable and is done by the computer at input: range check, format check, length check, presence check, type check, existence check, limit check and check digit. Verification checks that data has been copied or entered accurately: double entry, visual check, and — for transfer — parity checks, checksums and Automatic Repeat reQuest (ARQ).

Worked example — parity

A byte 0110100? is sent with even parity. What is the parity bit, and what does the receiver do?

  1. The seven data bits 0110100 contain three ones.
  2. Even parity means the total number of ones must be even, so the parity bit is 1, giving 01101001.
  3. The receiver counts the ones; an odd count means an error occurred in transmission.
  4. Limitation: a parity check cannot detect two bit-flips, because the parity is unchanged — which is why parity blocks and checksums are also used.
AS Level · 1 sub-section

7 · Ethics and ownership

7.1Ethics and ownership

Professional ethics: the responsibilities of a computing professional — competence, honesty about capability, respect for privacy and confidentiality, avoiding harm, and acting in the public interest. Know the roles of professional bodies such as the BCS, IEEE and ACM.

Copyright and licensing: software is protected by copyright. Free software may be studied, changed and redistributed freely; open source makes the source code available under specified conditions; shareware is distributed free for a trial period; commercial software requires a paid licence. Compare their implications for the user and the developer.

Ethics questions want a balanced argument with a conclusion. Give the benefit, give the risk, then decide — and refer to a named stakeholder (the user, the developer, the employer, the public).
AS Level · 3 sub-sections · last Paper 1 section

8 · Databases

8.1Database concepts

Limitations of a file-based approach: data duplication, data inconsistency, data dependence on the programs, and difficulty of controlling access. A relational database solves these through a single controlled store.

Key terms: entity, table, record, field, primary key (uniquely identifies a record), candidate key, composite key (two or more fields together), secondary key (an index for fast searching), foreign key (a field that links to a primary key in another table), and referential integrity (a foreign key must match an existing primary key or be null).

Relationships are one-to-one, one-to-many or many-to-many; a many-to-many relationship is resolved with a link table. Normalisation to 3NF: 1NF removes repeating groups, 2NF removes partial dependencies on part of a composite key, 3NF removes transitive (non-key) dependencies.

Normalisation questions want the reason, not just the tablesSay which dependency you are removing at each step. "Split into two tables" earns little; "Course Tutor depends on Course ID, not on the whole key, so it is a partial dependency and must go into its own table for 2NF" earns full marks.

8.2Database management systems

A DBMS provides a data dictionary (metadata about the database), developer interface, query processor, and tools for creating forms, reports and queries. It enforces access rights and maintains integrity, so different applications share one consistent set of data.

8.3DDL and DML

DDL defines the structure: CREATE DATABASE, CREATE TABLE, ALTER TABLE, and the constraints PRIMARY KEY, FOREIGN KEY. DML manipulates the data: SELECT, FROM, WHERE, ORDER BY, GROUP BY, INNER JOIN, SUM, COUNT, AVG, INSERT INTO, UPDATE, DELETE.

Worked example — SQL with a join

List the surname of every student and the name of their course, for students in year 13, sorted by surname.

SELECT Student.Surname, Course.CourseName
FROM Student INNER JOIN Course ON Student.CourseID = Course.CourseID
WHERE Student.Year = 13
ORDER BY Student.Surname;

Qualify every field name with its table when two tables are involved, put the join condition in ON, and end with a semicolon. Each of those is separately marked.

AS Level · Paper 2 · 2 sub-sections

9 · Algorithm design and problem-solving

Sections 9–12 are examined in Paper 2, and every answer is written in pseudocode. See the pseudocode reference at the end of this guide.

9.1Computational thinking skills

Abstraction — keeping only the details relevant to the problem. Decomposition — breaking a problem into smaller sub-problems. Pattern recognition — spotting similarities that let one solution serve several cases. These are examined by asking you to apply them to an unfamiliar scenario, not to define them.

9.2Algorithms

Write and interpret algorithms as structured English, flowcharts and pseudocode, using input–process–output and the three basic constructs: sequence, selection and iteration.

Standard algorithms to know cold: linear search, binary search, bubble sort, insertion sort, and the routines for finding a total, a maximum, a minimum, a mean and a count.

Worked example — binary search in pseudocode
FUNCTION BinarySearch(List : ARRAY[1:100] OF INTEGER, Target : INTEGER) RETURNS INTEGER
  DECLARE Low, High, Mid : INTEGER
  Low ← 1
  High ← 100
  WHILE Low <= High DO
    Mid ← (Low + High) DIV 2
    IF List[Mid] = Target THEN
      RETURN Mid
    ELSE
      IF List[Mid] < Target THEN
        Low ← Mid + 1
      ELSE
        High ← Mid - 1
      ENDIF
    ENDIF
  ENDWHILE
  RETURN -1  // not found
ENDFUNCTION

Binary search requires a sorted list — state that whenever you propose it. It takes at most ⌈log₂ n⌉ comparisons, so 1000 items need at most 10, against 1000 for a linear search.

Every algorithm question is worth tracing. Draw a trace table with one column per variable and one row per iteration; the marks are for the intermediate values, not only the final answer.
AS Level · 4 sub-sections

10 · Data types and structures

10.1Data types and records

The pseudocode data types are INTEGER, REAL, CHAR, STRING, BOOLEAN and DATE. A record holds several related items of different types under one name.

TYPE Student
  DECLARE Name : STRING
  DECLARE Age : INTEGER
  DECLARE Grade : CHAR
ENDTYPE

DECLARE Learner : Student
Learner.Name ← "Ayesha"

10.2Arrays

An array holds many items of the same type under one identifier, accessed by index. Cambridge pseudocode declares the bounds explicitly.

DECLARE Marks : ARRAY[1:30] OF INTEGER  // 1D
DECLARE Grid : ARRAY[1:5, 1:8] OF CHAR  // 2D — [row, column]

Process arrays with FOR loops; use nested FOR loops for two dimensions. You must be able to write a bubble sort and both search algorithms over an array.

Worked example — bubble sort with an early exit
DECLARE Swapped : BOOLEAN
DECLARE N, I : INTEGER
N ← 30
REPEAT
  Swapped ← FALSE
  FOR I ← 1 TO N - 1
    IF Marks[I] > Marks[I + 1] THEN
      Temp ← Marks[I]
      Marks[I] ← Marks[I + 1]
      Marks[I + 1] ← Temp
      Swapped ← TRUE
    ENDIF
  NEXT I
  N ← N - 1
UNTIL Swapped = FALSE

The Swapped flag stops the sort as soon as a full pass makes no swaps — worth explaining in any "how could this be made more efficient" question.

Off-by-one in the inner loopThe comparison uses Marks[I + 1], so the loop must stop at N - 1. Running to N reads past the end of the array — one of the most common errors in Paper 2.

10.3Files

Handle text files in pseudocode: open for READ, WRITE or APPEND, read or write a line, test for end of file, then close.

OPENFILE "Data.txt" FOR READ
WHILE NOT EOF("Data.txt") DO
  READFILE "Data.txt", LineOfText
  OUTPUT LineOfText
ENDWHILE
CLOSEFILE "Data.txt"
WRITE erases; APPEND addsOpening an existing file FOR WRITE deletes its contents. If a question says "add the new record to the file", the mode is APPEND.

10.4Introduction to abstract data types

ADTRuleOperations
stackLIFO — last in, first outpush, pop; a top pointer
queueFIFO — first in, first outenqueue, dequeue; head and tail pointers
linked listeach node holds data and a pointer to the nextinsert, delete, traverse; a start pointer and a free list

Understand what each is used for — a stack for storing return addresses and for undo functions, a queue for print spooling and buffers, a linked list where frequent insertion and deletion are needed without shifting data. At AS you use them and describe them with diagrams; writing the pseudocode implementation is A2 material.

AS Level · 3 sub-sections

11 · Programming

11.1Programming basics

Declaration and use of variables and constants, assignment, arithmetic operators (+ - * / DIV MOD ^), relational operators, logical operators (AND OR NOT), and the built-in functions for strings (LENGTH, LEFT, RIGHT, MID, LCASE, UCASE), numbers (INT, RAND) and type conversion (NUM_TO_STR, STR_TO_NUM).

11.2Constructs

Selection: IF … THEN … ELSE … ENDIF and CASE OF … OTHERWISE … ENDCASE. Iteration: FOR … NEXT (count-controlled), WHILE … ENDWHILE (pre-condition, may run zero times), REPEAT … UNTIL (post-condition, always runs at least once).

Choose the loop deliberately and be ready to justify it. "Use REPEAT…UNTIL because the user must enter a password at least once before it can be checked" is exactly the reasoning examiners reward.

11.3Structured programming

Procedures perform a task; functions return a value and can be used inside an expression. Parameters may be passed by value (a copy — changes do not affect the caller) or by reference (the actual variable — changes do affect the caller).

Scope: a local variable exists only inside its subroutine; a global variable is accessible everywhere. Prefer local variables and parameters — they prevent accidental side effects and make modules independently testable.

Benefits of a modular approach: the problem is decomposed into manageable parts, modules can be written and tested independently and by different people, code can be reused, and maintenance is easier.

AS Level · 3 sub-sections · last Paper 2 section

12 · Software development

12.1Program development life cycle

Analysis → design → coding → testing → maintenance. Compare the waterfall model (sequential, well documented, hard to revisit an earlier stage), iterative development (repeated cycles of refinement) and rapid application development (prototypes and user feedback, fast but with lighter documentation).

12.2Program design

Design tools: structure charts (showing the hierarchy of modules and the parameters passed between them), state-transition diagrams, flowcharts and pseudocode. Be able to read one and produce another from it.

12.3Program testing and maintenance

Types of error: syntax (breaks the rules of the language — caught by the translator), logic (runs but gives the wrong result), run-time (crashes during execution, such as division by zero).

Test data: normal (typical, should be accepted), abnormal/erroneous (should be rejected), extreme (at the limits of the valid range) and boundary (the pair of values either side of a limit — one accepted and one rejected).

Testing strategies: white-box (testing every path through the code), black-box (comparing outputs with expected outputs for given inputs), stub testing, integration testing, alpha, beta and acceptance testing. Maintenance is corrective (fixing faults), adaptive (responding to a changed environment) and perfective (improving performance or usability).

Worked example — test data for a valid range

A mark must be between 0 and 100 inclusive. Give test data of each type.

  1. Normal: 57 — accepted.
  2. Extreme: 0 and 100 — both accepted.
  3. Abnormal: "seven" or −5 — rejected.
  4. Boundary: the pairs (−1, 0) and (100, 101) — one rejected and one accepted in each pair.

Boundary data always comes in pairs straddling a limit. Giving only one value of the pair is the standard half-answer.

A Level · Paper 3 · 3 sub-sections

13 · Data representation (A2)

Sections 13–20 are the A2 content. Paper 3 examines all of it; Paper 4 examines sections 19–20 practically, on a computer.

13.1User-defined data types

Non-composite user-defined types: enumerated (a named list of possible values) and pointer (holding a memory address). Composite: record, set and class. Justify the use of a user-defined type — it makes the program self-documenting, restricts values to those that are valid, and groups related data.

TYPE TDay = (Monday, Tuesday, Wednesday, Thursday, Friday)  // enumerated
TYPE TPointer = ^INTEGER  // pointer to an integer

13.2File organisation and access

OrganisationAccessGood for
serialsequential onlytransaction logs — records appended in order of arrival
sequentialsequential onlybatch processing — records ordered by key
random (direct)direct, via a hashing algorithmfast retrieval of a single record

A hashing algorithm converts a key into a storage address. A collision occurs when two keys hash to the same address; handle it with overflow areas or by linear probing to the next free slot.

Serial and sequential are not the sameSerial means records are in the order they arrived; sequential means they are in order of a key field. Both are read from the start, but only sequential supports efficient merging and batch updating.

13.3Floating-point numbers

value = mantissa × 2exponent · both parts stored in two's complement

A normalised positive mantissa begins 0.1; a normalised negative mantissa begins 1.0. Normalisation gives the maximum precision for the available bits and makes each value's representation unique.

The trade-off: for a fixed total number of bits, more mantissa bits give greater precision but fewer exponent bits give a smaller range. Be ready to argue that trade-off both ways.

Worked example — converting to a normalised floating-point number

Represent +6.5 with an 8-bit mantissa and a 4-bit exponent, both two's complement.

  1. 6.5 in binary is 110.1
  2. Move the point three places left: 0.1101 × 2³.
  3. Mantissa (8 bits): 0110 1000 — starts 0.1, so it is normalised.
  4. Exponent 3 in 4-bit two's complement: 0011.
  5. Answer: 0110 1000 0011.
Worked example — converting back, with a negative mantissa

Find the denary value of mantissa 1011 0000 with exponent 0010.

  1. Exponent 0010 = +2.
  2. The mantissa starts with 1, so it is negative. Its value is −1 + 0.011 in binary = −1 + 0.375 = −0.625.
  3. Value = −0.625 × 2² = −2.5.

For a two's complement mantissa the leading bit has weight −1, then 0.5, 0.25, 0.125 and so on. Getting that first weight wrong is the single biggest source of errors in this topic.

A Level · 2 sub-sections

14 · Communication and internet

14.1Protocols

A protocol is an agreed set of rules for communication. Protocols are arranged in a stack of layers, each providing a service to the layer above, so that a change in one layer does not force changes in the others.

LayerRoleProtocols
applicationservices for the user's programHTTP, HTTPS, FTP, SMTP, POP3, IMAP, DNS, BitTorrent
transportend-to-end delivery, segmentation, reassemblyTCP, UDP
internetaddressing and routing between networksIP
linktransmission across the physical mediumEthernet, Wi-Fi

BitTorrent is the standard peer-to-peer example: a tracker coordinates peers, a swarm shares pieces of the file, and seeds hold complete copies. It spreads bandwidth cost across the peers instead of loading one server.

14.2Circuit switching and packet switching

Circuit switchingPacket switching
Patha dedicated circuit for the whole callpackets routed independently
Orderdata arrives in orderpackets may arrive out of order and are reassembled
Efficiencythe circuit is wasted when idlebandwidth is shared
Reliabilitythe whole call fails if the circuit breakspackets are rerouted around failures
Suitsreal-time voicedata, and most internet traffic

A packet has a header (source and destination addresses, packet number, protocol), a payload, and a trailer (error-check bits and an end marker).

A Level · 2 sub-sections

15 · Hardware and virtual machines

15.1Processors, parallel processing and virtual machines

RISC versus CISC: RISC has few, simple, fixed-length instructions executing in about one cycle, more registers, and relies on the compiler; it pipelines well and uses less power. CISC has many complex variable-length instructions, needing fewer instructions per program but more cycles each.

Pipelining overlaps the stages of the fetch–execute cycle for successive instructions, so throughput rises without the clock speed changing.

Flynn's taxonomy: SISD, SIMD, MISD, MIMD. SIMD suits applying the same operation to a large data set (graphics, arrays); MIMD is the multi-core model. Massively parallel computers link many processors for problems such as climate modelling.

A virtual machine is software emulating a computer. Uses: running an operating system inside another, running legacy software, testing safely in isolation, and consolidating servers. Limitations: slower than native execution, and it needs substantial host resources.

15.2Boolean algebra and logic circuits

De Morgan: (A·B)‾ = Ā + B̄ · (A + B)‾ = Ā·B̄
LawStatement
identityA·1 = A · A + 0 = A
nullA·0 = 0 · A + 1 = 1
idempotentA·A = A · A + A = A
complementA·Ā = 0 · A + Ā = 1
absorptionA + A·B = A · A·(A + B) = A
distributiveA·(B + C) = A·B + A·C

Simplify Boolean expressions algebraically and with Karnaugh maps: group adjacent 1s in blocks of 1, 2, 4 or 8, in Gray-code order, wrapping around the edges, using the largest groups possible and as few as possible.

Flip-flops: the SR flip-flop stores one bit and has an invalid state when both inputs are 1; the JK flip-flop fixes this by toggling instead, and is clocked. Flip-flops are the basis of registers and of static RAM.

Worked example — simplifying with De Morgan

Simplify (Ā + B̄)‾ + A·B.

  1. De Morgan on the first term: (Ā + B̄)‾ = A·B.
  2. So the expression is A·B + A·B.
  3. By the idempotent law: A·B — a single AND gate replaces the whole circuit.
A Level · 2 sub-sections

16 · System software (A2)

16.1Purposes of an operating system

Memory management: paging (fixed-size pages), segmentation (variable-size logical segments), and virtual memory — using disk as an extension of RAM, swapping pages in and out. Disk thrashing occurs when the system spends more time swapping pages than executing, and it is a favourite exam question.

Process management: a process moves between ready, running and blocked states. The scheduler chooses which ready process runs next, using round robin, first come first served, shortest job first or shortest remaining time. Interrupts and interrupt priorities let the OS respond to events; the low-level scheduler performs the context switch.

Blocked is not the same as readyA blocked process is waiting for an input/output event and cannot be chosen by the scheduler. A ready process is waiting only for the processor. Transitions between the two are the substance of most state-diagram questions.

16.2Translation software

Stages of compilation: lexical analysis (removing comments and whitespace, producing tokens and building the symbol table), syntax analysis (parsing against the grammar, reporting syntax errors), code generation (producing object code) and optimisation (making it smaller or faster).

Backus-Naur Form (BNF) and syntax diagrams define a language's grammar formally. You should be able to read a BNF definition and decide whether a given string is valid, and to write simple BNF rules.

Worked example — reading BNF
<digit> ::= 0|1|2|3|4|5|6|7|8|9
<letter> ::= a|b|c| … |z
<identifier> ::= <letter> | <identifier><letter> | <identifier><digit>
  1. abc7 is valid — it starts with a letter and continues with letters and digits.
  2. 7abc is invalid — an identifier must begin with a letter, and there is no rule producing a leading digit.
  3. The rule is recursive: <identifier> appears in its own definition, which is what allows any length.
A Level · 1 sub-section

17 · Security (A2)

17.1Encryption, encryption protocols and digital certificates

Symmetric encryption uses one shared key for both encryption and decryption: fast, but the key must somehow be exchanged securely. Asymmetric encryption uses a public key to encrypt and a mathematically related private key to decrypt: it solves key distribution but is much slower. In practice, asymmetric encryption is used to exchange a symmetric session key, and the bulk of the data is then encrypted symmetrically.

Digital signatures: the sender hashes the message to produce a digest and encrypts the digest with their private key. The recipient decrypts it with the sender's public key and compares it with their own hash of the message. Matching digests prove both authenticity (only the sender's private key could have made it) and integrity (the message has not been altered).

Digital certificates are issued by a Certificate Authority and bind a public key to an identity, preventing an attacker from substituting their own public key. SSL/TLS uses certificates and an asymmetric handshake to set up an encrypted session — this is what HTTPS is.

Note the reversal that trips people up: for confidentiality you encrypt with the recipient's public key. For a digital signature you encrypt with your own private key. Say which key and whose, every time.
A Level · 1 sub-section

18 · Artificial intelligence

18.1Artificial intelligence

Graph representation: AI search problems are modelled as graphs of nodes and weighted edges, stored as an adjacency matrix (fast lookup, wasteful for sparse graphs) or an adjacency list (compact for sparse graphs).

A* algorithm finds the lowest-cost path using f(n) = g(n) + h(n), where g is the cost so far and h is a heuristic estimate of the cost remaining. Dijkstra's algorithm is the special case where h = 0 — it explores in all directions, so A* is usually faster when a good heuristic exists.

Machine learning: supervised learning trains on labelled data (classification and regression); unsupervised learning finds structure in unlabelled data (clustering); reinforcement learning learns from rewards and penalties. Deep learning uses artificial neural networks with many hidden layers.

Artificial neural networks: input, hidden and output layers of nodes with weighted connections; training adjusts the weights, typically by back propagation of the error. Applications include image recognition, speech recognition, medical diagnosis and autonomous vehicles.

A* is not "faster because it is better"It is faster because the heuristic guides the search towards the goal instead of expanding uniformly in every direction. If the heuristic overestimates the remaining cost, A* is no longer guaranteed to find the optimal path — worth a mark when a question asks about the heuristic's properties.
A Level · Papers 3 & 4 · 2 sub-sections

19 · Computational thinking and problem-solving

19.1Algorithms (A2)

Now you must write the pseudocode implementations of the abstract data types, not just describe them: push and pop on a stack, enqueue and dequeue on a queue, and insert, delete and traverse on a linked list — using an array of nodes with a free list.

Binary trees: insert a value, and traverse in pre-order (node, left, right), in-order (left, node, right — which outputs a binary search tree in sorted order) and post-order (left, right, node).

Comparing algorithms: understand time and space efficiency in broad terms — linear search is O(n), binary search O(log n), bubble and insertion sort O(n²) — and be able to justify choosing one over another for a given data set.

Worked example — push onto a stack
PROCEDURE Push(BYVALUE Item : INTEGER)
  IF TopPointer = MaxSize THEN
    OUTPUT "Stack overflow"
  ELSE
    TopPointer ← TopPointer + 1
    Stack[TopPointer] ← Item
  ENDIF
ENDPROCEDURE

The overflow (and, for pop, underflow) check is always worth a mark. Never write the bare two lines.

Worked example — in-order traversal

A binary search tree is built by inserting 50, 30, 70, 20, 40, 60, 80 in that order. Give the in-order traversal.

  1. 50 is the root; 30 goes left, 70 right; 20 and 40 under 30; 60 and 80 under 70.
  2. In-order = left, node, right → 20, 30, 40, 50, 60, 70, 80.
  3. Pre-order = 50, 30, 20, 40, 70, 60, 80. Post-order = 20, 40, 30, 60, 80, 70, 50.

In-order on a binary search tree always produces sorted output — a reliable check that your traversal is right.

19.2Recursion

A recursive routine calls itself. Every recursive definition needs a base case that stops the recursion and a general case that moves towards it. Recursion is implemented using a stack: each call pushes its parameters, local variables and return address, and they are popped as the calls unwind. Too deep a recursion causes stack overflow.

Worked example — factorial, traced
FUNCTION Factorial(N : INTEGER) RETURNS INTEGER
  IF N <= 1 THEN
    RETURN 1  // base case
  ELSE
    RETURN N * Factorial(N - 1)  // general case
  ENDIF
ENDFUNCTION
  1. Factorial(4) calls Factorial(3), which calls Factorial(2), which calls Factorial(1).
  2. Factorial(1) hits the base case and returns 1.
  3. Unwinding: 2 × 1 = 2 → 3 × 2 = 6 → 4 × 6 = 24.
  4. The stack held four sets of values at maximum depth.
Recursion is elegant, not efficientCompared with an iterative version it uses more memory (a stack frame per call) and is slower (call overhead), and it risks stack overflow. When asked to compare, give both the readability advantage and those three costs.
A Level · Papers 3 & 4 · 2 sub-sections · last section

20 · Further programming

20.1Programming paradigms

ParadigmIdeaExample languages
low-levelinstructions matching the processor's own operationsassembly
imperative / procedurala sequence of commands changing stateC, Pascal, Python
object-orientedobjects combining data and the methods that act on itJava, C#, Python
declarativestate facts and rules; the system infers the answerProlog

Object-oriented programming. A class is a template defining properties (attributes) and methods; an object is an instance of a class, created by a constructor. The three principles:

  1. Encapsulation — properties are PRIVATE and accessed only through PUBLIC get and set methods, so an object controls its own data and cannot be put into an invalid state.
  2. Inheritance — a subclass inherits the properties and methods of its superclass and can add its own, so common code is written once.
  3. Polymorphism — a subclass overrides an inherited method, so the same call produces the behaviour appropriate to the actual object.
CLASS Animal
  PRIVATE Name : STRING
  PUBLIC PROCEDURE NEW(GivenName : STRING)
    Name ← GivenName
  ENDPROCEDURE
  PUBLIC FUNCTION GetName() RETURNS STRING
    RETURN Name
  ENDFUNCTION
  PUBLIC PROCEDURE Speak()
    OUTPUT "..."
  ENDPROCEDURE
ENDCLASS

CLASS Dog INHERITS Animal
  PUBLIC PROCEDURE Speak()  // overrides — polymorphism
    OUTPUT "Woof"
  ENDPROCEDURE
ENDCLASS

Declarative programming in Prolog: facts such as parent(ali, sara)., rules such as grandparent(X,Z) :- parent(X,Y), parent(Y,Z)., and queries such as ?- grandparent(ali, Who). You state what is true, not how to compute it. Declarative programming is not examined in Paper 4 — only in Paper 3.

"State one advantage of encapsulation" wants a consequence, not a restatement: "the internal representation can be changed without altering any code that uses the class", or "invalid values can be rejected by the set method".

20.2File processing and exception handling

Random file access in pseudocode: OPENFILE … FOR RANDOM, SEEK to a record position, then GETRECORD or PUTRECORD. Serial and sequential files use READFILE and WRITEFILE as at AS.

OPENFILE "Members.dat" FOR RANDOM
SEEK "Members.dat", RecordPosition
GETRECORD "Members.dat", ThisMember
CLOSEFILE "Members.dat"

Exception handling deals with run-time errors without crashing the program — a missing file, a division by zero, a non-numeric input. The structure is try / catch (or except) / finally.

TRY
  Answer ← Numerator / Denominator
EXCEPT
  OUTPUT "Cannot divide by zero"
ENDTRY
Exception handling is not validationValidation prevents bad data being accepted; exception handling copes with an error that has already occurred at run time. A good program does both — validate the input, and catch the exception in case something unexpected still happens.
Reference · essential for Paper 2

Pseudocode reference

Paper 2 is answered entirely in pseudocode, and Cambridge marks to its own published conventions. This page is the version you should write in.

PSConventions, declarations and constructs

Conventions: keywords in CAPITALS, identifiers in MixedCase, assignment with , comments after //, and consistent indentation for every block.

Declarations
DECLARE Counter : INTEGER
CONSTANT Pi = 3.14159
DECLARE Marks : ARRAY[1:30] OF INTEGER
DECLARE Grid : ARRAY[1:5, 1:8] OF CHAR
TYPE Student
  DECLARE Name : STRING
  DECLARE Age : INTEGER
ENDTYPE
Input, output and selection
INPUT Name
OUTPUT "Hello ", Name

IF Score >= 50 THEN
  OUTPUT "Pass"
ELSE
  OUTPUT "Fail"
ENDIF

CASE OF Grade
  "A" : OUTPUT "Excellent"
  "B" : OUTPUT "Good"
  OTHERWISE : OUTPUT "See teacher"
ENDCASE
Iteration
FOR Index ← 1 TO 10
  OUTPUT Index
NEXT Index

WHILE Total < 100 DO
  Total ← Total + 5
ENDWHILE

REPEAT
  INPUT Password
UNTIL Password = "open"
Subroutines
PROCEDURE ShowTotal(BYVALUE Amount : INTEGER)
  OUTPUT "Total is ", Amount
ENDPROCEDURE
CALL ShowTotal(50)

FUNCTION Square(N : INTEGER) RETURNS INTEGER
  RETURN N * N
ENDFUNCTION
Result ← Square(7)
File handling
OPENFILE "Data.txt" FOR READ  // or WRITE, APPEND, RANDOM
READFILE "Data.txt", LineOfText
WRITEFILE "Data.txt", LineOfText
IF EOF("Data.txt") THEN … ENDIF
CLOSEFILE "Data.txt"
Operators and built-in functions
arithmetic: + - * / DIV MOD ^
relational: = <> < <= > >=
logical: AND OR NOT
strings: LENGTH(S) · LEFT(S, n) · RIGHT(S, n) · MID(S, start, n) · LCASE(c) · UCASE(c)
numeric: INT(x) · RAND(n)
conversion: NUM_TO_STR(x) · STR_TO_NUM(s)
Two habits that cost marks in almost every Paper 2: forgetting the closing keyword (ENDIF, NEXT, ENDWHILE, ENDPROCEDURE), and declaring variables without a type. Both are free marks once the habit is fixed.
Reference · no calculator allowed

Number bases and conversions

NBThe conversions you must be able to do on paper

Place values to memorise: 128 · 64 · 32 · 16 · 8 · 4 · 2 · 1 for a byte, and 4096 · 256 · 16 · 1 for four hexadecimal digits.

DenaryBinaryHexBCD
0000000000
5010150101
9100191001
101010A0001 0000
121100C0001 0010
151111F0001 0101
160001 0000100001 0110
2551111 1111FF0010 0101 0101
Denary → binary (repeated subtraction)

Convert 201.

  1. 128 fits → 1, remainder 73. 64 fits → 1, remainder 9. 32 → 0. 16 → 0.
  2. 8 fits → 1, remainder 1. 4 → 0. 2 → 0. 1 fits → 1.
  3. 1100 1001. Check: 128 + 64 + 8 + 1 = 201 ✓
Binary ↔ hexadecimal (group in fours)

Convert 1100 1001 to hex, and 2F to binary and denary.

  1. 1100 = 12 = C · 1001 = 9 → C9.
  2. 2 = 0010, F = 1111 → 0010 1111.
  3. Denary: 2 × 16 + 15 = 47.
Binary addition and overflow

Add 0110 1101 and 0101 0011 in 8 bits.

  1. 109 + 83 = 192.
  2. Binary result: 1100 0000 = 192 ✓ — fits in 8 bits as an unsigned value.
  3. But interpreted as signed two's complement, 1100 0000 is −64: two positive numbers have produced a negative result, which is an overflow.

Overflow in two's complement is detected exactly this way: adding two positives gives a negative, or adding two negatives gives a positive.

Always state which representation you are using1100 0000 is 192 unsigned and −64 signed. The same bits, two answers. Questions that look ambiguous are testing whether you notice.
Paper 4 · 25% of the A Level

Paper 4: the practical exam

P4What to expect and how to prepare

2 hours 30 minutes, 75 marks, sat on a computer with no internet or email. It assesses sections 19 and 20 — except low-level and declarative programming, so no assembly and no Prolog. You submit complete program code and evidence of testing, and you work in Java, VB.NET or Python, all in console mode.

What you will be asked to implement, in your chosen language:

  • Classes with private attributes, constructors, get and set methods, inheritance and overridden methods.
  • Stacks, queues, linked lists and binary trees, with their operations.
  • Recursive routines.
  • Reading from and writing to text files, and random access to record files.
  • Exception handling around file access, division and type conversion.
  • Validation of input, with sensible messages.

Evidence of testing means screenshots or captured console output showing the program running with the data specified in the question. Marks are lost every session for code that works but has no evidence attached.

Prepare by building a personal template in your chosen language: a class with encapsulation, a stack, a queue, file read and write, and a try/except block. If you can type those from memory in ten minutes, Paper 4 becomes a question of reading the brief carefully rather than of recalling syntax.
Write the code the question asks for, in the order it asks. Each part is separately marked, so a partly working program with all parts attempted scores far better than one elegant part and three blanks.
Reference

Definitions bank

LearnThe definitions examiners want verbatim

TermDefinition
AbstractionThe process of removing unnecessary detail from a problem so that only the relevant features remain.
DecompositionBreaking a problem down into smaller sub-problems that can be solved separately.
AlgorithmA finite sequence of unambiguous steps that solves a problem.
Two's complementA method of representing signed integers in which a negative value is formed by inverting all the bits of the positive value and adding one.
Normalisation (floating point)Adjusting the mantissa and exponent so that the mantissa begins 0.1 for a positive number or 1.0 for a negative one, giving maximum precision.
Lossless compressionCompression from which the original file can be reconstructed exactly.
Lossy compressionCompression in which some data is permanently discarded to reduce file size.
ProtocolA set of rules governing the transmission of data between devices.
InterruptA signal sent to the processor that causes it to suspend the current program and run an interrupt service routine.
Fetch–execute cycleThe repeated process by which the processor fetches, decodes and executes each instruction.
PipeliningOverlapping the stages of the fetch–execute cycle for successive instructions to increase throughput.
Virtual memoryThe use of secondary storage as an extension of main memory, with pages swapped in and out as needed.
Disk thrashingA state in which the system spends more time swapping pages than executing instructions.
CompilerA program that translates a complete high-level program into machine code before execution.
InterpreterA program that translates and executes a high-level program one statement at a time.
ValidationAn automatic check that data entered is reasonable and within acceptable limits.
VerificationA check that data has been accurately copied or transferred without change.
Primary keyA field, or combination of fields, that uniquely identifies each record in a table.
Foreign keyA field in one table that refers to the primary key of another table.
Referential integrityThe rule that every foreign key value must match an existing primary key value, or be null.
Normalisation (databases)The process of organising data into tables to remove redundancy and dependency problems.
StackA last-in first-out data structure with push and pop operations.
QueueA first-in first-out data structure with enqueue and dequeue operations.
RecursionA routine that calls itself, having a base case that ends the recursion and a general case that moves towards it.
ClassA template that defines the properties and methods of a type of object.
ObjectAn instance of a class, created by its constructor.
EncapsulationKeeping an object's data private and accessible only through its own public methods.
InheritanceA subclass acquiring the properties and methods of its superclass.
PolymorphismThe ability of a subclass to override an inherited method so that the same call behaves differently.
Symmetric encryptionEncryption in which the same key is used to encrypt and to decrypt.
Asymmetric encryptionEncryption using a public key to encrypt and a related private key to decrypt.
Digital signatureA message digest encrypted with the sender's private key, proving authenticity and integrity.
Digital certificateA document issued by a Certificate Authority that binds a public key to the identity of its owner.
Supervised learningMachine learning in which the model is trained on labelled data.
Unsupervised learningMachine learning in which the model finds patterns in unlabelled data.
Track your progress

Study planner & progress

Every syllabus unit. Tick one when you can answer a past-paper question on it unaided. Your ticks are saved on this device only — nothing is sent anywhere, and there is no account to create.

Loading…

Reference

Free past papers & how to revise

Official (free)

  • Cambridge International — 9618 subject page: syllabus, specimen papers, past papers, mark schemes and examiner reports.
  • Examiner reports name the exact questions candidates got wrong each series — read them for every paper you attempt.

Free archives

How to revise this subject

  1. Write pseudocode by hand, every week. Paper 2 is answered entirely in pseudocode, and the only way to get fast at it is to write it — not read it.
  2. Learn the official pseudocode conventions. Cambridge publishes a Pseudocode Guide; the reference section below covers the constructs you need. Arrays are declared with explicit bounds, assignment uses , and keywords are in capitals.
  3. Trace tables win marks. When asked to dry-run an algorithm, draw the table, one column per variable, one row per iteration. Show every change.
  4. Do the number conversions on paper. No calculator means you need the doubling method, the 16s-and-1s method for hex, and two's complement by "invert and add one".
  5. Pick your Paper 4 language early and stick to it. Java, VB.NET or Python. Learn its file handling, exception handling and OOP syntax cold — not three languages badly.
  6. Answer theory questions with the technical term. "Interrupt", "cache", "pipelining", "normalisation", "referential integrity", "encapsulation" — the term is usually the mark.

Edvia Free Resources — AS & A Level Computer Science 9618. Original notes and worked examples written for the Cambridge AS & A Level Computer Science 9618 syllabus for examination in 2027–2029. An independent free study resource, not affiliated with or endorsed by Cambridge University Press & Assessment. Syllabus reference codes are used for navigation. Share it freely — it will always be free.

All subjects · Chapter handouts · Practice ·

Like how this is taught?

This guide is one subject. Imagine every subject taught this way, in person, with a mentor who knows your name — that is Edvia College.

Apply to Edvia → WhatsApp Admissions