CCEA A-Level Digital Technology
Subject Code 2650 // AS1 + AS2 + A2 1 + A2 2 // Full A-level pathway

> CCEA GCE Spec at a Glance

Four units across two years. AS level = AS1 + AS2 (can be a stand-alone qualification). Full A-level adds A2 1 exam + A2 2 coursework case study. Filter topics by unit below.

UNIT AS 1
Approaches to Systems Development
External exam · 1h 30min
50% of AS · 20% of A-level
UNIT AS 2
Fundamentals of Digital Technology
External exam · 1h 30min
50% of AS · 20% of A-level
UNIT A2 1
Information Systems
External exam · 2h 30min
40% of A-level (synoptic)
UNIT A2 2
Application Development (Case Study)
Internal coursework · Portfolio
20% of A-level
PROGRESS:
0 / 0
AS1: Approaches to Software Development
1. Systems Development Life Cycle (SDLC)

The Six Stages of the SDLC

The Systems Development Life Cycle (SDLC) is a structured framework for planning, creating, testing, and deploying an information system. It consists of six stages:

1. Analysis

The current system is investigated to identify problems. Techniques used include:

  • Interviews - talking to stakeholders directly (detailed but time-consuming)
  • Questionnaires - gathering data from many users (quick but limited depth)
  • Observation - watching users interact with the current system
  • Document analysis - examining existing paperwork, forms, reports

The output is a Requirements Specification - a document listing what the new system must do (functional requirements) and constraints (non-functional requirements such as performance, security).

2. Design

The system is planned using design tools before coding begins. Designers produce:

  • Input/output screen layouts and report designs
  • Data structures (ERDs, data dictionaries)
  • Process diagrams (DFDs, flowcharts, structure charts)
  • Algorithms in pseudocode
  • Test plans with expected outcomes

3. Development (Implementation/Coding)

Programmers write the actual code based on the design documents. This includes creating the user interface, writing program logic, and building the database.

4. Testing

The system is tested using a pre-prepared test plan with normal, abnormal, and boundary test data to ensure it meets the requirements specification.

5. Implementation

The system is installed and made live. Users are trained. Data is migrated from the old system. An implementation strategy is chosen (see Topic 4).

6. Evaluation

After a period of use, the system is reviewed against the original requirements. This assesses whether objectives were met and identifies areas for improvement.

Feasibility Study (TELOS)

Before starting, a feasibility study determines if the project is worth pursuing. Use the acronym TELOS:

LetterFactorMeaning
TTechnicalDoes the technology exist to build this system?
EEconomicIs it affordable? Do benefits outweigh costs?
LLegalDoes it comply with all relevant legislation?
OOperationalWill the users accept and use the new system?
SScheduleCan it be completed within the required timeframe?
CCEA often asks "Describe the stages of the SDLC." You must name all six stages AND describe what happens in each. Simply listing them will not get full marks.
Students often confuse the Implementation stage (installing and going live) with the Development stage (writing the code). These are two distinct stages.

Test Yourself

  1. Name three fact-finding techniques used during analysis and give one advantage of each.
  2. What does TELOS stand for? Describe each factor.
  3. What is the difference between functional and non-functional requirements?
2. Development Methodologies

Waterfall Model

The Waterfall model follows the SDLC stages in a strict linear sequence. Each stage must be completed before the next begins. There is no going back.

AdvantagesDisadvantages
Simple to understand and manageInflexible - cannot go back to previous stages easily
Well-documented at every stageClient does not see the product until late in the process
Works well when requirements are clear and fixedErrors found late are expensive to fix
Clear milestones and deliverablesNot suitable when requirements are likely to change

Agile / Iterative Model

The Agile approach breaks the project into small cycles called iterations (or sprints). Each iteration produces a working prototype that the client can review and give feedback on.

AdvantagesDisadvantages
Flexible - can adapt to changing requirementsCan lead to scope creep (project never finishes)
Client sees working software early and oftenLess documentation may cause problems later
Errors detected early through frequent testingRequires close collaboration with client throughout
Produces high-quality software through continuous refinementDifficult to estimate time and cost upfront

When to Use Each

  • Waterfall: safety-critical systems (medical, aviation), well-understood projects with fixed requirements, large government contracts
  • Agile: web/mobile apps, start-ups, projects where requirements are unclear or likely to evolve
A common 6-mark question is "Compare waterfall and agile methodologies." Give at least three points of comparison covering flexibility, client involvement, documentation, and suitability. Always link to a scenario if one is given.

Test Yourself

  1. Give two advantages and two disadvantages of the waterfall model.
  2. Explain why an agile approach would be more suitable for developing a mobile app.
  3. What is meant by "scope creep" and which methodology is more prone to it?
3. Testing

Types of Test Data

A thorough test plan uses three types of test data:

TypeDescriptionExample (field accepts 1-100)
NormalValid data the system should accept50, 25, 73
Abnormal (Erroneous)Invalid data the system should reject-5, "abc", 150
Boundary (Extreme)Values at the edge of valid ranges0, 1, 100, 101
For boundary testing, always test BOTH sides of the boundary. If a field accepts 1-100, test 0 (reject), 1 (accept), 100 (accept), and 101 (reject). The mark scheme specifically looks for values on both sides.

Testing Phases

PhaseDescription
Unit testingIndividual modules/components tested in isolation by developers
Integration testingModules combined and tested together to check interfaces work
System testingThe complete system tested as a whole against the requirements specification
Acceptance testingClient tests the system to confirm it meets their needs before signing off
Alpha testingTesting by the developers in-house, in a controlled environment
Beta testingTesting by a selected group of real users in a real environment, before final release

Validation vs Verification

Validation checks that the data entered is reasonable, sensible, and within allowed boundaries. It does NOT check if the data is correct - only that it is acceptable.

Verification checks that data has been accurately transferred from one stage to another (e.g. from a paper form into a database). Methods include double entry and proofreading (visual check).

Students constantly confuse validation and verification. Remember: validation = "Is this data reasonable?" Verification = "Has this data been entered correctly?" A date of birth of 01/01/2005 could pass validation (it is a valid date) but fail verification (the person's actual DOB might be 01/02/2005).

Types of Validation

TypeWhat It ChecksExample
Range checkValue falls within a specified rangeAge must be between 0 and 120
Type checkData is the correct data typeAge must be an integer, not text
Length checkData has correct number of charactersNI number must be exactly 9 characters
Format checkData matches a required patternPostcode must match pattern like BT1 1AA
Presence checkField has not been left emptySurname field must be filled in
Check digitA calculated digit used to detect transcription errorsLast digit of a barcode / ISBN

Test Yourself

  1. A field accepts values between 18 and 65. Give one example of normal, abnormal, and boundary test data.
  2. Explain the difference between alpha and beta testing.
  3. A user enters their email address. Which type of validation would be most appropriate?
4. Implementation Strategies

Four Changeover Methods

StrategyDescriptionAdvantagesDisadvantagesBest For
Direct changeover Old system stopped, new system started immediately Quick, cheap, no duplication of work Very risky - if new system fails there is no fallback Non-critical systems, simple replacements
Parallel running Both old and new systems run simultaneously for a period Safe - can fall back to old system if problems arise; outputs can be compared Expensive (double the work), staff must operate two systems Critical systems (e.g. payroll, banking)
Phased New system introduced in stages/modules over time Less risky, staff can learn gradually, problems isolated to one module Takes a long time, integration issues between old and new parts Large complex systems
Pilot New system trialled in one location/department first Problems identified on small scale before full rollout Pilot site may not be representative; takes time Multi-site organisations (e.g. retail chains, schools)
When asked to recommend a strategy for a given scenario, always justify your answer by linking to the context. For example: "Parallel running is suitable for the hospital's patient record system because patient data is critical and any errors could endanger lives."

Test Yourself

  1. Why would parallel running be unsuitable for a small business with limited staff?
  2. A supermarket chain wants to introduce a new EPOS system. Recommend and justify an implementation strategy.
  3. Give one advantage and one disadvantage of direct changeover.
5. Programming Concepts

Variables and Constants

A variable is a named storage location in memory whose value can change during program execution (e.g. score = 0).

A constant is a named storage location whose value is fixed when the program is written and cannot be changed during execution (e.g. VAT_RATE = 0.20).

Using constants makes code more readable and easier to maintain - if VAT changes, you only update one line.

Data Types

Data TypeDescriptionExample
IntegerWhole numbers (positive or negative)42, -7, 0
Real (Float)Numbers with decimal places3.14, -0.5, 99.9
StringSequence of characters"Hello", "BT1 5GS"
BooleanTrue or False onlyTrue, False
Character (Char)A single character'A', '7', '#'

Programming Constructs

Sequence

Instructions executed one after another in order, line by line. This is the default flow of any program.

Selection (IF / ELSE)

The program makes a decision based on a condition:

IF age >= 18 THEN
    OUTPUT "You can vote"
ELSE
    OUTPUT "Too young to vote"
END IF

Iteration (Loops)

FOR loop (count-controlled) - repeats a set number of times:

FOR i = 1 TO 10
    OUTPUT i
NEXT i

WHILE loop (condition-controlled) - repeats while a condition is true:

WHILE password != "secret"
    INPUT password
END WHILE

Arrays

An array is a data structure that stores multiple values of the same data type under one name. Each element is accessed by its index (position number).

// Declare an array of 5 names
names = ["Alice", "Bob", "Charlie", "Diana", "Eve"]
OUTPUT names[0]  // Outputs "Alice" (index starts at 0)
OUTPUT names[3]  // Outputs "Diana"
Remember that in most programming languages, array indices start at 0, not 1. So an array of 5 elements has indices 0, 1, 2, 3, 4.

Test Yourself

  1. What is the difference between a variable and a constant? Give an example of each.
  2. Write pseudocode to input 10 numbers and output the total.
  3. What data type would be most suitable for storing a telephone number? Explain why.
6. Object-Oriented Programming

Key OOP Concepts

ConceptDefinition
ClassA blueprint/template that defines the attributes (data) and methods (functions) that objects of that type will have
ObjectAn instance of a class - a specific example created from the blueprint
EncapsulationBundling data (attributes) and methods together inside a class, and hiding the internal details. Attributes are made private and accessed through public getter/setter methods
InheritanceA child (sub) class can inherit attributes and methods from a parent (super) class, then add or override its own. Promotes code reuse
PolymorphismObjects of different classes can respond to the same method call in different ways. E.g. a Shape class with a draw() method - Circle and Square each implement draw() differently
AbstractionHiding complex implementation details and showing only the essential features. Users interact with a simplified interface
CLASS Animal
    PRIVATE name
    PRIVATE sound

    CONSTRUCTOR(name, sound)
        THIS.name = name
        THIS.sound = sound
    END CONSTRUCTOR

    PUBLIC METHOD speak()
        OUTPUT THIS.name + " says " + THIS.sound
    END METHOD
END CLASS

CLASS Dog INHERITS Animal
    CONSTRUCTOR(name)
        SUPER(name, "Woof")
    END CONSTRUCTOR

    PUBLIC METHOD fetch()
        OUTPUT THIS.name + " fetches the ball"
    END METHOD
END CLASS

// Creating objects
myDog = NEW Dog("Rex")
myDog.speak()   // Outputs "Rex says Woof"
myDog.fetch()   // Outputs "Rex fetches the ball"
When explaining encapsulation, always mention that attributes are made PRIVATE and accessed through PUBLIC methods (getters/setters). This data hiding protects the internal state of the object from uncontrolled external access.

Test Yourself

  1. Explain the difference between a class and an object.
  2. Give a real-world example of inheritance in OOP.
  3. Why is encapsulation considered good programming practice?
7. Translators

Types of Translator

Computers can only execute machine code (binary). High-level and assembly language programs must be translated into machine code before execution.

TranslatorTranslates FromHow It WorksAdvantagesDisadvantages
Compiler High-level language Translates the entire source code into machine code in one go, producing an executable file Fast execution (pre-compiled); source code not needed at runtime; code is protected Slow to compile; must recompile after any change; compiler errors can be difficult to locate
Interpreter High-level language Translates and executes one line at a time; no executable file is created Easy debugging (stops at the exact error line); no compilation wait; good for development Slower execution (translates every time); source code must be present; source code is exposed
Assembler Assembly language Translates assembly language mnemonics (e.g. ADD, MOV) into machine code on a 1:1 basis Produces very efficient, fast code; direct hardware control Assembly is difficult to write; machine-specific (not portable)
Students often say "a compiler is faster than an interpreter." Be precise: a compiled PROGRAM runs faster, but the compilation PROCESS takes time. An interpreter starts executing immediately but runs slower overall.

Test Yourself

  1. Why might a developer use an interpreter during development but a compiler for the final release?
  2. What is an assembler and how does it differ from a compiler?
  3. Give two reasons why compiled code runs faster than interpreted code.
8. Design Tools

Pseudocode

Pseudocode is a structured way of writing algorithms using English-like statements. It is not tied to any programming language and focuses on logic.

INPUT mark
IF mark >= 50 THEN
    OUTPUT "Pass"
ELSE
    OUTPUT "Fail"
END IF

Flowcharts

Flowcharts use standard symbols to represent program logic visually:

SymbolShapeMeaning
TerminatorRounded rectangleStart or End
ProcessRectangleAn action or calculation
DecisionDiamondA yes/no question (selection)
Input/OutputParallelogramData input or output
Flow lineArrowDirection of flow

Data Flow Diagrams (DFDs)

DFDs show how data moves through a system. They use four symbols:

  • External entity (rectangle) - a source or destination of data outside the system
  • Process (rounded rectangle/circle) - transforms data
  • Data store (open-ended rectangle) - where data is held
  • Data flow (arrow) - the movement of data, labelled with the data name

Structure Charts

Structure charts show the hierarchical breakdown of a system into modules (top-down design). The main program is at the top, with sub-modules branching below.

Entity Relationship Diagrams (ERDs)

ERDs show the relationships between entities (tables) in a database. They display entities, attributes, and the cardinality of relationships (1:1, 1:M, M:M).

In CCEA exams, you may be asked to draw a flowchart or write pseudocode for a given scenario. Practise converting between the two. Make sure your flowcharts always have a start and end terminator.

Test Yourself

  1. Draw a flowchart to input a number and output whether it is positive, negative, or zero.
  2. Name the four symbols used in a DFD and explain what each represents.
  3. What is the purpose of a structure chart?
9. Types of Error

Three Types of Programming Error

Error TypeDescriptionExampleDetected By
Syntax error Breaking the rules (grammar) of the programming language. The program will NOT run. pritn("Hello") - misspelled keyword The compiler or interpreter at translation time
Logic error The program runs but produces incorrect results. The logic/algorithm is wrong. average = a + b / 2 instead of (a + b) / 2 Testing with known expected outputs; code review
Runtime error The program compiles but crashes during execution due to an unexpected condition. Division by zero; accessing an array index that does not exist; opening a file that does not exist Occurs during execution; use exception handling (try/catch)
Logic errors are the hardest to find because the program does not crash - it simply gives the wrong answer. Always test with data where you already know the expected result so you can spot logic errors.

Test Yourself

  1. Why are logic errors harder to detect than syntax errors?
  2. Give an example of a runtime error that could occur when reading from a file.
  3. Which type of error would a compiler detect?
10. Functions, Procedures & Modularity

Subroutines

A subroutine is a named block of code that performs a specific task. It can be called (invoked) from elsewhere in the program. There are two types:

Procedure

A procedure performs a task but does NOT return a value.

PROCEDURE greet(name)
    OUTPUT "Hello, " + name
END PROCEDURE

greet("Jackie")  // Outputs "Hello, Jackie"

Function

A function performs a task AND returns a value to the calling code.

FUNCTION calculateArea(length, width)
    area = length * width
    RETURN area
END FUNCTION

result = calculateArea(5, 3)  // result = 15

Parameters and Arguments

Parameters are the variable names listed in the subroutine definition. Arguments are the actual values passed when the subroutine is called.

Scope: Local vs Global Variables

ScopeDescriptionBest Practice
Local variableDeclared inside a subroutine; only accessible within that subroutinePreferred - avoids naming conflicts and unexpected side effects
Global variableDeclared outside all subroutines; accessible from anywhere in the programUse sparingly - can be changed by any part of the program, making debugging harder

Benefits of Modularity

  • Code can be reused - write once, call many times
  • Programs are easier to read and understand
  • Easier to debug and test individual modules
  • Enables team development - different programmers can work on different modules
  • Easier to maintain and update - changes in one module do not affect others
The mark scheme requires you to state that a function RETURNS a value while a procedure DOES NOT. This distinction is the most commonly tested point.

Test Yourself

  1. What is the key difference between a function and a procedure?
  2. Why are local variables preferred over global variables?
  3. Give three benefits of using modular programming.
11. Web Development

HTML Structure

HTML (HyperText Markup Language) provides the structure and content of a web page. It uses tags, attributes, and semantic elements to organise information.

Tags and Attributes

HTML elements are written with an opening tag, content, and a closing tag. Tags can have attributes that provide additional information (e.g. id, class, src, href).

<!-- Basic HTML document structure -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>My Page</title>
</head>
<body>
    <h1>Hello World</h1>
    <p class="intro">Welcome to my page.</p>
    <a href="https://example.com">Visit</a>
</body>
</html>

Semantic Elements

Semantic elements describe their meaning to both the browser and the developer, improving accessibility and SEO:

ElementPurpose
<header>Introductory content or navigation links at the top
<nav>Navigation links
<main>The main content of the page (one per page)
<article>Self-contained content (e.g. a blog post)
<section>Thematic grouping of content
<aside>Sidebar or tangentially related content
<footer>Footer content (copyright, contact info)

CSS (Cascading Style Sheets)

CSS controls the visual presentation of HTML elements - colours, fonts, layout, spacing, and responsiveness.

Selectors

SelectorSyntaxTargets
Elementp { }All <p> elements
Class.intro { }All elements with class="intro"
ID#header { }The element with id="header"
Descendantdiv p { }All <p> inside a <div>
Pseudo-classa:hover { }Links when hovered over

The Box Model

Every HTML element is treated as a rectangular box with four layers:

  • Content - the actual text/image
  • Padding - space between content and border
  • Border - the visible edge around the element
  • Margin - space between the border and neighbouring elements
.box {
    width: 200px;
    padding: 10px;
    border: 2px solid #333;
    margin: 20px;
}  /* Total width = 200 + 10*2 + 2*2 + 20*2 = 264px */

Flexbox Basics

Flexbox is a CSS layout model for arranging items in a row or column with flexible sizing:

.container {
    display: flex;
    justify-content: space-between; /* horizontal alignment */
    align-items: center;          /* vertical alignment */
    gap: 10px;
}

Responsive Design

Responsive design ensures web pages look good on all screen sizes. Key techniques:

  • Media queries - apply different CSS rules based on screen width
  • Relative units - use %, em, rem, vw instead of fixed px
  • Flexible images - max-width: 100% so images scale down
  • Viewport meta tag - <meta name="viewport" content="width=device-width, initial-scale=1.0">
/* Styles for screens narrower than 768px */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
}

