CAPE Computer Science (Units 1 and 2)

FREE • CAPE UNITS 1 AND 2 • INTERACTIVE

CAPE Computer Science – Free Lessons

Learn computer science by doing it: write C programs, then open up the machine that runs them, from memory and storage to logic gates, latches and binary arithmetic. Every lesson has interactive Try it boxes that work on a phone.

0110 1101 (109) + 0011 1011 (59) ——— 1010 1000 (168)

Every calculation a computer makes comes down to adding bits.

Who this is for

CAPE Computer Science students in Unit 1 (Fundamentals of Computer Science) and Unit 2 (Further Topics in Computer Science), their teachers, and anyone who wants to understand how a computer really works. The lessons follow the CAPE Computer Science syllabus (CXC A19/U2/21), module by module.

How to use these lessons

  1. Work through the lessons in order. Each one links back to what you need and forward to what comes next.
  2. Do every Try it box. They are small simulations and checks that you can use on a computer or a phone.
  3. Answer the practice questions before you open the hidden answers, then take the quick quiz at the end.
  4. Studying for the exam? Read the Exam tips in each lesson, then try the past-paper question it names.

How this course is taught

The course runs in three stages. Each stage uses what you learned in the stage before it.

  1. Stage 1: C first. You learn to program in C straight away (Unit 1, Module 3), because writing and running real programs is the quickest way to understand what a computer does. C is used for every code example in the whole course, so you keep practising one language from start to finish.
  2. Stage 2: Architecture and digital logic. Next you open up the machine (Unit 1, Module 1): memory, storage, input and output, power, logic gates, latches, adders, data representation and the processor. The lessons link these ideas back to C. For example, C integer types connect to binary and overflow, and arrays connect to memory addresses.
  3. Stage 3: The rest of the syllabus. Problem solving and algorithms (Unit 1, Module 2), then Unit 2: data structures, software engineering, and operating systems and networks.

What every lesson includes: plain-language notes with worked examples; interactive Try it boxes through to the end; C code you can copy and run; a summary; practice questions with hidden answers; homework; an eight-question quick quiz; exam tips that name the past-paper question to try; and a syllabus link showing which specific objectives it covers.

The C lessons for Stage 1 are now live: start with Unit 1, Module 3 below.

Course pages

  • This page: the course overview and the lesson list for each module.
  • Lesson List: every lesson in the course on one page, in teaching order.
  • Curriculum Map (coming soon): every specific objective in Units 1 and 2, with the lesson that covers it.
  • Past-paper solutions: worked answers are on the CS Solutions page.

Unit 1: Fundamentals of Computer Science

Module 1: Computer Architecture (16 lessons)

Pick any lesson to jump in, or follow them in order. Each one takes about 30 to 45 minutes with the Try it boxes.

LESSON 01

Memory Types and Features

RAM, ROM, EPROM and EEPROM, and how to compare memory by speed, size, word size and volatility.

Syllabus: U1 M1 SO1

LESSON 02

Storage Devices

Magnetic, optical, solid-state and cloud storage, compared by capacity, access speed, access method and portability.

Syllabus: U1 M1 SO1

LESSON 03

Input and Output Devices

Input and output devices, including sensors, touch screens and Braille keyboards, compared by port connectivity, speed and quality of output.

Syllabus: U1 M1 SO1

LESSON 04

Power Protection and Types of Computers

Surge protectors, voltage regulators and UPS units, plus supercomputers, servers, desktops and mobile devices.

Syllabus: U1 M1 SO1

LESSON 05

Logic Gates and Truth Tables

The seven CAPE logic gates, truth tables, Boolean expressions and circuits, with every gate written in C.

Syllabus: U1 M1 SO2, SO3

LESSON 06

Number Bases: Binary, Octal and Hexadecimal

Bits, nibbles, bytes and words, and converting between binary, octal, decimal and hexadecimal.

Syllabus: U1 M1 SO4

LESSON 07

Adding Binary Numbers: Carries, Adders and Overflow

Add binary numbers column by column, build half and full adders from gates, spot overflow, and watch unsigned addition wrap around in C.

Syllabus: U1 M1 SO2, SO3, SO4

LESSON 08

Signed Integers: Sign and Magnitude, Ones’ and Two’s Complement

Sign and magnitude, ones’ complement and two’s complement: converting, ranges, subtraction by addition and signed overflow.

Syllabus: U1 M1 SO4

LESSON 09

Fixed-Point and Floating-Point Numbers

Binary fractions, fixed point, and floating point with a sign, mantissa and exponent.

Syllabus: U1 M1 SO4

LESSON 10

Character Representation: ASCII and Unicode

How computers store text: ASCII codes, Unicode and UTF-8, and how C treats a char as a number.

Syllabus: U1 M1 SO4

LESSON 11

The SR Latch

Build a one-bit memory from NOR gates, then from NAND gates, and see how latches and flip-flops store bits in registers.

Syllabus: U1 M1 SO2, SO3

LESSON 12

D and JK Flip-Flops, Registers and Counters

D and JK flip-flops, registers, and a 2-bit ripple counter that counts on the falling clock edge.

