SLIDE 1
CSZone.co.uk
Click to reveal · Arrow keys also work
OCR J277 · Component 2 · Topic 2.1.1

Computational
Thinking

Abstraction · Decomposition · Algorithmic Thinking

CSZone OCR GCSE Computer Science J277
Learning Objectives

By the end of this video you will be able to...

Define abstraction and explain how it is used to simplify a problem by removing unnecessary detail and focusing only on what is relevant
Define decomposition and explain how it is used to break a complex problem down into smaller, more manageable sub-problems
Define algorithmic thinking and explain how it is used to create a logical, step-by-step sequence of instructions that solves a problem
Explain how all three principles of computational thinking work together to help programmers define, break down and solve complex problems
Identify which principle is being applied in a given scenario and justify your answer — a common exam question type
⚡ This is the first topic of Component 2. We start with the thinking skills that underpin all of computer science.
Overview

What is computational thinking?

DEFINITION
Computational thinking is a set of problem-solving skills and techniques that allow us to express problems and their solutions in a way that a computer could execute. It is not about programming — it is about thinking like a computer scientist before any code is written.
🔍
ABSTRACTION
Remove unnecessary detail. Focus on what matters.
🧩
DECOMPOSITION
Break the problem into smaller, manageable parts.
📋
ALGORITHMIC THINKING
Design a step-by-step solution that a computer can follow.
These three skills are used together, not in isolation. A programmer uses abstraction to simplify the problem, decomposition to split it into sub-problems, and algorithmic thinking to design the solution for each part. This is the foundation of everything in Component 2.
⚡ In the exam, you will be given a scenario and asked to identify or apply one or more of these principles. Knowing the precise definition of each is essential.
Abstraction

Abstraction — removing the unnecessary

DEFINITION
Abstraction is the process of removing or hiding unnecessary detail from a problem, keeping only the information that is relevant to the solution. It allows us to focus on what a system does rather than how it does it.
THE LONDON UNDERGROUND MAP — A CLASSIC EXAMPLE
REAL GEOGRAPHY (too much detail)
Exact distances between stations, curves in tunnels, street layouts above ground, precise coordinates — all real, but none of it helps you plan a journey.
THE TUBE MAP (abstracted)
Lines, station names and connections only. Distances distorted. Colours for each line. Everything unnecessary removed — only what you need to plan your journey.
IN COMPUTING — WHAT TO KEEP AND WHAT TO REMOVE
Keep: the data and processes essential to solving the problem
Keep: relationships between the important parts
Remove: background details not needed by the program
Remove: characteristics irrelevant to the current problem
⚡ Abstraction is about making a problem simpler to work with. If the exam asks you to "explain abstraction", the key phrase is: "removing unnecessary detail to focus on what is relevant."
Abstraction

Abstraction in computing — examples

EXAMPLE: MODELLING A CAR IN A RACING GAME
REAL CAR — irrelevant details
Engine temperature sensor readings · Exact alloy composition of pistons · Insurance group · Number of cup holders · Tyre pressure by the Pascal · Oil viscosity
GAME CAR — abstracted model
Speed · Position (x, y) · Health/damage · Fuel level · Player controls (left, right, accelerate, brake)
MORE COMPUTING EXAMPLES
A weather app — abstracts away satellite telemetry and atmospheric physics. Shows you: temperature, rain chance, wind speed.
A school database — abstracts away a student's home life, health records, family. Keeps: name, form, grades, attendance.
A web browser — abstracts away TCP/IP packets, DNS lookups and server responses. Shows you a rendered webpage.
LEVELS OF ABSTRACTION
High Level
Python, web apps
Mid Level
OS, compilers
Low Level
machine code, hardware
Higher = more detail hidden · Lower = closer to the hardware
⚡ Exam scenarios often describe a programmer building a model or simulation. Look for phrases like "only the relevant data" or "simplified representation" — these are describing abstraction.
Decomposition

Decomposition — divide and conquer

DEFINITION
Decomposition is the process of breaking a complex problem down into smaller, more manageable sub-problems. Each sub-problem is easier to understand, design and solve individually. The solutions to the sub-problems are then combined to solve the original problem.
WHY DECOMPOSE?
Simpler to solve — small problems are far less overwhelming than one large problem
Team working — different programmers can work on different sub-problems simultaneously
Easier to test — each part can be tested and debugged independently
Reusability — sub-solutions can often be reused in other projects
EVERYDAY ANALOGY
Organising a school trip is complex. Decompose it: Book transportGet permission slipsArrange lunchPlan the itineraryCollect payments. Each task is manageable. Done together, they solve the whole problem.
⚡ The key exam phrase for decomposition is: "breaking a complex problem into smaller, more manageable sub-problems." Don't just say "making it smaller" — say sub-problems.
Decomposition