JavaScript Basics

JavaScript is a programming language that adds interactivity and dynamic behaviour to web pages. It runs in the browser (client-side) or on a server (server-side with Node.js).

Variables and Functions

// Variables
let score = 0;          // can be reassigned
const MAX = 100;        // cannot be reassigned
var name = "Alice";     // older syntax, function-scoped

// Function declaration
function greet(name) {
    return "Hello, " + name;
}

// Arrow function (ES6)
const add = (a, b) => a + b;

DOM Manipulation

The DOM (Document Object Model) is a tree-like representation of the HTML page. JavaScript can access and modify any element:

// Selecting elements
let heading = document.getElementById("title");
let items = document.querySelectorAll(".item");

// Changing content and style
heading.textContent = "New Title";
heading.style.color = "red";

// Creating and appending elements
let newPara = document.createElement("p");
newPara.textContent = "Added dynamically";
document.body.appendChild(newPara);

Events

Events allow JavaScript to respond to user actions (clicks, key presses, form submissions):

let btn = document.getElementById("myBtn");

btn.addEventListener("click", function() {
    alert("Button clicked!");
});

// Common events: click, mouseover, keydown,
// submit, load, input, change

Client-Side vs Server-Side Scripting

Client-SideServer-Side
Runs onThe user's browserThe web server
LanguagesJavaScript (primarily)Python, PHP, Java, Node.js, C#
Used forForm validation, animations, DOM manipulation, interactive UIDatabase access, authentication, business logic, file processing
SecurityCode is visible to user (View Source); cannot be trusted for validation aloneCode is hidden from user; handles sensitive operations
SpeedFast - no server round trip neededRequires HTTP request/response cycle
Saying "client-side is insecure, so we only need server-side validation." In practice, you need BOTH: client-side for user experience, server-side for security.

Web Frameworks Overview

A web framework is a pre-written code library that provides structure and tools for building web applications faster:

TypeExamplesPurpose
Front-endReact, Angular, Vue.jsBuild interactive user interfaces with reusable components
Back-endDjango (Python), Express (Node.js), Flask (Python)Handle routing, database queries, authentication on the server
Full-stackNext.js, Ruby on RailsCombine front-end and back-end in a single framework
CSSBootstrap, Tailwind CSSPre-built responsive styles and UI components
When asked about web development, be specific about which language does what: HTML = structure, CSS = presentation, JavaScript = behaviour. The examiner expects this clear distinction.

Test Yourself

  1. Explain the purpose of semantic HTML elements and give three examples.
  2. Describe the CSS box model and explain how total width is calculated.
  3. Write JavaScript to select a button by its ID and add a click event listener.
  4. Compare client-side and server-side scripting with two differences.
  5. What is a web framework? Give one front-end and one back-end example.
AS2: Fundamentals of Digital Technology
1. Data Representation

Number Systems

