| Topic | Key Sub‑points (exam‑required) |
|---|---|
| 1. Computer Systems | CPU, RAM, ROM, motherboard, input/output devices, storage, binary ↔ decimal ↔ hexadecimal, two’s‑complement, basic logic gates. |
| 2. Data Representation & Transmission | Bits & bytes, ASCII, Unicode, image/audio/video encoding, data compression, packet structure, error‑detecting codes (parity, checksum). |
| 3. Hardware & Software | Operating system functions, firmware, drivers, high‑level vs low‑level languages, compiler vs interpreter, IDEs, debugging tools. |
| 4. Internet & Cyber‑Security | IP, MAC, DNS, HTTP/HTTPS, cookies, firewalls, encryption basics, common threats (malware, phishing, DDoS), safe computing. |
| 5. Emerging Technologies | AI & machine learning basics, cloud computing, IoT, robotics, ethical considerations. |
| 6. Boolean Logic & Digital Circuits | Truth tables, Boolean algebra, logic gate symbols, simplification, combinational vs sequential circuits. |
| 7. Algorithms & Flowcharts | Algorithm design cycle (Analyse‑Design‑Code‑Test), flowchart symbols, pseudocode conventions, trace tables. |
| 8. Programming – Arrays & Loops | Array declaration, bounds, 1‑D & 2‑D processing, FOR/WHILE/DO‑WHILE loops, nested loops, common array algorithms, validation. |
| 9. Databases | Data tables, primary keys, simple SQL SELECT/INSERT/UPDATE, relational concepts. |
| 10. Evaluation (AO3) | Testing, debugging, efficiency, safety (bounds checking), suitability of solutions. |
| AO | What the exam looks for in this topic |
|---|---|
| AO1 – Knowledge & Understanding | Define an array, state its bounds, describe why loops are used, list the three loop types. |
| AO2 – Application of Knowledge | Write correct Cambridge‑style pseudocode (including line numbers, indentation, comments) to declare arrays, traverse them, and implement common algorithms. |
| AO3 – Evaluation | Test algorithms with trace tables, discuss off‑by‑one errors, show how to check array bounds and handle invalid input, comment on efficiency and readability. |
1. DECLARE Scores : ARRAY[0:9] OF INTEGER 2. FOR i ← 0 TO 9 DO// and are ignored by the examiner when marking logic.FOR, IF, THEN, END IF, NEXT, OUTPUT.TO upper, never <= upper in the pseudocode.lower … upper.0 or 1 (or any other integer), but the same lower bound must be used in every loop that accesses the array.| Array type | Declaration syntax | Example |
|---|---|---|
| One‑dimensional (1‑D) | DECLARE name : ARRAY[lower:upper] OF type |
DECLARE Scores : ARRAY[0:9] OF INTEGER // 10 scores |
| Two‑dimensional (2‑D) | DECLARE name : ARRAY[low1:up1, low2:up2] OF type |
DECLARE Matrix : ARRAY[1:3, 1:3] OF INTEGER // 3×3 matrix |
General pattern (Cambridge style, with line numbers and indentation):
1. FOR i ← lower TO upper DO 2. // process Array[i] 3. NEXT i
For DECLARE Scores : ARRAY[0:9] OF INTEGER the loop becomes:
1. FOR i ← 0 TO 9 DO 2. // e.g. total ← total + Scores[i] 3. NEXT i
1. DECLARE Scores : ARRAY[0:9] OF INTEGER 2. DECLARE total, average ← 0 3. FOR i ← 0 TO 9 DO 4. total ← total + Scores[i] 5. NEXT i 6. average ← total / 10 7. OUTPUT "Sum = ", total 8. OUTPUT "Average = ", average
1. DECLARE Scores : ARRAY[0:9] OF INTEGER 2. DECLARE max ← Scores[0] 3. FOR i ← 1 TO 9 DO 4. IF Scores[i] > max THEN 5. max ← Scores[i] 6. END IF 7. NEXT i 8. OUTPUT "Maximum = ", max
1. DECLARE Data : ARRAY[1:10] OF INTEGER 2. DECLARE min, count, value ← 0 3. FOR i ← 1 TO 10 DO 4. INPUT value 5. Data[i] ← value 6. IF i = 1 THEN 7. min ← value 8. count ← 1 9. ELSIF value = min THEN 10. count ← count + 1 11. ELSIF value < min THEN 12. min ← value 13. count ← 1 14. END IF 15. NEXT i 16. OUTPUT "Smallest value = ", min 17. OUTPUT "Occurs ", count, " times"
1. DECLARE Scores : ARRAY[0:9] OF INTEGER 2. DECLARE target, count ← 0 3. INPUT target 4. FOR i ← 0 TO 9 DO 5. IF Scores[i] = target THEN 6. count ← count + 1 7. END IF 8. NEXT i 9. OUTPUT "Target occurs ", count, " times"
1. DECLARE Scores : ARRAY[0:9] OF INTEGER 2. DECLARE temp ← 0 3. FOR i ← 0 TO (10 DIV 2) - 1 DO 4. temp ← Scores[i] 5. Scores[i] ← Scores[9 - i] 6. Scores[9 - i] ← temp 7. NEXT i
1. DECLARE Names : ARRAY[1:30] OF STRING 2. FOR i ← 1 TO 30 DO 3. Names[i] ← "" // empty string – clears the element 4. NEXT i
1. DECLARE Matrix : ARRAY[1:3, 1:3] OF INTEGER 2. // ----- Input all elements ----- 3. FOR row ← 1 TO 3 DO 4. FOR col ← 1 TO 3 DO 5. INPUT Matrix[row, col] 6. NEXT col 7. NEXT row 8. // ----- Output the matrix ----- 9. FOR row ← 1 TO 3 DO 10. FOR col ← 1 TO 3 DO 11. OUTPUT Matrix[row, col] // space between values 12. NEXT col 13. OUTPUT NEWLINE 14. NEXT row
lower … upper is a logical error that can cause wrong results or runtime failures.1. DECLARE Scores : ARRAY[0:9] OF INTEGER 2. DECLARE i, value ← 0 3. FOR i ← 0 TO 9 DO 4. INPUT value 5. IF value < 0 OR value > 100 THEN 6. OUTPUT "Invalid – enter 0‑100" 7. i ← i - 1 // repeat this iteration 8. ELSE 9. Scores[i] ← value 10. END IF 11. NEXT i
1. IF index < lower OR index > upper THEN
2. OUTPUT "Index out of range"
3. ELSE
4. // safe to use Array[index]
5. END IF
| AO | Typical Marks & What Examiners Look For |
|---|---|
| AO1 (Knowledge) | Define array, state lower/upper bounds, list the three loop types, explain why loops are used (2‑3 marks). |
| AO2 (Application) | Write correct pseudocode with line numbers, proper indentation, and comments. Include declaration, loop, and at least one array algorithm (4‑6 marks). |
| AO3 (Evaluation) | Provide a trace table, discuss off‑by‑one errors, show a bounds‑checking routine, comment on efficiency (e.g., single‑pass vs two‑pass) (3‑4 marks). |
upper bound you declared. Use FOR i ← lower TO upper (inclusive).i <= upper in Cambridge pseudocode; use the TO keyword.total ← 0, count ← 0, max/min ← first element before the loop.| Step | i | Scores[i] | total (after addition) |
|---|---|---|---|
| Initialise | – | – | 0 |
| 1 | 0 | 78 | 78 |
| 2 | 1 | 85 | 163 |
| ⋮ | ⋮ | ⋮ | ⋮ |
| 10 | 9 | 92 | 825 |
| After loop | – | – | 825 (average = 82.5) |
FOR loop, decide on accumulator initialisation, decide whether a single‑pass or two‑pass solution is more efficient.Question: Write pseudocode that reads 10 integer values into an array called Data, then outputs the smallest value and how many times it occurs.
Full Development Cycle Answer
min and count as each value is read).
1. DECLARE Data : ARRAY[1:10] OF INTEGER
2. DECLARE min, count, value ← 0
3. FOR i ← 1 TO 10 DO
4. INPUT value
5. Data[i] ← value
6. IF i = 1 THEN
7. min ← value
8. count ← 1
9. ELSIF value = min THEN
10. count ← count + 1
11. ELSIF value < min THEN
12. min ← value
13. count ← 1
14. END IF
15. NEXT i
16. OUTPUT "Smallest value = ", min
17. OUTPUT "Occurs ", count, " times"
| Test # | Input values | Expected min | Expected count |
|---|---|---|---|
| 1 | 5 3 8 3 9 2 2 7 2 4 | 2 | 3 |
| 2 | 10 10 10 10 10 10 10 10 10 10 | 10 | 10 |
DECLARE name : ARRAY[lower:upper] OF TYPEDECLARE name : ARRAY[low1:up1, low2:up2] OF TYPEFOR i ← lower TO upper DO … NEXT iFOR … TO ….FOR loop.Create an account or Login to take a Quiz
Log in to suggest improvements to this note.
Your generous donation helps us continue providing free Cambridge IGCSE & A-Level resources, past papers, syllabus notes, revision questions, and high-quality online tutoring to students across Kenya.