Syllabus: U1 M1 SO2, SO3

LESSON 13

Multiplexers, Encoders and Decoders

Multiplexers, encoders and decoders: select lines, one-hot outputs, and the same circuits written in C.

Syllabus: U1 M1 SO2, SO3

LESSON 14

The Processor: CPU Components and the Fetch-Decode-Execute Cycle

The ALU, control unit and CPU registers, and a step-through of the fetch-decode-execute cycle.

Syllabus: U1 M1 SO5

LESSON 15

Instructions: Formats, Types and Instruction Sets

Zero-, one-, two- and three-address instruction formats, instruction types, and what an instruction set is.

Syllabus: U1 M1 SO5

LESSON 16

Processor Performance: Clock Speed, Cache, GPUs and Multi-Core

Clock speed and running time, cache, GPUs, parallel processing and multi-core processors.

Syllabus: U1 M1 SO5

All 16 Module 1 lessons are now live, in teaching order.

Module 1 at a glance

Specific objective (students should be able to…)Lessons
1. state the purpose of the main components of a computer system;01 Memory, 02 Storage, 03 Input and Output, 04 Power Protection and Types of Computers
2. describe the basic building blocks of a computer;05 Logic Gates, 07 Adding Binary Numbers, 11 The SR Latch, 12 Flip-Flops, Registers and Counters, 13 Multiplexers, Encoders and Decoders
3. interpret the interaction among the basic building blocks of a computer;05 Logic Gates, 07 Adding Binary Numbers, 11 The SR Latch, 12 Flip-Flops, Registers and Counters, 13 Multiplexers, Encoders and Decoders
4. explain how data is represented in a computer system;06 Number Bases, 07 Adding Binary Numbers, 08 Signed Integers, 09 Fixed-Point and Floating-Point, 10 Character Representation
5. describe the main characteristics of a processor.14 The Processor, 15 Instructions, 16 Processor Performance
Specific objectives quoted from the CAPE® Computer Science syllabus (CXC A19/U2/21) © Caribbean Examinations Council (CXC®). This site is not affiliated with CXC.

Module 2: Problem-Solving with Computers (10 lessons)

LESSON 01

Problems, Solutions, Algorithms and Programs

What a problem, a solution, an algorithm and a program are, and why the logic comes first.

Syllabus: U1 M2 SO1, SO10

LESSON 02

Top-Down, Bottom-Up, Stepwise Refinement and Hierarchy Charts

Top-down and bottom-up design, stepwise refinement, stubs and drivers, and hierarchy charts.

Syllabus: U1 M2 SO2

LESSON 03

The Stages of the Problem-Solving Process

The stages of problem solving, from defining and analysing the problem to choosing, building and reviewing a solution.

Syllabus: U1 M2 SO3

LESSON 04

Well-Designed Algorithms and Their Properties

The properties of a well-designed algorithm: finite, unambiguous, ordered steps with clear input and output.

Syllabus: U1 M2 SO4

LESSON 05

Representing Algorithms: Narrative, Flowcharts and Pseudocode

Writing algorithms as narratives, flowcharts and pseudocode, and choosing between them.

Syllabus: U1 M2 SO5

LESSON 06

Sequence, Input, Output and Assignment

Sequence, input, output and assignment, with variables, constants and swapping values.

Syllabus: U1 M2 SO6

LESSON 07

Selection: IF-THEN, IF-THEN-ELSE and Nested IF

IF-THEN, IF-THEN-ELSE, nested IF and CASE, with relational and logical operators.

Syllabus: U1 M2 SO6

LESSON 08

Loops: Bounded and Unbounded Iteration

Bounded (FOR) and unbounded (WHILE, REPEAT) loops, counters, totals and sentinels.

Syllabus: U1 M2 SO6

LESSON 09

Tracing Algorithms: Trace Tables, Test Plans and Correctness

Trace tables, dry runs and test plans for checking that an algorithm is correct.

Syllabus: U1 M2 SO7, SO8

LESSON 10

Developing Algorithms from Case Problems

Building complete algorithms from case problems, step by step, and writing them in C.

Syllabus: U1 M2 SO9, SO10

All 10 Module 2 lessons are live, in teaching order.

Module 3: Programming (13 lessons)

LESSON 01

Programming Paradigms: Imperative, Object-Oriented, Functional and Declarative

Imperative, object-oriented, functional and declarative programming, with SQL as the main declarative example.

Syllabus: U1 M3 SO1

LESSON 02

How Programs Are Translated and Run

Assemblers, compilers, interpreters and virtual machines, and the stages of compiling a C program.

Syllabus: U1 M3 SO2

LESSON 03

Variables, Data Types and Assignment in C (with enum)

Declaring and assigning variables in C, data types, integer division, casting, constants and enum.

Syllabus: U1 M3 SO3

LESSON 04

Input and Output in C: scanf, printf and Formatted Reports

printf and scanf, format specifiers, width and precision, report tables and the input buffer.

Syllabus: U1 M3 SO4

LESSON 05

Selection in C: if, else if and switch

if, else if, nested if and switch in C, with relational and logical operators.

Syllabus: U1 M3 SO5

LESSON 06

