Every computer system is made of sub-systems, and each sub-system is made of smaller ones. Break a problem down far enough and every part becomes easy to solve. Then show the plan with a structure diagram, a flowchart or pseudocode.
Every computer system is made up of sub-systems, which are made up of further sub-systems. Decomposition breaks a problem into its component parts: inputs, processes, outputs and storage. A solution can be designed with a structure diagram (the hierarchy of sub-systems), a flowchart (the steps, using standard symbols) or pseudocode (the steps written as structured code).
Fig. 1: a structure diagram for a quiz program, decomposed into two levels of sub-systems
Section 01
Systems and sub-systems.
A games console is one system, but inside it are a controller sub-system, a graphics sub-system, a storage sub-system and more. Software is the same: a large program is built from smaller modules.
Inputs: the data the system takes in, e.g. the answer a player types.
Processes: what is done to the data, e.g. compare the answer with the correct one and add 1 to the score.
Outputs: what the system produces, e.g. "Correct!" and the final score.
Storage: what must be kept, e.g. the questions, the answers and the high score.
A structure diagram (Fig. 1) shows the decomposition as a hierarchy: the whole system at the top, each box split into the sub-systems below it. It shows what the parts are, not the order in which steps happen.
Worked example Decompose a problem
A car park barrier lets a car in when a valid ticket is inserted. Identify the inputs, processes, outputs and storage.
Inputs: the ticket code read by the scanner; a sensor showing a car is at the barrier.
Processes: check the ticket code is valid and not already used; count the cars inside.
Outputs: raise the barrier; show "Car park full" on a display.
Storage: the list of valid ticket codes and the number of free spaces.
Answer: Inputs, processes, outputs and storage each identified
Examiner trap
A structure diagram is not a flowchart. It has no decisions, loops or arrows showing order: it only shows how the system is divided into sub-systems.
Section 02
Flowchart symbols.
A flowchart shows each step of an algorithm in order. Cambridge expects these six standard symbols. Use the right shape for each step, and an arrow for every flow line.
Symbol
Use
Example
Terminator (rounded)
Start and stop of the flowchart
START, STOP
Process (rectangle)
A calculation or assignment
Total ← Total + X
Input/Output (parallelogram)
Data in or out
INPUT X, OUTPUT Total
Decision (diamond)
A question with two exits, Yes/No or True/False
X > 10?
Subroutine (rectangle with side bars)
A call to a procedure drawn as a separate flowchart
SortList
Flow line (arrow)
Shows control passing between shapes
→
Your turn
Which flowchart symbol would you use for each step: (a) OUTPUT "Too high"; (b) Score >= 50?; (c) Count ← Count + 1?
(a) input/output parallelogram; (b) decision diamond with two labelled exits; (c) process rectangle
Examiner trap
Every decision diamond needs exactly two exits, and both must be labelled (Yes/No or True/False). Missing labels lose marks.
Stage 1 · Learn
Check what the sim just showed you
Four quick checks. Each correct answer earns XP and records this skill on your profile.
Quick check+10 XP
Which design method shows a system broken into sub-systems as a hierarchy?
Quick check+10 XP
Which flowchart symbol is used for INPUT Age?
Quick check+10 XP
When a problem is decomposed, which four parts are identified?
Quick check+10 XP
In the lab program that counts days below zero, which temperature would NOT add 1 to Count?
Section 03
Pseudocode and an algorithm's purpose.
Pseudocode writes the steps as structured code that is not tied to any one language. Load a program in the lab, run it and watch the variables change: that is how you work out what an unfamiliar algorithm does.
Count ← 0
FOR Index ← 1 TO 20
OUTPUT "Enter a temperature"
INPUT Temperature
IF Temperature < 0
THEN
Count ← Count + 1
ENDIF
NEXT Index
OUTPUT "Days below zero: ", Count
Worked example State the purpose
Describe the purpose of the algorithm above, and the processes involved.
Purpose (say what it achieves): it counts how many of 20 temperatures entered are below zero and outputs that number.
Processes: a FOR loop repeats 20 times, inputting one temperature each time.
Each temperature is compared with 0; if it is less than 0, Count is increased by 1.
After the loop, the final value of Count is output.
Answer: It counts and outputs how many of 20 input temperatures are below zero
Examiner trap
"It inputs numbers and outputs a number" is not a purpose. State what the algorithm is for, using the context: counting freezing days, finding the highest score, and so on.
Stage 2 · Exam
Exam-style questions
Unlocks once the four checks above are done. Worth more XP, written to IGCSE Paper 1 standard.
Finish the four checks above to unlock the exam questions
Exam style+20 XP
Which flowchart symbol must have two labelled exits?
Exam style+20 XP
Which statement about every computer system is correct?
Exam style+20 XP
A flowchart step calls a separate flowchart called CalculateTax. Which symbol is used?
Exam style+20 XP
In a program that sorts a class list, which of these is storage?
Skill unlocked
Decomposition and design, mastered.
This skill is now recorded on your profile. Keep the chain going.