Structure diagrams — showing decomposition

A structure diagram is a visual way of showing decomposition. The main problem sits at the top, and lines branch down to sub-problems, which can break down further. This is also called a hierarchy chart.
Build a Messaging App User Login Send Messages Store Messages Notifications Username Password Compose Send Database Encryption Main problem Sub-problems (Level 1) Sub-problems (Level 2)
The main problem "Build a Messaging App" decomposes into four sub-problems. Each of those breaks down further — User Login into Username and Password handling, Send Messages into Compose and Send functions, and so on. Each leaf node is a small, solvable task.
⚡ Structure diagrams show the hierarchy of a decomposed problem. The exam may ask you to complete a structure diagram — add missing sub-problems — or explain what a given one represents.
Algorithmic Thinking

Algorithmic thinking — step-by-step solutions

DEFINITION
Algorithmic thinking is the process of defining a clear, step-by-step sequence of instructions that can be followed to solve a problem. The resulting sequence is an algorithm — a finite set of instructions that, when followed correctly, always produces the correct output for a given input.
CHARACTERISTICS OF A GOOD ALGORITHM
Unambiguous — every step is clear; there is only one way to interpret each instruction
Finite — the algorithm always terminates; it does not loop forever
Correct — for every valid input, the algorithm produces the correct output
Ordered — steps must be carried out in a specific sequence; order matters
EVERYDAY ALGORITHMS
Recipe
Steps to make a dish in the right order
GPS Route
Turn-by-turn directions to reach a destination
IKEA Manual
Sequential steps to assemble furniture
⚡ Algorithms can be expressed in three ways on the OCR spec: pseudocode, flowcharts, and code in a programming language. The next slide shows examples of each.
Algorithmic Thinking

Expressing algorithms — pseudocode & flowcharts

PSEUDOCODE — LOGIN CHECK
// Algorithm: check login credentials attempts = 0 WHILE attempts < 3 INPUT username INPUT password IF username == "admin" AND password == "pass123" THEN PRINT "Access granted" STOP ELSE attempts = attempts + 1 PRINT "Try again" END IF END WHILE PRINT "Account locked"
Pseudocode is plain English-like language — not real code, but structured enough to turn into any programming language.
FLOWCHART — SAME ALGORITHM
START attempts = 0 INPUT username, password Credentials correct? YES Access granted NO attempts = attempts + 1 attempts < 3? YES NO Account Locked
FLOWCHART SYMBOLS — MUST KNOW
Terminal (Start/End)
Process
Decision (diamond)
Input/Output
⚡ Flowcharts and pseudocode express the same algorithm — just in different forms. Always follow the arrows. Decisions have exactly two exits: YES and NO.
Bringing It Together

How the three principles work together

These three principles are not used in isolation — they form a workflow that a programmer follows from the moment a problem is identified to the moment a solution is built.
WORKED EXAMPLE — "BUILD A SCHOOL QUIZ APP"
STEP 1 — ABSTRACTION
Remove irrelevant detail. We don't need: school timetables, student home addresses, teacher contracts. We do need: questions, answers, scores, a timer. Focus on those.
STEP 2 — DECOMPOSITION
Break the app into sub-problems: Load questions → Display question → Accept answer → Check answer → Update score → Show results. Each part is now small enough to tackle individually.
STEP 3 — ALGORITHMIC THINKING
For each sub-problem, design a precise algorithm. e.g. "Check answer": IF user_answer == correct_answer THEN score += 1. Write pseudocode or draw a flowchart for each.
🔍
ABSTRACTION
Simplify
🧩
DECOMPOSITION
Split
📋
ALGORITHMIC THINKING
Solve
⚡ A six-mark exam question might give you a scenario and ask you to explain how all three principles apply. Plan your answer before writing — one clear paragraph per principle, each with a specific example from the scenario.
Putting It Together

2.1.1 — the big picture

