9.1 Computational Thinking Skills – Abstraction and Related Concepts
1. What is Computational Thinking?
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:
Abstraction – focus on the essential features of a problem while ignoring irrelevant details.
Decomposition – break a complex problem into smaller, manageable sub‑problems.
Step‑wise refinement – progressively add detail to a high‑level description until a complete algorithm is obtained.
Link to assessment objectives:
Decomposition → AO2 (analyse a problem).
Step‑wise refinement → AO3 (design a solution).
Abstraction → both AO2 and AO3 (analyse and design).
2. Abstraction
Abstraction reduces complexity by creating models, representations, or specifications that are easier to understand, develop and maintain.
2.1 Why Use Abstraction?
Manages complexity in large programs.
Promotes code reuse and modular design.
Facilitates communication between developers, stakeholders and users.
Allows problem solving at different levels of detail.
2.2 Types of Abstraction
Data abstraction – representing data using types, structures or objects without exposing the underlying representation.
Control abstraction – using loops, conditionals and functions to hide the flow‑control details.
Procedural (functional) abstraction – encapsulating a sequence of operations within a named routine (function, method, procedure).
2.3 Levels of Abstraction in Computing
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 …
3. Decomposition – Breaking a Problem Down
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.
4. Step‑wise Refinement – From Idea to Implementation
Starting with a high‑level description, we add detail until we have executable code.
High‑level description: “Sort a list of marks in ascending order.”
Refine to pseudocode: Choose an appropriate algorithm (e.g., insertion sort).
Refine to a concrete data structure: An array A[0..n‑1] of integers.
Refine to a programming language: Translate the pseudocode into Python, Java or C++.
5. Applying Abstraction: Sorting Student Marks (Worked Example)
5.1 Identify the Core Task
Ordering a collection of numbers – the algorithm must be independent of the actual data (marks, ages, temperatures, etc.).
5.2 Choose an Appropriate Level of Abstraction
Use **insertion sort** expressed first in pure pseudocode (exam‑style) and then in Python to illustrate the transition to a high‑level language.
5.3 Pseudocode (exam format – no programming language syntax)
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
5.4 Python Implementation (illustrative only)
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
The algorithm can be reused for any numeric list, not just student marks.
Logical steps are separated from language‑specific syntax.
Testing and debugging focus on the algorithm rather than low‑level code.
6. Data Representation & Structures (AS 1 & 10)
6.1 Number Systems
Binary
Decimal
Hexadecimal
0001 1010
26
1A
1111 1111
255
FF
1000 0000 0000 0000
32768
8000
Quick conversion methods
Binary → Decimal: multiply each bit by 2ⁿ (n = position from right, starting at 0) and sum.
Decimal → Hex: divide by 16, record remainders (0‑F), read remainders upwards.
6.2 Other Representations
BCD (Binary‑Coded Decimal) – each decimal digit stored in 4 bits (e.g., 27 → 0010 0111).
Floating‑point (IEEE 754) – sign, exponent, mantissa; used for real numbers.
Character encoding – ASCII (7‑bit) and Unicode (UTF‑8) for text.
6.3 Arrays & Records
Array – fixed‑size, indexed collection of homogeneous elements. int marks[30];
Typical operations: read, write, traverse, search, sort.
Record / Structure – heterogeneous fields grouped under one name. struct Student { string name; int id; int mark; };
Allows related data to be handled as a single entity.
6.4 Abstract Data Types (ADTs)
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).
7. Hardware & CPU Fundamentals (AS 3 & 4)
7.1 Von Neumann Architecture
Figure 1 – Simplified Von Neumann model (placeholder)
7.2 Key Registers (with one‑sentence purpose)
Program Counter (PC) – holds the address of the next instruction to fetch.
Memory Address Register (MAR) – contains the address of the memory location to be accessed.
Memory Data Register (MDR) – holds data being transferred to or from memory.
Accumulator (ACC) – primary arithmetic register used by the ALU.
Index Register (IX) – used for indexed addressing and loop counters.
7.3 Fetch‑Execute Cycle (5 steps)
Fetch – CPU reads the instruction from memory address in the PC.
Decode – Control unit interprets the opcode.
Fetch Operands – Any required data are fetched from memory into the MDR/ACC.
Execute – ALU performs the operation.
Store Result – Result is written back to a register or memory; PC is incremented.
7.4 Logic‑Gate Cheat‑Sheet (required for Section 3.2)
Process management – scheduling, multitasking, inter‑process communication.
Device management – drivers, I/O buffering.
User interface – command‑line or graphical shells.
8.2 Language Translators
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:
Compilers give faster execution but require a separate build step.
Interpreters allow rapid testing and are useful for scripting.
Both rely on the OS to manage resources.
8.3 Integrated Development Environments (IDEs)
Combine editor, compiler/interpreter, debugger, and build tools.
Provide syntax highlighting, auto‑completion and project management – further abstraction for the programmer.
Examples: Eclipse (Java), PyCharm (Python), Visual Studio Code (multi‑language).
9. Programming Paradigms & Constructs (AO3)
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)
10. Communication & Networking (AS 2 & 2.1)
Abstraction is also central to networking, where each protocol layer hides the implementation details of the layer below.
Figure 2 – OSI model (placeholder)
Physical – bits on a cable.
Data link – frames, MAC addresses.
Network – IP addressing, routing.
Transport – TCP/UDP, ports.
Application – HTTP, FTP, email.
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.
11. Security, Privacy & Ethics (AS 6 & 7)
Confidentiality – encryption, access control.
Integrity – hashes, checksums, digital signatures.
Expand the fetch‑execute description to five steps (Section 7.3).
Provide a logic‑gate cheat‑sheet with symbols and truth tables (Section 7.4).
System software (AS 5) – OS functions, language translators, IDE features
OS mentioned only briefly; translators and IDEs missing.
Add an “Operating‑system functions” box (Section 8.1).
Insert a paragraph comparing compilers and interpreters plus a table (Section 8.2).
Include a short IDE overview (Section 8.3).
14. Summary
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.
Suggested diagram: layered illustration showing how each abstraction level (Problem Domain → Pseudocode → High‑Level Language → Assembly → Machine Code) maps onto hardware, OS, and network layers.