Computational thinking (CT) is the problem‑solving methodology that underpins the Cambridge AS & A‑Level Computer Science (9618) syllabus. The three core CT techniques are:
Link to assessment objectives:
Abstraction reduces complexity by creating models, representations, or specifications that are easier to understand, develop and maintain.
| Level | Description | Typical Notation |
|---|---|---|
| Problem domain | Real‑world concepts expressed in natural language. | “Calculate the total cost of items in a shopping cart.” |
| Pseudocode | Language‑independent description of algorithms. | FOR i FROM 1 TO n DO … |
| High‑level language | Human‑readable code that abstracts hardware details. | int sum = a + b; |
| Assembly language | Mnemonic representation of machine instructions. | MOV AX, BX |
| Machine code | Binary instructions executed directly by the CPU. | 10110010 10101001 … |
Decomposition helps students analyse a problem (AO2) and design a solution (AO3). The example below shows how a real‑world task can be turned into separate functions.
Problem: Calculate the total cost of a shopping cart. 1. Read the list of items. 2. For each item, read its price and quantity. 3. Multiply price by quantity and add to a running total. 4. Apply tax (if required). 5. Display the final amount.
Each numbered step can be implemented as an independent routine, making the overall program easier to understand, test and reuse.
Starting with a high‑level description, we add detail until we have executable code.
A[0..n‑1] of integers.Ordering a collection of numbers – the algorithm must be independent of the actual data (marks, ages, temperatures, etc.).
Use **insertion sort** expressed first in pure pseudocode (exam‑style) and then in Python to illustrate the transition to a high‑level language.
FOR i ← 1 TO n‑1
key ← A[i]
j ← i‑1
WHILE j ≥ 0 AND A[j] > key DO
A[j+1] ← A[j]
j ← j‑1
END WHILE
A[j+1] ← key
END FOR
def insertion_sort(A):
for i in range(1, len(A)):
key = A[i]
j = i - 1
while j >= 0 and A[j] > key:
A[j + 1] = A[j]
j -= 1
A[j + 1] = key
return A
Input: [78, 92, 65, 88] → Output: [65, 78, 88, 92]
| Binary | Decimal | Hexadecimal |
|---|---|---|
| 0001 1010 | 26 | 1A |
| 1111 1111 | 255 | FF |
| 1000 0000 0000 0000 | 32768 | 8000 |
Quick conversion methods
int marks[30];read, write, traverse, search, sort.
struct Student { string name; int id; int mark; };An ADT defines a set of operations without specifying an implementation. Common ADTs for the syllabus:
| ADT | Typical Operations |
|---|---|
| Stack | push, pop, top, isEmpty |
| Queue | enqueue, dequeue, front, isEmpty |
| List | insert, delete, retrieve, length |
Students must be able to *describe* the operations and *give* a suitable representation (e.g., array‑based or linked‑list).
| Gate | Symbol | Truth Table (A B → Output) |
|---|---|---|
| NOT | ¬A | A=0 → 1 A=1 → 0 |
| AND | A ∧ B | 00→0 01→0 10→0 11→1 |
| OR | A ∨ B | 00→0 01→1 10→1 11→1 |
| NAND | ¬(A ∧ B) | 00→1 01→1 10→1 11→0 |
| NOR | ¬(A ∨ B) | 00→1 01→0 10→0 11→0 |
| XOR | A ⊕ B | 00→0 01→1 10→1 11→0 |
| Translator | How it works | Typical use in the syllabus |
|---|---|---|
| Compiler | Translates the whole source program into machine code (object file) before execution. | C, Java (javac), Pascal. |
| Interpreter | Executes source code line‑by‑line, translating each statement on the fly. | Python, BASIC. |
| Assembler | Converts assembly language mnemonics into machine code. | Used when teaching low‑level programming. |
Key points for students:
Choosing the right paradigm helps select the most suitable abstraction mechanism.
| Paradigm | Key Abstraction Mechanism | Typical Example (Sorting) |
|---|---|---|
| Procedural | Functions / procedures | def insertion_sort(...) (Python) |
| Object‑Oriented | Classes & objects |
class Sorter:
def insertion_sort(self, A):
...
|
| Functional | Higher‑order functions, immutability | sorted = fold(insert, [], A) (conceptual) |
Abstraction is also central to networking, where each protocol layer hides the implementation details of the layer below.
Example: uploading a photo. The user interacts with a web browser (application layer) while TCP/IP handles routing, error checking and framing – all invisible to the user.
| Syllabus requirement | How the notes measure up | Suggested improvement |
|---|---|---|
| Computational‑thinking skills (AO2 + AO3) – abstraction, decomposition, step‑wise refinement, algorithms, pseudocode, flow‑charts | Clear conceptual overview, worked example with pseudocode and Python. |
|
| Data representation & structures (AS 1, 10) – binary, BCD, hexadecimal, floating‑point, character encodings, arrays, records, ADTs, file handling | Number‑system table and brief description of BCD, floating‑point, Unicode; arrays and records added. |
|
| Hardware & CPU fundamentals (AS 3 & 4) – Von Neumann model, registers, ALU, control unit, fetch‑execute cycle, logic gates, Boolean algebra, Karnaugh maps | High‑level hardware paragraph and placeholder diagram; registers, fetch‑execute, logic‑gate cheat‑sheet added. |
|
| System software (AS 5) – OS functions, language translators, IDE features | OS mentioned only briefly; translators and IDEs missing. |
|
Abstraction is a fundamental computational‑thinking skill that, together with decomposition and step‑wise refinement, enables students to manage complexity, promote reuse, and communicate ideas effectively. By explicitly linking each technique to the relevant assessment objectives and by showing how abstraction permeates data representation, hardware, system software, networking and security, learners can design robust, maintainable solutions that satisfy all Cambridge AS & A‑Level Computer Science objectives.
Create an account or Login to take a Quiz
Log in to suggest improvements to this note.
Your generous donation helps us continue providing free Cambridge IGCSE & A-Level resources, past papers, syllabus notes, revision questions, and high-quality online tutoring to students across Kenya.