Loops in C: for, while and do-while

for, while and do-while loops in C, with totals, counts, validation and nested loops.

Syllabus: U1 M3 SO5

LESSON 07

Arrays in C: Storing Lists, Searching, Merging and Splitting

Arrays in C: reading, searching, totals, largest value, merging and splitting.

Syllabus: U1 M3 SO6

LESSON 08

Strings in C: Working with Text in char Arrays

Strings as char arrays: fgets, strlen, strcpy, strcat, strcmp and character processing.

Syllabus: U1 M3 SO6

LESSON 09

Functions in C: Parameters, Return Values and Breaking Programs into Parts

Functions in C: prototypes, parameters, return values, scope and breaking a program into parts.

Syllabus: U1 M3 SO7

LESSON 10

Testing, Debugging and Good Style in C

Testing and debugging C programs: error types, test plans, trace tables, debuggers and good style.

Syllabus: U1 M3 SO8, SO11

LESSON 11

Records in C: Grouping Data with struct

Records in C with struct: fields, arrays of records, searching and sorting.

Syllabus: U1 M3 SO9

LESSON 12

Text Files in C: Saving, Loading and Appending Data

Text files in C: fopen modes, fprintf, fscanf, fgets, and saving and loading records.

Syllabus: U1 M3 SO10

LESSON 13

Choosing a Programming Language: C, C++, Java, JavaScript and Python Compared

Why there are many programming languages, and C, C++, Java, JavaScript and Python compared.

Syllabus: U1 M3 SO12, SO13

All 13 Module 3 lessons are live, in teaching order.


Unit 2: Further Topics in Computer Science

Unit 2 follows the same pattern, with C examples throughout. Module 1 is live below. Modules 2 and 3 are coming soon.

  • Module 1: Data Structures. Stacks, queues, linked lists, searching and sorting. Live now.
  • Module 2: Software Engineering. Software development life cycles, analysis, design, testing and project management.
  • Module 3: Operating Systems and Computer Networks. Operating system functions, network types, devices, topologies, protocols and security.

Module 1: Data Structures (10 lessons)

LESSON 01

Abstract Data Types: Primitive vs Non-Primitive, Linear vs Non-Linear, and Core Operations

Abstract data types: primitive vs non-primitive, linear vs non-linear, and the four core operations.

Syllabus: U2 M1 SO1

LESSON 02

Stacks: LIFO, Push, Pop, Empty and Full (Diagrams and Algorithms)

Stacks as LIFO: Push, Pop, Empty and Full on diagrams and in pseudocode.

Syllabus: U2 M1 SO2, SO3

LESSON 03

Building a Stack in C with an Array

A stack in C with a one-dimensional array: push, pop, overflow and underflow checks.

Syllabus: U2 M1 SO4

LESSON 04

Queues: FIFO, Enqueue, Dequeue and Linear Queues in C

Queues as FIFO: Enqueue and Dequeue, front and rear, and linear queues in C.

Syllabus: U2 M1 SO2, SO3, SO4

LESSON 05

Circular Queues: Wrapping Around, Full vs Empty, in C

Circular queues: wrap-around with MOD, telling full from empty, in pseudocode and C.

Syllabus: U2 M1 SO2, SO3, SO4

LESSON 06

Singly Linked Lists: Diagrams, Algorithms and Array-Based Nodes in C

Singly linked lists: nodes, head and NULL, insert and delete, and an array-based C version.

Syllabus: U2 M1 SO1, SO2, SO3

LESSON 07

Searching in C: Linear Search and Binary Search

Linear and binary search in pseudocode and C, with comparison counts and tracing.

Syllabus: U2 M1 SO5

LESSON 08

Selection Sort in C

Selection sort: pass-by-pass traces, the algorithm in C, and counting comparisons and swaps.

Syllabus: U2 M1 SO5

LESSON 09

Bubble Sort in C

Bubble sort: neighbour swaps, the shrinking inner loop and the early-exit flag, in C.

Syllabus: U2 M1 SO5

LESSON 10

Selection Sort vs Bubble Sort Compared

Selection sort vs bubble sort: comparisons, swaps, best and worst cases, and which to choose.

Syllabus: U2 M1 SO5

All 10 Module 1 lessons are live, in teaching order.

Updates

2026/12/01

– Published Unit 2 Module 1: Data Structures (10 lessons) and added lesson cards for it.

– Updated the copyright line.

– Published Unit 1 Module 2 (10 lessons) and Module 3 (13 lessons), and added lesson cards for both modules.

– The Stage 1 note now points to the live C lessons in Module 3, and Course pages now links to the Lesson List.

2026/11/23

– Tidied the Updates section.

– Added space between the lesson cards.

– Published lessons 10 and 12 to 16. All 16 Module 1 lessons are now live, in teaching order.

– Published lessons 05 to 09 and updated the Module 1 list (lessons 01 to 09 live; The SR Latch is now lesson 11).

11 Nov 2026

– Draft created: course overview, how the course is taught, and the Unit 1, Module 1 lesson list (6 lessons).

– Published: course overview and Unit 1, Module 1 lessons 01 to 06.

© 2026 islandclass.org