ABSTRACTION
Removing unnecessary detail from a problem to focus on what is relevant. Produces a simplified model. Examples: Tube map, game car model, weather app, school database. Key phrase: "remove irrelevant detail."
DECOMPOSITION
Breaking a complex problem into smaller sub-problems. Shown using structure diagrams. Benefits: simpler to solve, enables team working, easier to test, promotes reuse. Key phrase: "smaller, manageable sub-problems."
ALGORITHMIC THINKING
Designing a step-by-step sequence of instructions to solve a problem. Must be: unambiguous, finite, correct, ordered. Expressed as: pseudocode, flowcharts, or code. Key phrase: "step-by-step sequence."
THEY WORK TOGETHER
Abstraction → simplify the problem first. Decomposition → split it into parts. Algorithmic thinking → solve each part with a precise algorithm. Together they turn any complex problem into a solvable, codeable solution.
KEY VOCABULARY — MUST KNOW
algorithmA finite, ordered set of steps to solve a problem
abstractionRemoving irrelevant detail
decompositionBreaking into sub-problems
pseudocodeStructured English-like algorithm notation
flowchartVisual diagram showing algorithm flow
structure diagramVisual hierarchy showing decomposition
Exam-Style Questions

Computational Thinking

Question 1
A programmer is building a hospital patient management system. She decides to only store: patient name, date of birth, ward number and current medication. She does not store: family relationships, GP history or personal finances. Name the computational thinking principle being used and explain why she has applied it.
3 marks
1
Abstraction (1 mark)
1
She has removed unnecessary detail from the problem — the patient's family relationships, GP history and personal finances are not needed by the system to manage ward care. (1 mark)
1
This simplifies the model so the system only processes what is relevant to its purpose, making it easier to design and build. (1 mark)
Question 2
A team of four programmers is building a large e-commerce website. Explain how decomposition would help them complete this project efficiently.
4 marks
1
Decomposition breaks the complex website into smaller sub-problems, e.g. user login, product search, shopping cart, payment processing. (1 mark)
1
Each sub-problem is more manageable and easier to design individually than tackling the whole website at once. (1 mark)
1
Different programmers can work on different sub-problems simultaneously, saving time. (1 mark)
1
Each part can also be tested and debugged independently before being combined into the final system. (1 mark)
Question 3
Explain what is meant by algorithmic thinking and give one characteristic that a well-designed algorithm must have.
2 marks
1
Algorithmic thinking is the process of designing a step-by-step sequence of instructions that solves a problem and can be followed by a computer. (1 mark)
1
Any one of: unambiguous / finite / correct / ordered. (1 mark)
Common Mistakes

Four mistakes that cost marks

1
Confusing abstraction with decomposition. Remember: abstraction = hiding detail. Decomposition = splitting into parts. If a question asks about removing irrelevant information, that is abstraction. If it asks about breaking a problem down, that is decomposition. They are different operations.
2
Saying abstraction means "making it simpler" without explaining how. The examiner wants to know the mechanism: you remove unnecessary detail and focus only on what is relevant to the problem. Use the phrase: "removing unnecessary detail to focus on what is relevant."
3
Not linking decomposition to "sub-problems." The word sub-problem is the key technical term for decomposition. If you say "decomposition is when you break it into smaller steps," you are describing algorithmic thinking, not decomposition. Decomposition breaks a problem into smaller sub-problems — each of which can be solved independently.
4
Drawing flowchart arrows the wrong way, or missing decision exits. Every decision diamond must have exactly two exits labelled YES and NO. Every path must eventually reach a terminal (Start/End). A flowchart with a decision having only one exit shows a misunderstanding of algorithmic thinking and will lose marks.
Summary

2.1.1 — Computational Thinking

ABSTRACTION
Removing unnecessary detail. Focus on what is relevant. Produces a simplified model of the problem. Example: Tube map removes real geography, keeps only what you need to plan a journey.
DECOMPOSITION
Breaking a complex problem into smaller sub-problems. Shown with structure diagrams. Benefits: manageable, parallel working, independent testing, reusability.
ALGORITHMIC THINKING
Designing a step-by-step, unambiguous, finite, correct, ordered sequence of instructions. Expressed as pseudocode, flowcharts, or code. Flowcharts: rounded rectangle=terminal, rectangle=process, diamond=decision, parallelogram=I/O.
USED TOGETHER
Abstraction simplifies → Decomposition splits → Algorithmic thinking solves. These three principles are the foundation of how programmers approach every complex problem before writing a single line of code.
EXAM ESSENTIALS
Abstraction = remove unnecessary detail
Decomposition = smaller sub-problems
Algorithm = step-by-step, finite, unambiguous
Decision diamond = exactly two exits: YES and NO
Structure diagram = visual decomposition hierarchy
2.1.1 Complete

That's 2.1.1 done!

Next up: 2.1.2 — Designing, Creating and Refining Algorithms

📝
MARKED WORKSHEET
CSZone.co.uk
🎯
QUIZ
CSZone.co.uk
📊
SLIDES
CSZone.co.uk