Computational thinking is the collection of techniques you use to analyse a problem, understand it and work out how it could be solved by a computer. It often happens before any code is written, because you need to know what the computer is being asked to do before you decide how to program it.
| Technique | What it does |
|---|---|
| Decomposition | Breaks something down into smaller parts. |
| Abstraction | Removes or hides the detail that is not needed. |
A large, messy problem cannot be tackled in one go. Decomposition gives you pieces small enough to hold in your head, and abstraction strips each piece back to what actually matters for the solution. Between them, a vague idea becomes something you can plan, design and build.
For example, suppose your year group is selling tickets for a film night and you are writing the program that handles it. Decomposition splits the job into separate parts, such as working out the ticket price, recording a booking and counting the seats still free. Abstraction then lets each part ignore what it does not need: working out the price needs the buyer's age and whether they are a student, but not their name or which seat they chose.
Because they help you analyse, understand and solve problems, decomposition and abstraction turn up again and again in Computer Science, and most solutions you build will lean on both.
Edexcel GCSE Computer Science · Abstraction and Decomposition