SystemBaseDigits UsedUse
Binary20, 1How computers store all data internally
Denary (Decimal)100-9Everyday human counting system
Hexadecimal160-9, A-FShorthand for binary; colours (#FF0000); memory addresses; MAC addresses; error codes

Binary Place Values (8-bit)

1286432168421
2726252423222120

Binary to Denary

Add the place values where there is a 1. Example: 10110011 = 128 + 32 + 16 + 2 + 1 = 179

Denary to Binary

Subtract the largest place value that fits, put a 1 in that column, repeat. Example: 200 = 128+64+8 = 11001000

Binary to Hexadecimal

Split binary into groups of 4 bits (nibbles), convert each group. Example: 1010 1111 = A F = AF

Hexadecimal to Binary

Convert each hex digit to 4 binary digits. Example: 3C = 0011 1100 = 00111100

Binary Arithmetic

Binary Addition Rules

0+0=0, 0+1=1, 1+0=1, 1+1=10 (0 carry 1), 1+1+1=11 (1 carry 1)

Overflow

Overflow occurs when the result of a calculation is too large to be stored in the available number of bits. For example, adding two 8-bit numbers and getting a 9-bit result.

Two's Complement (Signed Integers)

Two's complement is a method for representing negative numbers in binary. The most significant bit (MSB) represents a negative value.

For 8-bit two's complement, the range is -128 to +127.

To convert a positive number to its negative equivalent:

  1. Write the positive number in binary
  2. Flip all bits (0 becomes 1, 1 becomes 0) - this is the one's complement
  3. Add 1 to the result

Example: -5 in 8-bit two's complement:

 5 = 00000101
Flip: 11111010
 +1 : 11111011  = -5

Floating Point Basics

Floating point representation stores real numbers using a mantissa (the significant digits) and an exponent (the power/position of the binary point).

  • Increasing the mantissa bits increases precision (more significant figures)
  • Increasing the exponent bits increases range (larger/smaller numbers)
Always show your working in binary conversion questions. Even if your final answer is wrong, you can pick up method marks for correct working.
When converting denary to hex, do NOT convert denary to hex directly. Convert denary to binary first, then binary to hex (or vice versa). This avoids mistakes.

Test Yourself

  1. Convert 11010110 from binary to denary and to hexadecimal.
  2. Represent -20 in 8-bit two's complement.
  3. What is the effect of increasing the number of bits in the mantissa of a floating point number?
2. Character Encoding

Character Sets

Character SetBits per CharacterCharactersDetails
ASCII7128Covers uppercase, lowercase, digits 0-9, punctuation, control characters. English only.
Extended ASCII8256Adds accented characters and symbols (e.g. e, n, (C)). Still limited to Western European languages.
UnicodeUp to 32Over 140,000Covers virtually every written language, including Chinese, Arabic, emoji. UTF-8 is the most common encoding (variable-length: 1-4 bytes).

Why Was Unicode Needed?

  • ASCII only supports 128 characters - not enough for non-Latin scripts
  • The internet is global - web pages need to display Chinese, Arabic, Cyrillic, etc.
  • Different countries had different extended character sets, causing compatibility issues
  • Unicode provides a single universal standard for all languages
A typical 4-mark question: "Explain why Unicode was developed." Hit these points: ASCII limited to 128/256 characters, only covers English/Western European, internet requires global character support, Unicode provides one universal standard.

Test Yourself

  1. How many characters can 7-bit ASCII represent? Show the calculation.
  2. Give two reasons why Unicode uses more storage space than ASCII.
  3. What is UTF-8 and why is it widely used on the web?
3. Image Representation

Bitmap Images

A bitmap image is made up of a grid of tiny dots called pixels. Each pixel is stored as a binary value representing its colour.

Key Terms

TermDefinitionEffect of Increasing
ResolutionThe number of pixels in the image (width x height), often measured in PPI (pixels per inch) or DPI (dots per inch)Higher quality, sharper image, but larger file size
Colour depthThe number of bits used to store the colour of each pixelMore colours available (2n colours), but larger file size

Calculating Bitmap File Size

File size (bits) = width (pixels) x height (pixels) x colour depth (bits)

Example: An image is 800 x 600 pixels with 24-bit colour depth.

File size = 800 x 600 x 24 = 11,520,000 bits
         = 11,520,000 / 8 = 1,440,000 bytes
         = 1,440,000 / 1024 = 1,406.25 KB
         = 1,406.25 / 1024 = 1.37 MB (approx)

Colour Depth Examples

Colour DepthColours Available
1 bit2 (black and white)
8 bits256
16 bits65,536
24 bits16,777,216 (true colour)
File size calculation questions are very common. Always show the formula first, then substitute values, then convert to appropriate units (bits to bytes: divide by 8, bytes to KB: divide by 1024, KB to MB: divide by 1024).

Test Yourself

  1. Calculate the file size in KB of a 1024 x 768 image with 8-bit colour depth.
  2. An image has a colour depth of 4 bits. How many different colours can it display?
  3. How could you reduce the file size of a bitmap without reducing resolution?
4. Sound Representation

How Sound Is Digitised

Sound is an analogue waveform. To store it digitally, an analogue-to-digital converter (ADC) takes regular samples of the sound wave's amplitude.

TermDefinitionEffect of Increasing
Sample rateHow many samples are taken per second, measured in Hz (e.g. CD quality = 44,100 Hz)More accurate representation of the original sound, but larger file
Bit depth (sample resolution)The number of bits used to store each sampleMore possible amplitude levels, finer detail, but larger file

Calculating Sound File Size

File size (bits) = sample rate x bit depth x duration (seconds) x number of channels

Example: 30 seconds of stereo audio, 44,100 Hz sample rate, 16-bit depth:

File size = 44,100 x 16 x 30 x 2 = 42,336,000 bits
         = 42,336,000 / 8 = 5,292,000 bytes
         = 5,292,000 / 1,024 = 5,168 KB
         = 5,168 / 1,024 = 5.05 MB
Do not forget the number of channels! Mono = 1 channel, stereo = 2 channels. If a question specifies stereo, you must multiply by 2.

Test Yourself

  1. Calculate the file size of a 10-second mono sound file recorded at 22,050 Hz with 8-bit depth.
  2. Why does increasing the sample rate improve sound quality?
  3. What sample rate and bit depth does CD-quality audio use?
5. Compression

Why Compress Files?

  • Reduce file size for faster transmission over networks
  • Reduce storage space required
  • Faster download/upload times
  • More files can fit on storage media

Two Types of Compression

LossyLossless
How it worksPermanently removes some data that is considered less important (e.g. sounds humans cannot hear)Finds patterns to encode data more efficiently; no data is lost
File sizeMuch smaller filesLarger than lossy but smaller than original
QualitySome quality loss (may not be noticeable)Original quality perfectly preserved
Reversible?No - original data cannot be recoveredYes - original file can be perfectly reconstructed
ExamplesJPEG (images), MP3 (audio), MP4 (video)PNG (images), FLAC (audio), ZIP (files)
Best forPhotos, music, video - where slight quality loss is acceptableText files, medical images, program files - where every bit matters

Run-Length Encoding (RLE)

Run-Length Encoding is a simple lossless compression technique. It replaces consecutive repeated values with a count and the value.

Example: AAAAABBBCCDDDDDD becomes 5A3B2C6D

RLE works well for images with large areas of the same colour but poorly for photographs with many colour variations.

Test Yourself

  1. Give two reasons why compression is needed.
  2. Why would lossy compression be unsuitable for a legal document?
  3. Apply run-length encoding to: WWWWBBBWWWWWWBBBB
6. CPU Architecture

Von Neumann Architecture

The Von Neumann architecture is the design used by most modern computers. Its key principle is that both program instructions and data are stored together in main memory and share the same bus.

CPU Components

ComponentFunction
ALU (Arithmetic Logic Unit)Performs all arithmetic calculations (add, subtract) and logical comparisons (AND, OR, NOT, greater than, equal to)
Control Unit (CU)Manages and coordinates all CPU operations. Decodes instructions, sends control signals to other components, manages the fetch-decode-execute cycle

Registers

RegisterFull NamePurpose
PCProgram CounterHolds the memory address of the NEXT instruction to be fetched
MARMemory Address RegisterHolds the address of the memory location currently being read from or written to
MDRMemory Data RegisterHolds the data that has just been read from memory or is about to be written to memory
CIRCurrent Instruction RegisterHolds the instruction currently being decoded and executed
AccumulatorAccumulatorStores the results of calculations performed by the ALU

Buses

BusPurposeDirection
Address busCarries memory addresses from CPU to memoryUnidirectional (CPU to memory only)
Data busCarries data between CPU and memory/I/O devicesBidirectional (both directions)
Control busCarries control signals (read/write, clock, interrupt, bus request)Bidirectional
When describing registers, always state EXACTLY what each holds. "The PC holds the address of the next instruction" is correct. "The PC stores instructions" is WRONG and will not get the mark.

Test Yourself

  1. What is the key feature of Von Neumann architecture?
  2. Name all five registers and state the purpose of each.
  3. Why is the address bus unidirectional?
7. Fetch-Decode-Execute Cycle

The Three Stages

FETCH

  1. The address in the PC is copied to the MAR
  2. The address is sent along the address bus to main memory
  3. The instruction stored at that address is transferred along the data bus to the MDR
  4. The instruction in the MDR is copied to the CIR
  5. The PC is incremented by 1 (to point to the next instruction)

DECODE

  1. The Control Unit decodes the instruction in the CIR
  2. It determines the type of instruction (arithmetic, data movement, branch, etc.) and what operands are needed

EXECUTE

  1. The instruction is carried out. This might involve:
    • The ALU performing a calculation
    • Data being read from or written to memory
    • The PC being changed (for a branch/jump instruction)

This cycle repeats continuously while the computer is running.

This is a very common 6-mark question. You MUST use the correct register names (PC, MAR, MDR, CIR) and mention the buses. Simply saying "the CPU fetches the instruction" is too vague.

Test Yourself

  1. Describe the steps in the fetch stage of the FDE cycle, naming all registers and buses used.
  2. What happens to the PC during the fetch stage?
  3. What is the role of the Control Unit during the decode stage?
8. Memory

RAM vs ROM

RAM (Random Access Memory)ROM (Read Only Memory)
Volatile?Yes - contents lost when power is offNo - contents retained without power
Read/Write?Can be read from and written toCan only be read from (not written to in normal use)
PurposeStores currently running programs and dataStores the BIOS/boot-up instructions
ContentsChange constantly as programs runPermanent - set during manufacture

Cache Memory

Cache is a small amount of very fast, expensive memory located on or near the CPU. It stores frequently and recently used instructions and data so the CPU can access them faster than from RAM.

  • L1 cache: smallest, fastest, located on the CPU core itself
  • L2 cache: larger, slightly slower, may be shared between cores
  • L3 cache: largest, slowest of the caches, shared between all cores

Virtual Memory

Virtual memory is a section of the hard drive that is used as if it were extra RAM when physical RAM is full. The OS swaps data between RAM and virtual memory as needed.

  • Advantage: Allows programs to run even when RAM is insufficient
  • Disadvantage: Much slower than RAM (HDD/SSD access speeds); excessive swapping causes disk thrashing, which dramatically slows the computer

Test Yourself

  1. Give three differences between RAM and ROM.
  2. Why is cache memory faster but smaller than RAM?
  3. Explain what happens when a computer uses virtual memory excessively.
9. CPU Performance Factors
FactorHow It Improves Performance
Clock speedMeasured in GHz. A higher clock speed means more instructions processed per second. E.g. 3.5 GHz = 3.5 billion cycles per second.
Number of coresEach core can process a separate instruction stream. A quad-core CPU can process 4 tasks simultaneously. However, not all software is written to use multiple cores effectively.
Cache sizeMore cache means more frequently used data can be stored close to the CPU, reducing the need to access slower RAM.
PipeliningOverlapping stages of the FDE cycle so that while one instruction is being executed, the next is being decoded, and the next is being fetched. Increases throughput.
Saying "more cores = faster" is an oversimplification. The software must be designed for parallel processing to benefit from multiple cores. A single-threaded program will only use one core.

Test Yourself

  1. Explain why doubling the number of cores does not always double performance.
  2. What is pipelining and how does it improve CPU performance?
  3. A user wants to improve their computer's performance. Suggest two hardware upgrades and explain how each would help.
10. Software Types

Categories of Software

System Software

System software manages the computer's hardware and provides a platform for application software to run. Includes the operating system and utility programs.

Application Software

TypeDescriptionExamples
General purposeOff-the-shelf software designed for common tasks, used by many different usersWord processor, spreadsheet, web browser, email client
Bespoke (custom)Software written specifically for one organisation's unique requirementsA hospital patient management system, a school's timetabling system

General purpose advantages: cheaper, available immediately, well tested, online support and tutorials

Bespoke advantages: tailored to exact needs, no unnecessary features, can provide competitive advantage

Bespoke disadvantages: expensive, takes time to develop, may contain bugs initially

Utility Software

Utility software performs specific maintenance or housekeeping tasks:

UtilityPurpose
AntivirusScans for and removes malware by comparing files against a database of known virus signatures
Disk defragmenterReorganises fragmented files on a HDD so they are stored in contiguous blocks, improving read speed. Not needed for SSDs.
Backup utilityCreates copies of files/system to protect against data loss. Supports full, incremental, and differential backups.
Compression utilityReduces file sizes for storage or transmission (e.g. ZIP, 7z)

Test Yourself

  1. What is the difference between system software and application software?
  2. Give two advantages of bespoke software over general purpose software.
  3. Why is disk defragmentation not needed on an SSD?
11. User Interfaces
InterfaceDescriptionAdvantagesDisadvantages
GUI (Graphical User Interface) Uses windows, icons, menus, and pointers (WIMP). Interact by clicking/touching. Intuitive, easy to learn, no commands to memorise Uses more system resources, slower for experts
CLI (Command Line Interface) User types text commands. No graphics. Fast for experts, uses fewer resources, can automate tasks with scripts, more precise control Steep learning curve, must memorise commands, easy to make errors
Menu-driven User selects options from lists/menus Easy to use, reduces errors, good for limited options (e.g. ATMs) Can be slow to navigate, limited flexibility
Natural language User speaks or types in everyday language (e.g. Siri, Alexa) Very easy and intuitive, accessible for people with disabilities Can misunderstand, limited to pre-programmed responses, requires significant processing power

Test Yourself

  1. Why might a network administrator prefer a CLI over a GUI?
  2. What type of interface would be most suitable for an ATM? Justify your answer.
  3. Give two advantages and two disadvantages of a natural language interface.
12. Operating Systems

Functions of an Operating System

An operating system (OS) is system software that manages computer hardware and provides services for application software. Key functions:

  • Processor management - scheduling processes, managing multitasking, allocating CPU time
  • Memory management - allocating RAM to programs, managing virtual memory, preventing programs accessing each other's memory space
  • File management - organising files in directories/folders, managing read/write permissions, handling file naming
  • I/O management - managing communication with peripheral devices through device drivers, handling print queues
  • User interface - providing the GUI/CLI for users to interact with the system
  • Security - user authentication (usernames/passwords), access control, encryption
  • Error handling - detecting and responding to hardware/software errors

Test Yourself

  1. Name and describe four functions of an operating system.
  2. Explain how the OS manages memory when multiple programs are running.
  3. Why does a computer need an operating system?
13. Device Drivers

A device driver is a small piece of system software that acts as a translator between the operating system and a hardware device.

  • Each hardware device needs its own specific driver
  • The driver converts the OS's general I/O commands into device-specific instructions
  • Without the correct driver, the OS cannot communicate with the device
  • Drivers must be updated to fix bugs, improve performance, or add features
  • Different operating systems require different drivers for the same device

Test Yourself

  1. What is a device driver?
  2. Why does a printer need a different driver on Windows than on macOS?
  3. What might happen if a device driver is out of date?
14. Embedded Systems

An embedded system is a computer system designed to perform a dedicated function within a larger device. It has a specific, fixed purpose and is usually programmed once.

Characteristics

  • Dedicated to one specific task
  • Built into the device it controls
  • Usually runs a simple, specialised OS (or no OS)
  • Low power consumption
  • Often operates in real-time
  • Difficult/impossible for end user to reprogram

Examples

Washing machine controller, car engine management system, traffic lights, smart thermostat, microwave oven, digital watch, fitness tracker, anti-lock braking system (ABS).

Test Yourself

  1. What is an embedded system? Give three examples.
  2. Give two characteristics that distinguish an embedded system from a general-purpose computer.
  3. Why are embedded systems usually programmed in low-level languages?
15. Data Transmission

Serial vs Parallel

SerialParallel
HowBits sent one at a time along a single wireMultiple bits sent simultaneously along multiple wires
SpeedSlower for short distancesFaster over short distances
DistanceSuitable for long distances (less interference)Only suitable for short distances (signal skew issues)
CostCheaper (fewer wires)More expensive (more wires)
ExamplesUSB, SATA, EthernetInternal data bus, old printer cables (IEEE 1284)

Direction of Transmission

ModeDescriptionExample
SimplexData flows in one direction onlyTV broadcast, keyboard to computer
Half-duplexData flows in both directions, but only one way at a timeWalkie-talkie, CB radio
Full-duplexData flows in both directions simultaneouslyTelephone call, broadband internet

Test Yourself

  1. Give two advantages of serial transmission over parallel for long distances.
  2. Explain the difference between half-duplex and full-duplex with examples.
  3. Why is parallel transmission prone to errors over long distances?
A2: Advanced Digital Technology
1. Relational Databases

Key Terminology

TermDefinition
Table (Entity/Relation)A structured collection of related data organised in rows and columns
Record (Row/Tuple)A single entry in a table representing one instance of the entity
Field (Column/Attribute)A single piece of data stored about each record
Primary keyA field (or combination of fields) that uniquely identifies each record in a table. Must be unique and not null.
Foreign keyA field in one table that links to the primary key of another table, creating a relationship between them
Composite keyA primary key made up of two or more fields combined (when no single field is unique on its own)

Entity Relationships

RelationshipDescriptionExample
One-to-One (1:1)One record in Table A relates to exactly one record in Table BOne person has one passport
One-to-Many (1:M)One record in Table A relates to many records in Table BOne teacher teaches many students
Many-to-Many (M:M)Many records in Table A relate to many records in Table BMany students take many subjects

Resolving M:M relationships: A many-to-many relationship cannot be directly implemented in a relational database. It must be broken down into two one-to-many relationships using a junction table (link entity) containing the foreign keys from both tables.

When drawing ERDs, always label the relationship lines with the cardinality (1:1, 1:M, M:M). The mark scheme will penalise ERDs without cardinality markers.

Test Yourself

  1. What is the difference between a primary key and a foreign key?
  2. A school database has Students and Subjects tables. Describe the relationship and explain how to resolve it.
  3. When would a composite key be needed? Give an example.
2. Normalisation

Why Normalise?

Normalisation is the process of organising a database to reduce data redundancy and eliminate anomalies. Without normalisation, you get:

  • Insertion anomaly - cannot add data without other unrelated data (e.g. cannot add a new course without a student enrolled)
  • Deletion anomaly - deleting a record unintentionally removes other useful data
  • Update anomaly - changing data in one place but not another leads to inconsistency

The Normal Forms

UNF (Unnormalised Form)

Data as it comes - may contain repeating groups and redundant data. A flat table with no structure.

1NF (First Normal Form)

Rules:

  • No repeating groups - each cell contains a single atomic value
  • Each record is unique (has a primary key)
  • All entries in a column are of the same data type

2NF (Second Normal Form)

Rules (must already be in 1NF plus):

  • No partial dependencies - every non-key field must depend on the WHOLE primary key, not just part of it
  • Only an issue when you have a composite key. If the primary key is a single field, a table in 1NF is automatically in 2NF.

3NF (Third Normal Form)

Rules (must already be in 2NF plus):

  • No transitive dependencies - no non-key field should depend on another non-key field
  • Every non-key field must depend on the primary key, the whole key, and nothing but the key

Worked Example

UNF - Student Orders table:

OrderIDStudentItems
001AlicePen, Ruler, Notebook
002BobPen, Calculator

Problem: Items field contains repeating groups.

1NF - Remove repeating groups:

OrderID*ItemName*Student
001PenAlice
001RulerAlice
001NotebookAlice
002PenBob
002CalculatorBob

Composite key: (OrderID, ItemName). Student depends only on OrderID (partial dependency).

2NF - Remove partial dependencies:

Orders table: OrderID, Student

OrderItems table: OrderID*, ItemName*

The normalisation question often carries 8-10 marks. You MUST show the tables at each stage (UNF, 1NF, 2NF, 3NF) with primary keys underlined and foreign keys marked. State the rule being applied at each step.
Students often jump straight to 3NF without showing their working at each stage. You must show the progression through each normal form to get full marks.

Test Yourself

  1. What is a transitive dependency? Give an example.
  2. Explain the three types of data anomaly with examples.
  3. If a table has a single-field primary key, can it have partial dependencies? Explain why.
3. SQL

Data Manipulation Language (DML)

SELECT - Retrieving Data

SELECT FirstName, Surname, Mark
FROM Students
WHERE Mark >= 50
ORDER BY Mark DESC;

Use * to select all fields: SELECT * FROM Students;

INSERT - Adding Records

INSERT INTO Students (StudentID, FirstName, Surname, Mark)
VALUES (101, 'Jackie', 'Hughes', 95);

UPDATE - Modifying Records

UPDATE Students
SET Mark = 85
WHERE StudentID = 101;

DELETE - Removing Records

DELETE FROM Students
WHERE Mark < 30;
Forgetting the WHERE clause on UPDATE or DELETE will affect ALL records in the table! DELETE FROM Students; would delete every student.

WHERE Clause Operators

OperatorMeaningExample
=Equal toWHERE Year = 12
<> or !=Not equal toWHERE Status <> 'Inactive'
>, <, >=, <=ComparisonWHERE Mark >= 40
BETWEENRange (inclusive)WHERE Mark BETWEEN 40 AND 70
LIKEPattern matchingWHERE Surname LIKE 'Mc%'
INMatch any in a listWHERE Year IN (12, 13, 14)
AND, OR, NOTLogical operatorsWHERE Mark > 50 AND Year = 13

Wildcards

% matches any number of characters. _ matches exactly one character.

  • LIKE 'B%' - starts with B
  • LIKE '%son' - ends with son
  • LIKE '%an%' - contains an
  • LIKE '_a%' - second character is a

Aggregate Functions

FunctionPurposeExample
COUNT()Counts the number of recordsSELECT COUNT(*) FROM Students;
SUM()Adds up values in a columnSELECT SUM(Mark) FROM Students;
AVG()Calculates the averageSELECT AVG(Mark) FROM Students;
MAX()Finds the highest valueSELECT MAX(Mark) FROM Students;
MIN()Finds the lowest valueSELECT MIN(Mark) FROM Students;

JOIN (Combining Tables)

An INNER JOIN combines rows from two tables where there is a matching value in both:

SELECT Students.FirstName, Courses.CourseName
FROM Students
INNER JOIN Enrolments ON Students.StudentID = Enrolments.StudentID
INNER JOIN Courses ON Enrolments.CourseID = Courses.CourseID
WHERE Courses.CourseName = 'Digital Technology';
In SQL questions, always use the correct syntax with semicolons. When joining tables, specify which table each field belongs to using dot notation (TableName.FieldName) to avoid ambiguity.

Test Yourself

  1. Write SQL to find all students with a surname starting with 'O' who scored above 70.
  2. Write SQL to calculate the average mark for Year 13 students.
  3. What is the purpose of a JOIN and when is it needed?
4. Networks

Types of Network

TypeDescriptionExample
LAN (Local Area Network)Covers a small geographical area, typically one building/site. Hardware owned by the organisation.School network, office network
WAN (Wide Area Network)Covers a large geographical area. Uses third-party communication links (e.g. telephone lines, satellites).The internet, a company connecting offices in different cities
PAN (Personal Area Network)Very small network around an individual, typically within a few metres.Bluetooth connection between phone and wireless earbuds

Network Topologies

TopologyDescriptionAdvantagesDisadvantages
Star All devices connected to a central switch/hub If one cable fails only that device is affected; easy to add devices; good performance (no collisions with switch) Central switch is a single point of failure; more cabling needed
Bus All devices connected to a single backbone cable with terminators at each end Cheap, easy to install, uses less cable If backbone fails the whole network goes down; performance degrades with more devices; difficult to troubleshoot
Ring Devices connected in a circular loop; data travels in one direction around the ring Equal access for all devices; performs well under heavy load If one device or cable fails the whole network can go down; difficult to add new devices
Mesh Every device connected to every other device (full mesh) or most other devices (partial mesh) Very reliable (multiple paths); if one connection fails data takes another route Very expensive; complex to set up; requires many cables/connections

Client-Server vs Peer-to-Peer

Client-ServerPeer-to-Peer
StructureDedicated server provides resources; clients make requestsAll computers are equal; each can act as client or server
SecurityCentralised security, user accounts managed on serverEach computer manages its own security - less secure
BackupCentralised backup on serverEach computer must be backed up individually
CostExpensive (server hardware, specialist staff)Cheaper (no dedicated server)
Best forSchools, businesses, large organisationsSmall offices, home networks, file sharing

Test Yourself

  1. Give three differences between a LAN and a WAN.
  2. Why is a star topology the most commonly used in schools?
  3. In what situation would a peer-to-peer network be more appropriate than client-server?
5. Network Hardware
DeviceFunction
RouterForwards data packets between different networks. Uses IP addresses to determine the best route for packets. Connects a LAN to the internet (WAN).
SwitchConnects devices within a LAN. Learns MAC addresses of connected devices and forwards data only to the intended recipient, reducing unnecessary traffic.
HubA basic device that connects multiple devices in a LAN. Broadcasts all data to every connected device (unlike a switch). Largely obsolete.
NIC (Network Interface Card)Hardware component that allows a device to connect to a network. Each NIC has a unique MAC address. Can be wired (Ethernet) or wireless (Wi-Fi).
WAP (Wireless Access Point)Allows wireless devices to connect to a wired network. Broadcasts a Wi-Fi signal that devices can connect to.
ModemMOdulator-DEModulator. Converts digital data to analogue signals (and vice versa) for transmission over telephone lines.
Students often confuse switches and hubs. A switch is intelligent - it learns MAC addresses and sends data only to the correct port. A hub is "dumb" - it broadcasts everything to all ports, wasting bandwidth.

Test Yourself

  1. What is the difference between a switch and a hub?
  2. Explain the role of a router in connecting a school network to the internet.
  3. Why does every NIC have a unique MAC address?
6. Protocols

What Is a Protocol?

A protocol is a set of rules that govern how data is transmitted and received across a network. Protocols ensure devices from different manufacturers can communicate.

Common Protocols

ProtocolPurpose
TCP/IPTransmission Control Protocol / Internet Protocol. The fundamental protocol suite of the internet. TCP breaks data into packets and ensures reliable delivery; IP handles addressing and routing.
HTTPHyperText Transfer Protocol. Used to transfer web pages from a web server to a browser. Data is unencrypted.
HTTPSHTTP Secure. Same as HTTP but with SSL/TLS encryption. Used for secure transactions (banking, login pages). Shown by padlock icon in browser.
FTPFile Transfer Protocol. Used to upload/download files to/from a server. Supports authentication (username/password).
SMTPSimple Mail Transfer Protocol. Used to SEND emails from a client to a mail server, and between mail servers.
POP3Post Office Protocol v3. Used to RECEIVE emails. Downloads emails to the device and typically deletes them from the server. Emails only available on one device.
IMAPInternet Message Access Protocol. Used to RECEIVE emails. Keeps emails on the server and syncs across multiple devices. Preferred for modern use.

TCP/IP Layers Model

LayerNameFunctionProtocols
4ApplicationProvides network services directly to user applicationsHTTP, FTP, SMTP, POP3, IMAP
3TransportEnsures reliable end-to-end delivery; breaks data into segmentsTCP, UDP
2InternetHandles addressing and routing of packets across networksIP
1Network Access (Link)Handles the physical transmission of data on the network mediumEthernet, Wi-Fi
Know the difference between POP3 and IMAP - this is a commonly tested comparison. POP3 downloads and deletes from server (one device); IMAP keeps on server and syncs (multiple devices).

Test Yourself

  1. What is the difference between HTTP and HTTPS?
  2. Explain why IMAP is more suitable than POP3 for a user who accesses email on multiple devices.
  3. Name the four layers of the TCP/IP model and give one protocol from each layer.
7. Internet Technologies

Addressing

TypeDescriptionExample
IP addressA unique numerical address assigned to every device on a network. IPv4 uses 32 bits (4 octets). IPv6 uses 128 bits.192.168.1.1 (IPv4)
MAC addressA unique physical address burned into the NIC by the manufacturer. 48 bits, written as 6 pairs of hex digits. Cannot be changed (in normal use).A1:B2:C3:D4:E5:F6

DNS (Domain Name System)

DNS translates human-readable domain names (e.g. www.google.com) into IP addresses (e.g. 142.250.187.46) that computers use to locate servers.

  1. User types a URL into the browser
  2. Browser checks its local cache for the IP address
  3. If not found, a request is sent to the DNS server
  4. DNS server looks up the domain name and returns the corresponding IP address
  5. Browser uses the IP address to connect to the web server

Packet Switching

Data is broken into small packets before being sent across a network. Each packet contains:

  • Header: source IP address, destination IP address, packet sequence number, total number of packets
  • Payload: the actual data being transmitted
  • Trailer: error checking data (e.g. checksum)

Packets may take different routes across the network and arrive out of order. The receiving device uses the sequence numbers to reassemble them in the correct order. Missing or corrupt packets are re-requested.

Test Yourself

  1. What is the purpose of DNS?
  2. Explain how packet switching works, describing the contents of a packet.
  3. Give two differences between an IP address and a MAC address.
8. Error Detection Methods
MethodHow It WorksLimitation
Parity bitAn extra bit is added to make the total number of 1s either even (even parity) or odd (odd parity). If the parity does not match on arrival, an error is detected.Cannot detect errors where an even number of bits are flipped (e.g. 2 bits change)
ChecksumA mathematical value calculated from the data before sending. The same calculation is performed at the receiving end. If the values do not match, there is an error.Different errors can produce the same checksum (though unlikely)
Check digitAn extra digit added to a number (e.g. barcode, ISBN) calculated from the other digits using a formula. Used to detect transcription errors.Cannot detect all transposition errors
Echo checkThe receiver sends the data back to the sender, who compares it with the original. If they differ, the data is resent.Doubles the amount of data transmitted; slow

Important distinction: These methods detect errors but do not correct them. If an error is detected, the data must be retransmitted.

Test Yourself

  1. Explain how a parity bit can detect a single-bit error.
  2. Why can a parity check not detect all errors?
  3. Where would you find a check digit in everyday life? Give two examples.
9. Cloud Computing

Service Models

ModelWhat You GetWhat You ManageExample
SaaS (Software as a Service)Complete application accessed via a web browserNothing - the provider manages everythingGoogle Docs, Office 365, Gmail, Salesforce
PaaS (Platform as a Service)Platform/environment for developing and deploying applicationsYour applications and dataGoogle App Engine, Microsoft Azure, Heroku
IaaS (Infrastructure as a Service)Virtual servers, storage, and networking resourcesOS, applications, data, middlewareAmazon Web Services (AWS), Microsoft Azure VMs

Advantages of Cloud Computing

  • Access files from anywhere with an internet connection
  • No need to buy/maintain expensive hardware
  • Scalable - can increase/decrease resources as needed
  • Automatic backups and updates managed by provider
  • Enables easy collaboration on shared documents

Disadvantages of Cloud Computing

  • Requires a reliable internet connection
  • Data stored on third-party servers - security and privacy concerns
  • Ongoing subscription costs can add up
  • Less control over data - dependent on the provider
  • Potential data sovereignty issues (data stored in another country)

Test Yourself

  1. Explain the difference between SaaS, PaaS, and IaaS with an example of each.
  2. Why might a school choose cloud-based software over locally installed software?
  3. Give two security concerns associated with cloud computing.
9b. Cloud Computing (In-Depth)

Deployment Models

ModelDescriptionUse Case
Public cloudResources shared among multiple organisations over the internet, owned by a third-party providerSmall businesses, startups, web hosting (e.g. AWS, Google Cloud, Microsoft Azure)
Private cloudDedicated infrastructure for a single organisation, hosted on-premises or by a providerBanks, government, healthcare - where data privacy is critical
Hybrid cloudCombination of public and private cloud; data and applications can move between themOrganisations that need flexibility - sensitive data on private, general workloads on public
Community cloudShared infrastructure for organisations with common concerns (e.g. security, compliance)Government departments, universities in a consortium, healthcare networks

Service Models Compared

IaaSPaaSSaaS
You manageOS, middleware, applications, dataApplications and data onlyNothing - just use the application
Provider managesServers, storage, networking, virtualisationPlus OS, middleware, runtimeEverything
FlexibilityHighest - full control over software stackMedium - focus on app developmentLowest - use as-is
ExamplesAWS EC2, Azure VMs, Google Compute EngineHeroku, Google App Engine, Azure App ServiceGmail, Office 365, Salesforce, Dropbox
AnalogyRenting an empty building - you furnish itRenting a furnished kitchen - you cookEating at a restaurant - everything done for you

Virtualisation

Virtualisation creates virtual versions of physical resources (servers, storage, networks), allowing multiple virtual machines to run on a single physical server.

Hypervisors

A hypervisor is software that creates and manages virtual machines:

Type 1 (Bare-metal)Type 2 (Hosted)
Runs directly on hardwareRuns on top of an existing OS
Better performanceEasier to set up
Used in data centres and enterpriseUsed for development and testing
Examples: VMware ESXi, Microsoft Hyper-VExamples: VirtualBox, VMware Workstation

Virtual Machines vs Containers

Virtual Machine (VM)Container
IncludesFull OS + application + librariesApplication + libraries only (shares host OS kernel)
SizeGigabytesMegabytes
Startup timeMinutesSeconds
IsolationStrong - separate OSLighter isolation - shares kernel
Use caseRunning different OSes, legacy applicationsMicroservices, rapid deployment, scaling
ExamplesVMware, Hyper-V, VirtualBoxDocker, Kubernetes (orchestration)

Scalability and Elasticity

ConceptDefinitionExample
ScalabilityThe ability to increase resources to handle growing demandAdding more server capacity as user numbers grow
Vertical scaling (scale up)Adding more power to an existing server (more CPU, RAM)Upgrading a database server from 16GB to 64GB RAM
Horizontal scaling (scale out)Adding more servers to distribute the loadAdding web servers behind a load balancer during peak traffic
ElasticityAutomatically scaling resources up or down based on real-time demandAn e-commerce site automatically adding servers on Black Friday and removing them after

Cloud Security Considerations

  • Data sovereignty - data may be stored in a different country, subject to that country's laws
  • Shared responsibility model - the provider secures the infrastructure; the customer secures their data and applications
  • Encryption - data should be encrypted both at rest and in transit
  • Multi-tenancy risks - multiple customers share the same physical infrastructure
  • Compliance - organisations must ensure cloud providers meet regulatory requirements (e.g. GDPR)
  • Vendor lock-in - difficulty migrating data/applications between providers
Saying "the cloud is insecure." Cloud providers often have better security than individual organisations. The real issue is the SHARED RESPONSIBILITY - both provider and customer have security obligations.

Test Yourself

  1. Compare public, private, and hybrid cloud deployment models.
  2. Explain the difference between a virtual machine and a container.
  3. What is the difference between scalability and elasticity?
  4. Describe the shared responsibility model in cloud security.
  5. What is a hypervisor? Compare Type 1 and Type 2.
10. Artificial Intelligence

Expert Systems

An expert system is a computer program that mimics the decision-making of a human expert in a specific domain. It has three components:

ComponentFunction
Knowledge baseStores facts and rules about the domain, usually as IF-THEN rules. Built from interviewing human experts.
Inference engineApplies logical rules to the knowledge base to deduce new information and reach conclusions. Uses forward chaining (data-driven) or backward chaining (goal-driven).
User interfaceAllows the user to input data and receive explanations/recommendations from the system.

Examples: medical diagnosis, fault diagnosis in machinery, financial advice, mineral prospecting.

Turing Test

The Turing Test, proposed by Alan Turing in 1950, tests whether a machine can exhibit intelligent behaviour indistinguishable from a human. A human interrogator communicates with both a machine and a human via text. If the interrogator cannot reliably tell which is the machine, the machine is said to have passed the test.

Machine Learning

Machine learning is a branch of AI where systems learn from data to improve performance without being explicitly programmed. The system identifies patterns in training data and uses them to make predictions or decisions on new data.

  • Supervised learning: trained on labelled data (input-output pairs)
  • Unsupervised learning: finds patterns in unlabelled data (clustering, associations)

Neural Networks

Artificial neural networks are computing systems inspired by the structure of the human brain. They consist of layers of interconnected nodes (artificial neurons). Data passes through input, hidden, and output layers. Used for image recognition, speech recognition, and natural language processing.

Natural Language Processing (NLP)

NLP enables computers to understand, interpret, and generate human language. Applications include: chatbots, voice assistants (Siri, Alexa), translation services, sentiment analysis.

Test Yourself

  1. Name and describe the three components of an expert system.
  2. Describe how the Turing Test works.
  3. Give two applications of machine learning in everyday life.
11. Security

Encryption

Encryption converts plaintext data into unreadable ciphertext using an algorithm and a key. Only someone with the correct key can decrypt it.

Symmetric EncryptionAsymmetric Encryption
KeysSame key used to encrypt and decryptTwo keys: a public key (encrypts) and a private key (decrypts)
SpeedFastSlower (more complex mathematics)
Key distributionProblem: how to securely share the key?Public key can be shared openly; only the private key must be kept secret
ExamplesAES, DESRSA
Used forEncrypting stored data, bulk dataSecure key exchange, digital signatures, HTTPS

Other Security Measures

MeasureDescription
FirewallMonitors and controls incoming/outgoing network traffic based on security rules. Can block unauthorised access while permitting legitimate traffic.
AuthenticationVerifying the identity of a user. Methods include: password, two-factor authentication (2FA), multi-factor authentication (MFA).
BiometricsUsing unique physical characteristics for authentication: fingerprint, facial recognition, iris scan, voice recognition. Difficult to forge but expensive and raises privacy concerns.
Physical securityLocks, CCTV, security guards, cable locks for laptops, restricted access areas, visitor logs.
Access controlDefining permissions for different users/groups. Principle of least privilege: users only get the minimum access needed for their role.

Test Yourself

  1. Explain the difference between symmetric and asymmetric encryption.
  2. How does a firewall protect a network?
  3. Give two advantages and one disadvantage of biometric authentication.
12. Cyber Threats
ThreatDescriptionPrevention
PhishingFraudulent emails/messages that appear legitimate, tricking users into revealing personal data or clicking malicious linksStaff training, email filters, checking sender addresses, not clicking suspicious links
MalwareMalicious software including viruses (attach to files, spread when executed), worms (self-replicate across networks), trojans (disguised as legitimate software), ransomware (encrypts files, demands payment), spyware (monitors user activity)Antivirus software, keep OS updated, do not download from untrusted sources
SQL injectionAttacker enters malicious SQL code into a web form input field to manipulate the database (e.g. ' OR 1=1 --)Input validation/sanitisation, parameterised queries, prepared statements
DDoSDistributed Denial of Service. Multiple compromised computers flood a server with traffic, making it unavailable to legitimate usersTraffic filtering, rate limiting, DDoS protection services, redundant servers
Social engineeringManipulating people into revealing confidential information through deception (pretexting, baiting, tailgating)Staff awareness training, verification procedures, security policies
Brute force attackSystematically trying every possible combination of passwords until the correct one is foundAccount lockout after failed attempts, CAPTCHA, strong password policies, 2FA
When asked about preventing threats, always give SPECIFIC measures related to the threat described. Generic answers like "use a firewall" will not gain marks for a phishing question.

Test Yourself

  1. Explain how an SQL injection attack works and how it can be prevented.
  2. What is the difference between a virus and a worm?
  3. Describe three measures to protect against a brute force attack.
12b. Cybersecurity Threats (In-Depth)

Malware Types in Detail

Malware TypeHow It WorksKey Characteristics
VirusAttaches to a legitimate file or program; activates when the host file is executedRequires human action to spread; can corrupt/delete files
WormSelf-replicates across networks without human interactionExploits network vulnerabilities; consumes bandwidth; can carry payloads
TrojanDisguised as legitimate software; creates a backdoor once installedDoes NOT self-replicate; relies on user downloading/installing it
RansomwareEncrypts victim's files and demands payment (usually cryptocurrency) for the decryption keyOften spread via phishing emails; examples: WannaCry, NotPetya
SpywareSecretly monitors user activity - keystrokes, browsing habits, login credentialsOften bundled with free software; includes keyloggers
AdwareDisplays unwanted advertisements, often as pop-ups or browser redirectsMay collect browsing data; slows down system; often bundled with freeware
RootkitHides deep in the OS to give an attacker persistent, privileged accessExtremely difficult to detect; may survive reinstallation; modifies OS components

Social Engineering Attacks

Social engineering exploits human psychology rather than technical vulnerabilities to gain access to systems or data.

AttackDescriptionExample
PhishingMass emails impersonating a trusted organisation to trick users into revealing credentials or clicking malicious linksFake bank email asking you to "verify your account"
Spear phishingTargeted phishing aimed at a specific individual, using personal details to appear credibleEmail to a company CEO referencing their recent conference talk
VishingVoice phishing - fraudulent phone calls impersonating banks, tech support, or authoritiesCaller claims to be from Microsoft saying your PC has a virus
BaitingLeaving infected media (e.g. USB drives) in public places hoping someone will plug them inUSB labelled "Salary Report 2025" left in a company car park
PretextingCreating a fabricated scenario (pretext) to gain trust and extract informationAttacker calls IT helpdesk posing as a new employee who forgot their password

Advanced Attack Types

DDoS Attack (Distributed Denial of Service)

A DDoS attack uses a botnet (network of compromised computers) to flood a target server with traffic, overwhelming it and making it unavailable. The attack is "distributed" because it comes from thousands of sources simultaneously, making it hard to block.

  • Volumetric attacks: flood bandwidth (e.g. UDP flood)
  • Protocol attacks: exploit weaknesses in network protocols (e.g. SYN flood)
  • Application layer attacks: target specific services (e.g. HTTP flood)

SQL Injection

SQL injection exploits web forms that pass user input directly into SQL queries without sanitisation:

-- Vulnerable query:
SELECT * FROM users WHERE username = ' + input + ';

-- Attacker enters:  ' OR 1=1 --
-- Resulting query:
SELECT * FROM users WHERE username = '' OR 1=1 --'
-- This returns ALL rows because 1=1 is always true

-- Prevention: use parameterised queries
SELECT * FROM users WHERE username = ?;

Cross-Site Scripting (XSS)

XSS occurs when an attacker injects malicious JavaScript into a web page viewed by other users. The script runs in the victim's browser with the same permissions as the legitimate site.

  • Stored XSS: malicious script is permanently stored on the server (e.g. in a forum post)
  • Reflected XSS: script is embedded in a URL and reflected back by the server

Prevention: input validation, output encoding, Content Security Policy (CSP) headers.

Man-in-the-Middle (MitM) Attack

The attacker secretly intercepts and potentially alters communication between two parties who believe they are communicating directly. Common on unsecured Wi-Fi networks.

Prevention: HTTPS/TLS encryption, certificate pinning, VPN usage, avoiding public Wi-Fi for sensitive transactions.

Zero-Day Exploit

A zero-day exploit targets a software vulnerability that is unknown to the vendor - meaning there are "zero days" of available patches. These are extremely dangerous because no fix exists when the attack occurs.

Mitigation: defence in depth, intrusion detection systems, regular software updates, threat intelligence sharing.

Brute Force Attacks

Systematically trying every possible password combination. Variants include:

  • Dictionary attack: tries common words and known passwords from leaked databases
  • Credential stuffing: uses username/password pairs stolen from one site on other sites
  • Rainbow table attack: uses pre-computed hash values to reverse-engineer passwords

Prevention: account lockout, CAPTCHA, rate limiting, strong password policies, salted hashing, multi-factor authentication.

When comparing attack types, focus on the MECHANISM (how it works) and whether it targets people (social engineering) or systems (technical exploit). The examiner wants you to show understanding, not just name the attack.

Test Yourself

  1. Explain the difference between a virus, worm, and trojan.
  2. How does spear phishing differ from standard phishing?
  3. Describe how a cross-site scripting (XSS) attack works and give one prevention method.
  4. What makes a zero-day exploit particularly dangerous?
  5. Explain how a man-in-the-middle attack can be prevented.
12c. Network Security (In-Depth)

Firewalls

A firewall monitors and controls network traffic based on predefined security rules. There are several types:

Firewall TypeHow It WorksStrengths / Weaknesses
Packet filteringExamines each packet's header (source/destination IP, port number) and allows or blocks based on rulesFast and simple but cannot inspect packet contents; vulnerable to IP spoofing
Stateful inspectionTracks the state of active connections and makes decisions based on context (not just individual packets)More secure than packet filtering; understands connection state; slightly slower
Proxy firewallActs as an intermediary between internal and external networks; inspects full packet content at the application layerCan filter specific content (e.g. block certain websites); hides internal network; slower due to deep inspection

Intrusion Detection and Prevention Systems

IDS (Intrusion Detection System)IPS (Intrusion Prevention System)
FunctionMonitors network traffic for suspicious activity and alerts administratorsMonitors AND automatically takes action to block threats
ResponsePassive - generates alerts onlyActive - can drop packets, block IP addresses, reset connections
PlacementMonitors a copy of network trafficSits inline with network traffic
Detection methodsSignature-based (matches known attack patterns) or anomaly-based (detects deviations from normal behaviour)

VPNs (Virtual Private Networks)

A VPN creates an encrypted tunnel between a device and a remote server, protecting data from interception on untrusted networks.

How VPNs Work

  1. The VPN client on the user's device encrypts all outgoing data
  2. Encrypted data travels through a tunnel to the VPN server
  3. The VPN server decrypts the data and forwards it to the destination
  4. Responses return through the same encrypted tunnel

Tunnelling Protocols

ProtocolDescription
IPSecEncrypts at the network layer; widely used for site-to-site VPNs; strong security
SSL/TLSEncrypts at the transport layer; used for browser-based VPNs; easier to set up
OpenVPNOpen-source protocol using SSL/TLS; highly configurable; widely supported
WireGuardModern protocol; faster and simpler codebase; strong cryptography

Penetration Testing

Penetration testing (pen testing) is the authorised simulation of a cyber attack to identify vulnerabilities before real attackers exploit them. Stages include: reconnaissance, scanning, exploitation, reporting.

Hacking Classifications

TypeIntentLegality
White hatEthical hackers who test systems with permission to find and fix vulnerabilitiesLegal - authorised by the system owner
Grey hatFind vulnerabilities without permission but without malicious intent; may notify the ownerLegally questionable - no authorisation given
Black hatExploit systems for personal gain, theft, or damageIllegal - violates Computer Misuse Act 1990

Security Policies

A security policy is a formal document that defines an organisation's rules and procedures for protecting its information systems. It should cover:

  • Acceptable use of IT resources
  • Password requirements (length, complexity, change frequency)
  • Data classification and handling procedures
  • Incident response procedures
  • Backup and disaster recovery plans
  • Employee training requirements

Access Control Models

ModelHow It WorksExample
DAC (Discretionary Access Control)The resource owner decides who has access; permissions can be granted/revoked by the ownerFile sharing on Windows - the file owner sets read/write permissions
MAC (Mandatory Access Control)Access determined by security labels/clearance levels set by a central authority; users cannot change permissionsMilitary systems - "Top Secret", "Secret", "Confidential" classification levels
RBAC (Role-Based Access Control)Permissions assigned to roles, not individuals; users are assigned to rolesHospital system - "Doctor" role can view patient records, "Receptionist" role cannot

Biometric Authentication

Biometric authentication uses unique physical or behavioural characteristics to verify identity:

  • Physiological: fingerprint, facial recognition, iris/retina scan, hand geometry
  • Behavioural: voice recognition, typing rhythm, gait analysis
AdvantagesDisadvantages
Cannot be forgotten or lost (unlike passwords/cards)Expensive to implement
Difficult to forge or sharePrivacy concerns - biometric data is permanent
Convenient for usersFalse positives/negatives can occur
Provides strong non-repudiationIf compromised, biometric data cannot be changed (unlike a password)
For network security questions, always link the security measure to the specific threat it addresses. For example: "A VPN prevents man-in-the-middle attacks by encrypting data in transit."

Test Yourself

  1. Compare packet filtering and stateful inspection firewalls.
  2. What is the difference between an IDS and an IPS?
  3. Explain how a VPN protects data on a public Wi-Fi network.
  4. Describe the three hacker classifications and their legality.
  5. Compare DAC, MAC, and RBAC access control models with an example of each.
13. Legislation

Data Protection Act 2018 / UK GDPR

Controls how personal data is collected, stored, used, and shared by organisations.

The 7 Principles

  1. Lawfulness, fairness and transparency - data processed lawfully, fairly, and transparently
  2. Purpose limitation - collected for specified, explicit purposes only
  3. Data minimisation - only collect data that is necessary
  4. Accuracy - data must be accurate and kept up to date
  5. Storage limitation - not kept longer than necessary
  6. Integrity and confidentiality - processed securely, protected against unauthorised access
  7. Accountability - the data controller must demonstrate compliance

Individual Rights

  • Right to be informed about data collection
  • Right of access (Subject Access Request)
  • Right to rectification (correction of inaccurate data)
  • Right to erasure ("right to be forgotten")
  • Right to restrict processing
  • Right to data portability
  • Right to object to processing

Computer Misuse Act 1990

Three offences:

  1. Unauthorised access to computer material - e.g. guessing someone's password to access their account. Up to 2 years in prison.
  2. Unauthorised access with intent to commit further offences - e.g. hacking into a bank to commit fraud. Up to 5 years in prison.
  3. Unauthorised modification of computer material - e.g. spreading a virus, deleting files, modifying data. Up to 10 years in prison.

Copyright, Designs and Patents Act 1988

Protects the intellectual property of creators. It is illegal to copy, distribute, or modify software, music, images, or other creative works without permission. This covers:

  • Software piracy (copying/distributing software illegally)
  • Downloading music/films without paying
  • Copying code from the internet without permission

Freedom of Information Act 2000

Gives the public the right to request information held by public authorities (e.g. government, councils, NHS, schools). The authority must respond within 20 working days. Some exemptions apply (national security, personal data, commercial interests).

For legislation questions, you MUST name the specific Act. Saying "the data protection law" will not get marks. Learn the full names and dates: Data Protection Act 2018, Computer Misuse Act 1990, Copyright Designs and Patents Act 1988.

Test Yourself

  1. Name the three offences under the Computer Misuse Act 1990.
  2. List four principles of the Data Protection Act 2018.
  3. A student downloads a film from an illegal website. Which law have they broken?
14. Ethical & Social Issues

Key Issues in Digital Technology

Digital Divide

The digital divide is the gap between those who have access to digital technology and the internet, and those who do not. Factors include age, income, location (rural vs urban), education, and disability. This creates inequality in education, employment, and access to services.

Algorithmic Bias

Algorithmic bias occurs when AI/machine learning systems produce discriminatory results because the training data reflects existing prejudices (e.g. facial recognition systems being less accurate for certain ethnicities, recruitment algorithms favouring certain demographics).

Privacy and Surveillance

Issues include: mass data collection by companies and governments, CCTV monitoring, tracking through smartphones/apps, cookies tracking browsing habits, social media companies selling user data to advertisers.

Automation and Job Loss

Automation and AI are replacing jobs in manufacturing, retail (self-checkout), transport (autonomous vehicles), customer service (chatbots). However, technology also creates new job roles (data scientists, cybersecurity analysts).

Environmental Impact

  • E-waste from discarded electronics contains toxic materials
  • Data centres consume massive amounts of energy
  • Mining rare earth metals for components causes environmental damage
  • Positive: technology enables remote working (reducing travel), smart energy management, climate modelling
For ethical questions, always present BOTH sides of the argument. State the benefit AND the concern for each point. Finish with a balanced conclusion.

Test Yourself

  1. What is the digital divide and what factors contribute to it?
  2. Give an example of algorithmic bias and explain how it could occur.
  3. Discuss the impact of automation on employment, presenting both positive and negative effects.
14b. Ethics & Digital Responsibility (In-Depth)

Surveillance and Privacy

The tension between security and privacy is a central ethical debate in digital technology:

  • State surveillance: government monitoring of communications (e.g. GCHQ, NSA programmes revealed by Edward Snowden) - justified as national security but criticised as mass intrusion
  • Corporate surveillance: tech companies tracking user behaviour for targeted advertising; data brokers selling personal profiles
  • Workplace monitoring: employee email monitoring, keystroke logging, screen recording - legal if disclosed, but raises trust issues
  • Facial recognition: used in policing and security but concerns about accuracy, racial bias, and chilling effect on protest/free expression

Autonomous Systems Ethics

Autonomous systems (self-driving cars, drones, robotic surgery) raise unique ethical questions:

  • The trolley problem: how should a self-driving car choose between two harmful outcomes? Who programs these decisions?
  • Accountability: if an autonomous vehicle causes an accident, who is responsible - the manufacturer, the programmer, or the owner?
  • Autonomous weapons: should machines be allowed to make life-or-death decisions without human oversight?
  • Job displacement: autonomous lorries, delivery drones, and warehouse robots replacing human workers

Social Media Impact

  • Echo chambers: algorithms show users content that reinforces their existing views, reducing exposure to diverse perspectives
  • Misinformation: fake news spreads faster than corrections; deepfakes make it harder to distinguish real from fabricated content
  • Cyberbullying: anonymity and reach of social media amplify harassment
  • Mental health: studies link excessive social media use to anxiety, depression, and body image issues, particularly in young people
  • Positive uses: connecting communities, raising awareness of social issues, enabling democratic movements

Digital Wellbeing

Digital wellbeing refers to maintaining a healthy relationship with technology:

  • Screen time management and digital detoxes
  • Notification management to reduce distraction
  • Awareness of addictive design patterns (infinite scrolling, autoplay, gamification)
  • Healthy ergonomics - posture, eye strain (20-20-20 rule), repetitive strain injury

Environmental Impact of Technology

IssueDetail
E-waste50+ million tonnes of electronic waste generated globally per year; contains toxic materials (lead, mercury, cadmium); only ~20% is formally recycled
Data centre energyData centres consume ~1-2% of global electricity; cooling systems are a major energy cost; companies increasingly using renewable energy
Rare earth miningComponents require cobalt, lithium, rare earth elements; mining causes habitat destruction and water pollution; often involves exploitative labour
Planned obsolescenceDevices designed to become outdated quickly through software updates, non-replaceable batteries, or discontinued support

Mitigation: Right to repair legislation, circular economy principles, energy-efficient hardware, carbon-neutral data centres, responsible recycling programmes.

Accessibility and Inclusive Design

Inclusive design ensures technology is usable by people with the widest range of abilities and situations:

  • Screen readers: software that reads page content aloud for visually impaired users - requires proper semantic HTML and alt text
  • Colour contrast: sufficient contrast between text and background for low-vision users (WCAG 2.1 guidelines)
  • Keyboard navigation: all functionality accessible without a mouse
  • Captions and transcripts: for audio/video content (benefits deaf users and non-native speakers)
  • WCAG (Web Content Accessibility Guidelines): international standard - four principles: Perceivable, Operable, Understandable, Robust

Net Neutrality

Net neutrality is the principle that Internet Service Providers (ISPs) must treat all internet traffic equally, without blocking, throttling, or prioritising specific content or services.

For Net NeutralityAgainst Net Neutrality
Ensures a level playing field for small businesses and startupsISPs argue they need to manage network congestion
Prevents ISPs from creating "fast lanes" for companies that pay moreCould fund infrastructure investment
Protects freedom of expression and access to informationSome services (e.g. telemedicine) may benefit from prioritisation
Promotes innovation - anyone can launch a serviceMarket forces may be sufficient to prevent abuse
Ethics questions are often extended-response (8-12 marks). Structure your answer: define the issue, give arguments FOR, arguments AGAINST, provide real-world examples, and reach a balanced conclusion.

Test Yourself

  1. Discuss the ethical issues surrounding facial recognition technology in policing.
  2. Explain what net neutrality is and give one argument for and one against.
  3. Describe three ways technology impacts the environment negatively.
  4. What is inclusive design? Give three examples of accessibility features.
  5. Discuss the ethical challenges of autonomous vehicles.
15. Emerging Technologies

RFID (Radio Frequency Identification)

RFID uses radio waves to automatically identify and track tags attached to objects. Components: RFID tag (chip + antenna), RFID reader, database.

  • Passive tags: powered by the reader's signal, short range, cheap (e.g. contactless bank cards, inventory tags)
  • Active tags: have their own battery, longer range, more expensive (e.g. vehicle tracking, livestock)

Uses: access control, inventory management, contactless payment, passport chips, library books, luggage tracking.

Internet of Things (IoT)

The IoT is a network of physical devices embedded with sensors, software, and connectivity that enables them to collect and exchange data over the internet.

Examples: smart thermostats, fitness trackers, smart fridges, connected security cameras, industrial sensors, smart meters.

AdvantagesDisadvantages
Convenience and automationSecurity vulnerabilities (each device is a potential entry point)
Energy efficiency (smart heating)Privacy concerns (constant data collection)
Remote monitoring and controlDependence on internet connectivity
Data collection for better decision-makingCompatibility issues between manufacturers

Data Mining

Data mining is the process of analysing large datasets to discover patterns, correlations, and trends. Used by businesses for customer profiling, market basket analysis (identifying products frequently bought together), fraud detection, and targeted advertising.

Big Data

Big data refers to datasets that are too large and complex for traditional data processing tools. Characterised by the three Vs:

  • Volume: enormous amounts of data (terabytes/petabytes)
  • Velocity: data generated and processed at high speed (real-time)
  • Variety: many different types and formats (text, images, video, sensor data)

Applications: healthcare (predicting outbreaks), retail (personalised recommendations), social media analysis, traffic management, weather forecasting.

Test Yourself

  1. Explain the difference between passive and active RFID tags.
  2. Give three examples of IoT devices and describe one security concern.
  3. What are the three Vs of big data? Explain each.
16. Mobile & IoT Development

Mobile App Development Approaches

ApproachDescriptionAdvantagesDisadvantages
Native appBuilt for a specific platform using its native language (Swift/Kotlin)Best performance; full access to device hardware (camera, GPS, sensors); best user experienceSeparate codebase for each platform; more expensive and time-consuming
Hybrid appSingle codebase wrapped in a native container; uses web technologies (HTML, CSS, JS)One codebase for multiple platforms; faster development; access to some device features via pluginsSlower than native; may not feel fully native; depends on framework updates
Web appRuns in the mobile browser; built entirely with web technologiesNo installation required; works on any device with a browser; easy to updateLimited device access (no push notifications without PWA); requires internet; cannot be listed in app stores

Cross-platform frameworks: React Native, Flutter, Xamarin - allow developers to write once and deploy to both iOS and Android.

Mobile Operating Systems

iOS (Apple)Android (Google)
SourceClosed source (proprietary)Open source (based on Linux kernel)
DistributionApp Store only (curated, strict review)Google Play Store + third-party sources (sideloading)
DevelopmentSwift or Objective-C; Xcode IDE; requires MacKotlin or Java; Android Studio IDE; any OS
CustomisationLimited - consistent UX across devicesHighly customisable - varied across manufacturers
Security modelSandboxed apps; strict app review; less malwareSandboxed apps; more vulnerable due to sideloading and fragmentation

IoT Architecture

The Internet of Things (IoT) follows a layered architecture:

LayerFunctionExamples
1. Perception (Sensors)Collects data from the physical environment using sensors and actuatorsTemperature sensors, motion detectors, cameras, accelerometers, GPS
2. Network (Connectivity)Transmits data from sensors to processing systemsWi-Fi, Bluetooth, Zigbee, LoRaWAN, cellular (4G/5G), NFC
3. Processing (Edge/Cloud)Analyses and processes the collected dataEdge computing (local processing), cloud platforms (AWS IoT, Azure IoT Hub)
4. Application (UI)Presents data to users and enables control of devicesMobile apps, dashboards, voice assistants, web interfaces

IoT Protocols

ProtocolDescriptionUse Case
MQTT (Message Queuing Telemetry Transport)Lightweight publish/subscribe messaging protocol designed for low-bandwidth, high-latency networksSmart home devices, sensor networks, remote monitoring
CoAP (Constrained Application Protocol)Web transfer protocol for constrained devices; similar to HTTP but much lighter; uses UDP instead of TCPSmart energy, building automation, resource-constrained devices
HTTP/HTTPSStandard web protocol; heavier but widely supportedIoT devices with more resources; web-based dashboards
ZigbeeLow-power, short-range mesh networking protocolHome automation (lights, locks, thermostats)

Smart Applications

Smart Home

  • Smart thermostats (e.g. Nest) learn usage patterns and optimise heating
  • Smart lighting - controlled remotely, automated schedules, energy saving
  • Smart security - cameras, doorbells, locks with remote monitoring and alerts
  • Voice assistants (Alexa, Google Home) as central control hubs

Smart City

  • Intelligent traffic management - adaptive traffic lights based on real-time flow
  • Smart waste management - sensors in bins alert when collection is needed
  • Environmental monitoring - air quality, noise levels, flooding sensors
  • Smart street lighting - dims when no pedestrians/vehicles detected
  • Connected public transport - real-time tracking, passenger counting

IoT Security Challenges

  • Large attack surface: every connected device is a potential entry point for attackers
  • Weak default credentials: many devices ship with default passwords that users never change
  • Limited processing power: constrained devices may not support strong encryption or regular updates
  • Firmware updates: many IoT devices lack automatic update mechanisms, leaving known vulnerabilities unpatched
  • Data privacy: continuous data collection by sensors raises surveillance concerns
  • Botnet recruitment: compromised IoT devices can be recruited into botnets for DDoS attacks (e.g. Mirai botnet)
  • Interoperability: lack of security standards across different manufacturers and protocols

Wearable Technology

Wearable devices are IoT devices worn on the body that collect and transmit data:

Device TypeData CollectedApplications
Fitness trackers / SmartwatchesHeart rate, steps, sleep patterns, blood oxygenHealth monitoring, exercise tracking, notifications
Medical wearablesBlood glucose, ECG, blood pressureChronic condition management, early warning alerts, remote patient monitoring
AR/VR headsetsHead movement, eye tracking, hand gesturesGaming, training simulations, remote collaboration
Smart clothingBiometrics, posture, muscle activitySports performance, workplace safety
IoT questions often ask you to discuss both benefits and risks. Always include security and privacy as key concerns, and give specific examples of IoT devices rather than generic descriptions.

Test Yourself

  1. Compare native, hybrid, and web app development approaches.
  2. Describe the four layers of IoT architecture with an example for each.
  3. What is MQTT and why is it suitable for IoT devices?
  4. Give three security challenges specific to IoT devices.
  5. Explain two smart city applications of IoT technology.
17. Trace Table Exercises

What is a Trace Table?

A trace table is used to track the values of variables as a program executes, line by line. This technique is essential for dry running an algorithm - manually working through code without a computer to verify it produces the correct output.

Technique: Read each line of code in order, update the relevant variable values in the table, and move to the next line. For loops, repeat the body until the condition fails. Record the value of every variable after each statement that changes it.

Trace tables are frequently examined. Always include a column for EVERY variable and for any OUTPUT. Work through line by line - do not skip steps. Even if the final answer is wrong, clear working in your trace table earns method marks.

Exercise 1: Simple Loop - Accumulating a Sum

Trace the following pseudocode:

SET sum TO 0
FOR i FROM 1 TO 5
    SET sum TO sum + i
END FOR
OUTPUT sum

Copy this empty trace table and fill in the values:

IterationisumOutput
Before loop
1
2
3
4
5
After loop
Reveal Completed Trace Table
IterationisumOutput
Before loop-0
111
223
336
4410
5515
After loop-1515

The sum of 1+2+3+4+5 = 15. The variable sum accumulates the running total on each iteration.

Exercise 2: While Loop - Fibonacci Sequence

Trace the following pseudocode that generates Fibonacci numbers below 20:

SET a TO 0
SET b TO 1
WHILE b < 20
    OUTPUT b
    SET temp TO b
    SET b TO a + b
    SET a TO temp
END WHILE
Iterationabtempb < 20?Output
Before loop
1
2
3
4
5
6
7
Reveal Completed Trace Table
Iterationabtempb < 20?Output
Before loop01-TRUE
1111TRUE1
2121TRUE1
3232TRUE2
4353TRUE3
5585TRUE5
68138TRUE8
7132113FALSE13

The output is: 1, 1, 2, 3, 5, 8, 13. On iteration 7, after the body executes, b becomes 21 which fails the WHILE condition, so the loop stops. Note the use of temp to avoid losing the old value of b before the swap.

Exercise 3: Nested Loop Trace

Trace the following pseudocode with nested loops:

SET count TO 0
FOR i FROM 1 TO 3
    FOR j FROM 1 TO 2
        SET count TO count + 1
        OUTPUT i, j
    END FOR
END FOR
OUTPUT count
Outer (i)Inner (j)countOutput
Reveal Completed Trace Table
Outer (i)Inner (j)countOutput
1111, 1
1221, 2
2132, 1
2242, 2
3153, 1
3263, 2

Final output: 6. The inner loop runs 2 times for every 1 run of the outer loop, so 3 x 2 = 6 iterations total. This is why nested loops multiply - a key concept for understanding time complexity.

When tracing nested loops, students often forget that the inner loop resets to its starting value each time the outer loop increments. Always restart j from 1 for each new value of i.

Test Yourself

  1. What is the purpose of a trace table in algorithm design?
  2. Modify Exercise 1 to sum only even numbers from 1 to 10. Trace it.
  3. How many times does the inner loop body execute if the outer loop runs N times and the inner runs M times?
18. Algorithm Design Challenges

Approaching Algorithm Design

When asked to design an algorithm, follow these steps:

  1. Understand the problem - What are the inputs? What output is expected?
  2. Identify the steps - Break the problem into smaller sub-tasks
  3. Choose a structure - Decide on sequence, selection, or iteration
  4. Write pseudocode - Use clear, structured language
  5. Dry run / test - Trace through with sample data to verify correctness
In exams, marks are awarded for correct use of programming constructs (loops, conditions, variables) and clear logic. Always use meaningful variable names and show the complete algorithm including input and output.

Challenge 1: Find the Largest Number in a List

Design an algorithm that accepts a list of N numbers entered by the user and outputs the largest number.

Hints: You need a variable to track the current largest value. Compare each new number against it. Think about what the initial value of your "largest" variable should be.

Reveal Model Answer
OUTPUT "How many numbers?"
INPUT n
OUTPUT "Enter number 1:"
INPUT largest

FOR i FROM 2 TO n
    OUTPUT "Enter number ", i, ":"
    INPUT num
    IF num > largest THEN
        SET largest TO num
    END IF
END FOR

OUTPUT "The largest number is: ", largest

Key idea: Initialise largest to the first input value (not 0, which would fail for all-negative lists). Then compare each subsequent value.

Challenge 2: Palindrome Checker

Write pseudocode to check if a word entered by the user is a palindrome (reads the same forwards and backwards, e.g., "racecar").

Hints: You could reverse the string and compare, or compare characters from each end working inwards. Think about the LENGTH function and accessing characters by index.

Reveal Model Answer
OUTPUT "Enter a word:"
INPUT word
SET isPalindrome TO TRUE
SET length TO LENGTH(word)

FOR i FROM 0 TO (length DIV 2) - 1
    IF word[i] <> word[length - 1 - i] THEN
        SET isPalindrome TO FALSE
    END IF
END FOR

IF isPalindrome = TRUE THEN
    OUTPUT word, " is a palindrome"
ELSE
    OUTPUT word, " is not a palindrome"
END IF

Key idea: Compare the first character with the last, second with second-last, and so on. You only need to check up to the halfway point. Using a Boolean flag avoids premature exit from the loop.

Challenge 3: Login System with 3 Attempts

Design a login system that asks for a username and password. The user gets a maximum of 3 attempts before the account is locked.

Hints: You need a counter for attempts and a WHILE loop that checks both the attempt count AND whether login was successful. Think about what happens when the loop ends - was it a success or lockout?

Reveal Model Answer
CONSTANT CORRECT_USER = "admin"
CONSTANT CORRECT_PASS = "secret123"
SET attempts TO 0
SET loggedIn TO FALSE

WHILE attempts < 3 AND loggedIn = FALSE
    OUTPUT "Enter username:"
    INPUT username
    OUTPUT "Enter password:"
    INPUT password
    SET attempts TO attempts + 1

    IF username = CORRECT_USER AND password = CORRECT_PASS THEN
        SET loggedIn TO TRUE
        OUTPUT "Login successful. Welcome!"
    ELSE
        OUTPUT "Incorrect. Attempts remaining: ", 3 - attempts
    END IF
END WHILE

IF loggedIn = FALSE THEN
    OUTPUT "Account locked. Contact administrator."
END IF

Key idea: The WHILE condition checks BOTH that attempts remain AND login has not succeeded. After the loop, we check loggedIn to determine whether the exit was due to success or lockout.

Challenge 4: Average of N Numbers

Write an algorithm to calculate the average of N numbers entered by a user. The user first enters how many numbers they want to average.

Hints: Accumulate a running total, then divide at the end. Think about validation - what if N is zero?

Reveal Model Answer
OUTPUT "How many numbers?"
INPUT n

IF n <= 0 THEN
    OUTPUT "Error: must enter at least 1 number"
ELSE
    SET total TO 0
    FOR i FROM 1 TO n
        OUTPUT "Enter number ", i, ":"
        INPUT num
        SET total TO total + num
    END FOR
    SET average TO total / n
    OUTPUT "The average is: ", average
END IF

Key idea: Validate input before processing. Use a running total with a FOR loop, then divide by the count AFTER the loop ends. Dividing inside the loop would give the wrong result.

Challenge 5: Count Vowels in a String

Design an algorithm that takes a sentence as input and counts the total number of vowels (a, e, i, o, u) it contains.

Hints: Loop through each character. Convert to lowercase for easier comparison. Use a counter variable.

Reveal Model Answer
OUTPUT "Enter a sentence:"
INPUT sentence
SET vowelCount TO 0
SET vowels TO "aeiou"

FOR i FROM 0 TO LENGTH(sentence) - 1
    SET ch TO LOWER(sentence[i])
    IF ch IN vowels THEN
        SET vowelCount TO vowelCount + 1
    END IF
END FOR

OUTPUT "Number of vowels: ", vowelCount

Key idea: Convert each character to lowercase before checking, so "A" and "a" are both counted. The loop processes every character in the string.

Students often forget to initialise counter/accumulator variables to 0 before a loop. Without initialisation, the variable may contain an unpredictable value.

Test Yourself

  1. Modify Challenge 1 to find BOTH the largest and smallest numbers.
  2. Why is it important to validate user input before processing it?
  3. What is the difference between a counter-controlled loop (FOR) and a condition-controlled loop (WHILE)?
19. Big-O Complexity

What is Algorithmic Complexity?

Algorithmic complexity measures how the time or space requirements of an algorithm grow as the input size increases. It answers the question: "If I double the input, how much longer will it take?"

We use Big-O notation to classify algorithms by their worst-case performance. Big-O describes the upper bound of growth - the maximum number of operations as input size n increases.

Time Complexity Classes

Big-ONameDescriptionExample Algorithm
O(1)ConstantTime does not change regardless of input size. Always the same number of operations.Accessing an array element by index; hash table lookup
O(log n)LogarithmicTime increases slowly as input grows. Halves the problem each step.Binary search on a sorted array
O(n)LinearTime grows directly in proportion to input size.Linear search; iterating through an array
O(n log n)LinearithmicSlightly worse than linear. Common in efficient sorting.Merge sort; quick sort (average case)
O(n²)QuadraticTime grows with the square of input size. Doubling input makes it 4x slower.Bubble sort; insertion sort; nested loops
O(2ⁿ)ExponentialTime doubles with each additional input element. Impractical for large inputs.Brute-force subset problems; recursive Fibonacci (naive)

Visualising Growth

Consider how these complexities compare for an input of n = 1000:

Big-On = 10n = 100n = 1,000n = 1,000,000
O(1)1111
O(log n)371020
O(n)101001,0001,000,000
O(n log n)3070010,00020,000,000
O(n²)10010,0001,000,0001,000,000,000,000
O(2ⁿ)1,0241.27 x 10³&sup0;ImpossibleImpossible

How to Identify Complexity from Code

Rule 1: No loops = O(1)

SET result TO array[5]   // O(1) - direct access, no looping

Rule 2: Single loop over n items = O(n)

FOR i FROM 0 TO n - 1   // O(n) - one pass through all items
    OUTPUT array[i]
END FOR

Rule 3: Nested loops over n = O(n²)

FOR i FROM 0 TO n - 1       // Outer: n times
    FOR j FROM 0 TO n - 1   // Inner: n times each
        OUTPUT i, j          // Total: n x n = O(n²)
    END FOR
END FOR

Rule 4: Halving the problem each step = O(log n)

WHILE n > 1            // O(log n) - divides by 2 each iteration
    SET n TO n DIV 2
END WHILE

Rule 5: Recursive calls that double = O(2ⁿ)

FUNCTION fib(n)           // O(2ⁿ) - two recursive calls per level
    IF n <= 1 THEN RETURN n
    RETURN fib(n-1) + fib(n-2)
END FUNCTION

Why Does Complexity Matter?

Choosing the right algorithm is critical for large datasets. Consider searching a sorted list of 1 million items:

  • Linear search O(n): up to 1,000,000 comparisons
  • Binary search O(log n): at most 20 comparisons

For small datasets the difference is negligible, but at scale, an inefficient algorithm can take hours where an efficient one takes milliseconds. This is why understanding complexity helps you select the most appropriate algorithm for a given problem.

When asked about algorithm efficiency, always reference Big-O notation and explain what it means in practical terms. Saying "binary search is O(log n) so it halves the search space each step, meaning 1 million items needs only about 20 comparisons" is much stronger than just stating the Big-O class.

Complexity Exercises

Exercise 1: What is the complexity?

SET found TO FALSE
FOR i FROM 0 TO n - 1
    IF array[i] = target THEN
        SET found TO TRUE
    END IF
END FOR
Reveal Answer

O(n) - Linear. The loop iterates through every element once. Even though it could find the target early, in the worst case (target is last or not present) it checks all n elements.

Exercise 2: What is the complexity?

FOR i FROM 0 TO n - 1
    FOR j FROM i + 1 TO n - 1
        IF array[j] < array[i] THEN
            // swap array[i] and array[j]
            SET temp TO array[i]
            SET array[i] TO array[j]
            SET array[j] TO temp
        END IF
    END FOR
END FOR
Reveal Answer

O(n²) - Quadratic. This is a selection sort. Even though the inner loop starts at i+1 (not 0), the total comparisons are n(n-1)/2, which simplifies to O(n²). In Big-O, we drop constants and lower-order terms.

Exercise 3: What is the complexity?

SET low TO 0
SET high TO n - 1
WHILE low <= high
    SET mid TO (low + high) DIV 2
    IF array[mid] = target THEN
        OUTPUT "Found at index ", mid
        SET low TO high + 1   // exit loop
    ELSE IF array[mid] < target THEN
        SET low TO mid + 1
    ELSE
        SET high TO mid - 1
    END IF
END WHILE
Reveal Answer

O(log n) - Logarithmic. This is binary search. Each iteration halves the search space (either low moves up or high moves down to mid). For n = 1,000,000, this needs at most about 20 iterations.

Students often confuse O(n) and O(n²). Remember: a single loop = O(n). Two NESTED loops = O(n²). Two SEQUENTIAL (one after another) loops = O(n) + O(n) = O(n), not O(n²).

Test Yourself

  1. Why is O(n log n) considered efficient for sorting?
  2. A program has three sequential loops, each running n times. What is the overall complexity?
  3. Explain why binary search requires the data to be sorted first.
  4. Why are exponential algorithms impractical for large datasets?
20. Data Structures Implementation

Stacks (LIFO - Last In, First Out)

A stack is a linear data structure where elements are added and removed from the same end (the "top"). Think of a stack of plates - you always take from the top.

Key Operations

OperationDescriptionTime Complexity
PushAdd an item to the top of the stackO(1)
PopRemove and return the item from the topO(1)
Peek / TopView the top item without removing itO(1)
isEmptyCheck if the stack has no elementsO(1)

Pseudocode Implementation (Array-based)

// Initialise stack
SET stack TO ARRAY[0..MAX_SIZE]
SET top TO -1   // -1 means empty

FUNCTION push(item)
    IF top = MAX_SIZE - 1 THEN
        OUTPUT "Stack overflow"
    ELSE
        SET top TO top + 1
        SET stack[top] TO item
    END IF
END FUNCTION

FUNCTION pop()
    IF top = -1 THEN
        OUTPUT "Stack underflow"
    ELSE
        SET item TO stack[top]
        SET top TO top - 1
        RETURN item
    END IF
END FUNCTION

Applications of Stacks

  • Undo functionality - each action is pushed; undo pops the most recent
  • Browser back button - visited pages are pushed onto a stack
  • Expression evaluation - converting infix to postfix notation
  • Function call stack - the runtime stack tracks active function calls and local variables
  • Bracket matching - compilers use stacks to check balanced parentheses

Queues (FIFO - First In, First Out)

A queue is a linear data structure where items are added at the rear and removed from the front. Think of a queue of people waiting - the first person in line is served first.

Key Operations

OperationDescriptionTime Complexity
EnqueueAdd an item to the rear of the queueO(1)
DequeueRemove and return the item from the frontO(1)
Front / PeekView the front item without removing itO(1)
isEmptyCheck if the queue has no elementsO(1)

Pseudocode Implementation (Circular Array)

// Initialise circular queue
SET queue TO ARRAY[0..MAX_SIZE]
SET front TO 0
SET rear TO -1
SET size TO 0

FUNCTION enqueue(item)
    IF size = MAX_SIZE THEN
        OUTPUT "Queue full"
    ELSE
        SET rear TO (rear + 1) MOD MAX_SIZE
        SET queue[rear] TO item
        SET size TO size + 1
    END IF
END FUNCTION

FUNCTION dequeue()
    IF size = 0 THEN
        OUTPUT "Queue empty"
    ELSE
        SET item TO queue[front]
        SET front TO (front + 1) MOD MAX_SIZE
        SET size TO size - 1
        RETURN item
    END IF
END FUNCTION

Priority Queues

A priority queue is a variant where each item has a priority value. Items with higher priority are dequeued before items with lower priority, regardless of insertion order. Used in:

  • Operating systems - process scheduling (high-priority tasks run first)
  • Network routers - urgent packets processed before normal traffic
  • A* pathfinding - nodes with lowest cost explored first
  • Hospital triage - most critical patients seen first

Applications of Queues

  • Print queue - documents printed in the order they were submitted
  • CPU task scheduling - processes handled in order of arrival
  • Breadth-first search - graph traversal algorithm uses a queue
  • Message buffers - handling requests in order on a server

Linked Lists

A linked list is a dynamic data structure made up of nodes. Each node contains two parts: the data and a pointer (reference) to the next node. The last node points to NULL.

Structure of a Node

// Each node contains:
RECORD Node
    data : DATA_TYPE
    next : POINTER TO Node   // NULL if last node
END RECORD

// The list is accessed via a head pointer
SET head TO NULL   // empty list

Advantages over Arrays

FeatureArrayLinked List
SizeFixed at creation (static)Grows/shrinks dynamically
Insertion at startO(n) - must shift all elementsO(1) - just update pointers
Deletion from middleO(n) - must shift elementsO(1) once node is found - update pointers
Access by indexO(1) - direct accessO(n) - must traverse from head
Memory usageContiguous block, may waste spaceExtra memory for pointers, but no wasted space
Cache performanceExcellent (contiguous memory)Poor (nodes scattered in memory)

Types of Linked List

  • Singly linked - each node points to the next only (can only traverse forward)
  • Doubly linked - each node points to both next AND previous (can traverse both directions)
  • Circular linked - the last node points back to the first instead of NULL

Binary Trees

A binary tree is a hierarchical data structure where each node has at most two children: a left child and a right child. The topmost node is called the root.

A binary search tree (BST) is a binary tree with an ordering property: for every node, all values in the left subtree are smaller, and all values in the right subtree are larger.

Key Terminology

TermMeaning
RootThe topmost node (has no parent)
LeafA node with no children
ParentA node that has children below it
SubtreeA node and all its descendants
Depth / LevelThe number of edges from the root to a node
HeightThe number of edges on the longest path from root to a leaf

Tree Traversals

There are three standard ways to visit every node in a binary tree. For a tree with root value 8, left subtree rooted at 3, right subtree rooted at 10:

TraversalOrderMnemonicUse Case
In-orderLeft, Root, RightL-N-ROutputs BST values in sorted (ascending) order
Pre-orderRoot, Left, RightN-L-RCopying/serialising a tree structure
Post-orderLeft, Right, RootL-R-NDeleting a tree; evaluating expression trees

Traversal Pseudocode

FUNCTION inOrder(node)
    IF node <> NULL THEN
        inOrder(node.left)
        OUTPUT node.data      // visit BETWEEN children
        inOrder(node.right)
    END IF
END FUNCTION

FUNCTION preOrder(node)
    IF node <> NULL THEN
        OUTPUT node.data      // visit BEFORE children
        preOrder(node.left)
        preOrder(node.right)
    END IF
END FUNCTION

FUNCTION postOrder(node)
    IF node <> NULL THEN
        postOrder(node.left)
        postOrder(node.right)
        OUTPUT node.data      // visit AFTER children
    END IF
END FUNCTION

Choosing the Right Data Structure

ScenarioBest StructureWhy
Undo/redo functionalityStackLIFO - most recent action undone first
Print job schedulingQueueFIFO - first document submitted prints first
Frequently inserting/deleting itemsLinked ListO(1) insertion/deletion without shifting elements
Fast lookup by indexArrayO(1) direct access by position
Sorted data with fast searchBinary Search TreeO(log n) search, insert, and delete
Task scheduling by importancePriority QueueHighest priority items processed first
Evaluating mathematical expressionsStack / Binary TreeOperator precedence handled naturally
Storing a hierarchical file systemTreeNaturally represents parent-child relationships
When asked to recommend a data structure, always justify your choice by explaining WHY its properties suit the scenario. Stating "use a stack" without explaining LIFO behaviour and how it applies will lose marks.
Students confuse stacks and queues in exam answers. Remember: Stack = LIFO (like a stack of plates), Queue = FIFO (like a queue of people). If the most RECENT item should be processed first, use a stack. If the OLDEST item should be processed first, use a queue.

Test Yourself

  1. What would happen if you tried to pop from an empty stack?
  2. Explain why a circular queue is more memory-efficient than a linear queue.
  3. Give two advantages and two disadvantages of linked lists compared to arrays.
  4. Draw a binary search tree after inserting: 15, 10, 20, 8, 12, 17, 25. Then write the in-order traversal output.
  5. Which data structure would you use for a web browser's back button? Justify your answer.
🏠 Home 📚 Study 🎲 Quiz Conveyor 📄 GCSE Notes 📄 A-Level Notes
12:00