2.1 What is a Flowchart?
A flowchart is a diagram that uses standard shapes and arrows to represent the steps of an algorithm. Instead of writing the solution in words or code, a flowchart draws it — making it easier to see the order of operations and where the logic branches.
Key idea: A flowchart is a planning tool, not the final program. It helps you design and check your logic before you write a single line of pseudocode or code.
Why do we use flowcharts?
- To visualise the structure of an algorithm at a glance
- To communicate a solution to others (programmers and non-programmers)
- To spot errors in logic before coding begins
- To break down a complex problem into smaller, manageable steps
- To show branching (decisions) and loops clearly
Here is a tiny example showing what a flowchart might look like for a program that reads a number and prints whether it is positive:
What is a Flowchart?
2.2 Flowchart Symbols
Flowcharts use a small set of standard shapes. Each shape has a special meaning, so anyone reading the flowchart understands the same thing. You must learn these six symbols:
Terminator (Oval)
Marks the START or END of the flowchart. Every flowchart must have one START oval and (usually) one END oval.
Process (Rectangle)
Used for calculations, assignments, or any action that processes data. Example: Total <- A + B or Counter <- Counter + 1.
Decision (Diamond)
A yes/no or true/false question. The flow splits into two outgoing arrows — one for Yes, one for No. Used for IF conditions.
Input / Output (Parallelogram)
Represents data going IN (INPUT) or coming OUT (OUTPUT) of the program. Example: INPUT Name or OUTPUT Result.
Connector (Small Circle)
Used to connect parts of a flowchart that are too far apart to join with a line, or to link to another page. Usually labelled with a letter (A, B, C...).
Flow Line (Arrow)
The arrows that connect the shapes. They show the order in which steps are executed — the actual 'flow' of the algorithm.
Remember: The shape carries the meaning — never use a rectangle for a question, and never use a diamond for a calculation. Examiners check that you have used the correct symbols!
Quick Reference Table
| Symbol | Shape | Used For |
|---|---|---|
| Terminator | Oval | START / END |
| Process | Rectangle | Calculations, assignments |
| Decision | Diamond | Yes/No questions (IF) |
| Input/Output | Parallelogram | INPUT and OUTPUT |
| Connector | Small circle | Linking parts of the chart |
| Flow line | Arrow | Showing the order of steps |
Flowchart Symbols
2.3 Drawing Flowcharts
Drawing a clear flowchart is a skill you can learn with practice. Follow these steps every time and your flowcharts will be easy to read and exam-correct.
Step-by-Step Method
Good Practice Rules
Here is an example flowchart for a program that asks for a number and prints whether it is even:
Drawing Flowcharts
2.4 Flowchart to Pseudocode
Once you have drawn a flowchart, translating it into CIE pseudocode is straightforward — each symbol maps to a particular keyword or structure. Here is the conversion table:
| Flowchart Symbol | Pseudocode |
|---|---|
| Terminator (START) | Begins the program — no keyword needed |
| Terminator (END) | Use STOP or simply end the pseudocode |
| Process (Rectangle) | Assignment: Counter <- 0 |
| Input (Parallelogram) | INPUT Name |
| Output (Parallelogram) | OUTPUT "Hello" |
| Decision (Diamond) | IF condition THEN ... ELSE ... ENDIF |
Worked Example
Consider a flowchart that inputs a number, checks if it is greater than 5, and prints "Big" or "Small". The pseudocode for this flowchart would be:
INPUT Num
IF Num > 5 THEN
OUTPUT "Big"
ELSE
OUTPUT "Small"
ENDIFNotice how the decision diamond becomes an IF statement. The Yes branch becomes the THEN part, and the No branch becomes the ELSE part.
Tip: When a flowchart has a decision diamond that loops back on itself, you translate it into a WHILE loop. When the diamond counts from one value to another, you use a FOR loop.
Flowchart to Pseudocode
2.5 Key Points Summary
Let's recap the most important ideas from this topic before you tackle the Question Bank.
Exam tip: In CIE exams you may be asked to draw a flowchart from a description, or to write pseudocode from a flowchart. Always use the correct shape for each step, label every decision diamond with its Yes/No branches, and use UPPERCASE keywords (IF, THEN, ELSE, ENDIF) in the pseudocode.