Skip to content

B2 · Flowcharts

Spec reference: Section B - Standard Methods in Algorithm Development Key idea: Represent algorithms visually using standard symbols connected by arrows.


Flowcharts


What is a flowchart?

A flowchart is a visual representation of an algorithm. It uses standardised shapes connected by arrows to show the flow of execution, including decisions, loops and processes.

Key definition

Flowchart - a diagram that uses standardised symbols to represent the steps of an algorithm.


Standard flowchart symbols

SymbolShapeMeaning
TerminatorRounded ovalStart or End of the algorithm
ProcessRectangleAn action or calculation
DecisionDiamondA yes/no question that branches the flow
Input/OutputParallelogramData going in (user input) or out (display)
Flow arrowArrowShows direction of execution

Exam tip

Always label the two exits from a decision diamond as Yes and No (or True and False). Never leave them unlabelled.


Example 1: Sequence

Problem: Ask the user for a number, double it, and display the result.

Every step follows in a straight line from top to bottom. No decisions, no loops. This is a sequence.


Example 2: Selection (decision)

Problem: Ask for a student mark. If it is 50 or above, output "Pass". Otherwise output "Fail".

The diamond creates two separate paths. Both must eventually reach END.


Example 3: Iteration (loop)

Problem: Output the numbers 1 to 5.

The arrow from SET count = count + 1 loops back up to the condition. When the condition becomes false (count > 5), the flow exits.


Exam-style worked example

Scenario: A vending machine dispenses a drink if the user inserts at least £1.50. If they insert more, it gives change. If less, it returns the money.

This combines selection (two decisions) and sequence (steps between decisions).


Implementing flowcharts correctly

  1. One entry, one exit per process box - arrows must not branch from process boxes (only from decision diamonds).
  2. Arrows show direction - always put arrowheads so the reader knows which way to follow the path.
  3. Every decision must have exactly two labelled exits - Yes/No or True/False.
  4. Start and End must use terminators - not rectangles.
  5. Every path must lead to an end - do not leave any arrows dangling.

Flowcharts vs pseudocode

FlowchartPseudocode
FormatVisual diagramWritten text
Best forShowing decision logic clearlyComplex algorithms with many variables
Easy toSee the overall flowWrite and modify quickly
Hard toShow detail in computationsVisualise branching paths

Both describe the same algorithm. Choose the one asked for in the question.


Summary

TermMeaning
FlowchartVisual algorithm representation using standard symbols
TerminatorOval - marks start and end
Process boxRectangle - an action or calculation
Decision diamondDiamond - a yes/no branch
Input/OutputParallelogram - user input or screen output

Test Yourself

Question 1 of 5

Which flowchart symbol is used to represent a YES/NO decision?

Ad

PassMaven - revision made simple.