| From → To | Method |
|---|---|
| Binary → Decimal | Multiply each bit by 2ⁿ (n = position from right, starting at 0) and add. |
| Decimal → Binary | Repeated division by 2, record remainders, read upwards. |
| Decimal → Hexadecimal | Repeated division by 16, use A–F for 10–15, read upwards. |
| Hex → Binary | Replace each hex digit with its 4‑bit binary equivalent. |
| Binary → Hex | Group bits in fours from the right, convert each group to a hex digit. |
Example (8‑bit, –25): 25 = 0001 1001 → invert = 1110 0110 → add 1 = 1110 0111.
Example (8‑bit unsigned): 200 (1100 1000) + 100 (0110 0100) = 300 → result wraps to 0010 1100 (44) and an overflow flag is set.
| Serial | Parallel |
|---|---|
| One bit sent at a time over a single channel; cheaper, longer distances, lower pin count. | Multiple bits sent simultaneously over multiple channels; faster over short distances, more expensive. |
A typical data packet consists of:
| Level | Typical device | Speed | Cost/bit |
|---|---|---|---|
| CPU registers | Register file | Fastest | Very high |
| Cache | L1/L2/L3 cache | Very fast | High |
| Main memory | RAM (DRAM) | Fast | Medium |
| Secondary storage | SSD / HDD | Slower | Low |
| Archive | Optical disc, tape | Slowest | Very low |
A virtual machine (VM) emulates a complete computer system, allowing multiple OSes to run on a single physical machine. Cloud services (IaaS, PaaS, SaaS) provide remote resources over the Internet.
| Topology | Key features |
|---|---|
| Star | All nodes connect to a central hub/switch; easy to manage, single point of failure. |
| Bus | All nodes share a single cable; inexpensive but prone to collisions. |
| Ring | Each node connects to two neighbours; token passing controls access. |
| Mesh | Multiple redundant paths; high reliability, costly. |
The Internet is a global network of networks using the TCP/IP suite. The Web is an application layer that uses HTTP/HTTPS to retrieve hyper‑text documents (HTML) from web servers.
| Validation (Does it do the right thing?) | Verification (Is it written correctly?) |
|---|---|
| Compare results with the problem specification; use a range of test data covering all requirements. | Check syntax, correct use of control structures, proper indentation and naming conventions in pseudocode/code. |
A trace table records the values of all relevant variables after each step of an algorithm.
# Example: add numbers 1‑5 using a FOR loop Step | i | total -----+---+------- Init | – | 0 i=1 | 1 | 1 i=2 | 2 | 3 i=3 | 3 | 6 i=4 | 4 |10 i=5 | 5 |15
All three representations must be kept in sync:
Read a sequence of positive integers (terminated by a negative number) and output the largest value, the number of values entered, and the position of the maximum.
max ← -∞
count ← 0
pos ← -1
i ← 0
WHILE TRUE DO
i ← i + 1
READ value
IF value < 0 THEN
EXIT WHILE
ENDIF
count ← count + 1
IF value > max THEN
max ← value
pos ← i
ENDIF
ENDWHILE
WRITE "Maximum value is:", max
WRITE "Numbers entered:", count
WRITE "Position of maximum:", pos
def find_max():
max_val = float('-inf')
count = 0
pos = -1
i = 0
while True:
i += 1
value = int(input("Enter a number (negative to stop): "))
if value < 0:
break
count += 1
if value > max_val:
max_val = value
pos = i
print("Maximum value is:", max_val)
print("Numbers entered:", count)
print("Position of maximum:", pos)
find_max()
value (parallelogram)value < 0? (diamond)
count ← count + 1; i ← i + 1 (rectangle)value > max?
max ← value; pos ← itotal and update it inside the loop.total += value and compute average = total / count after the loop.variable ← expression; constants written in UPPERCASE and never altered.READ, WRITE in pseudocode; input(), print() in Python.+, -, *, / (float), // (integer division), % (modulus).=, ≠, <, >, ≤, ≥.AND, OR, NOT.IF … THEN … ELSE … ENDIF (or if … else … in Python).FOR … ENDFOR, WHILE … ENDWHILE.RETURN).scores[10] – indices start at 1 in Cambridge pseudocode.matrix[3][3] – rows then columns.len(), range(), Math.sqrt(), sorted(), etc.
OPEN file_name FOR READ AS f
WHILE NOT EOF(f) DO
READ line FROM f
… # process line
ENDWHILE
CLOSE f
Python equivalent:
with open('data.txt', 'r') as f:
for line in f:
# process line
pass
i ← i + 1 (pseudocode) or i += 1 (Python).= in pseudocode, == in Python.-- SELECT SELECT field1, field2 FROM table_name WHERE condition ORDER BY field ASC|DESC; -- AGGREGATE functions SELECT SUM(sales) FROM orders WHERE year = 2023; SELECT COUNT(*) FROM students WHERE grade = 'A'; SELECT AVG(score) FROM results;
students| student_id (PK) | name | age | grade |
|---|---|---|---|
| 1 | Alice | 14 | A |
| 2 | Bob | 15 | B |
| 3 | Clara | 14 | A |
Write an SQL query to list the names of all students who scored above the class average.
SELECT name FROM students WHERE grade > (SELECT AVG(grade) FROM students);
AND, OR, NOT (or symbols ∧, ∨, ¬).NOT (A AND B) ≡ (NOT A) OR (NOT B)
NOT (A OR B) ≡ (NOT A) AND (NOT B)
Construct a row for every possible combination of inputs (2ⁿ rows for n inputs) and compute the output.
Design a circuit for (A AND B) OR NOT C.
| Criterion | What Examiners Look For |
|---|---|
| Algorithm design | Correct choice of method, appropriate decomposition, clear flow‑control, no off‑by‑one errors. |
| Pseudocode | Consistent indentation, correct Cambridge symbols, meaningful variable names, use of constants where required. |
| Program code | Valid syntax, correct use of loops/conditions, proper handling of input‑output and file operations. |
| Flowchart | All required symbols present, arrows show unambiguous direction, loop back‑arrows labelled, no crossing lines. |
| Testing & debugging | Trace tables included, edge cases covered, evidence of validation and verification. |
| Boolean logic & circuits | Correct truth‑table entries, simplified Boolean expression, accurate gate diagram. |
| Database & SQL | Correct identification of primary key, appropriate field types, syntactically correct SELECT statements. |
| Security & ethics | Relevant terminology used, awareness of legal/ethical implications. |
n using a FOR loop.
i = 1
while i <= 10:
print(i)
# missing increment
max, count, pos and total for the input sequence 7, 3, 9, 2, -1.| A | B | C | Result |
|---|---|---|---|
| 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 1 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 0 |
11010110 to decimal and hexadecimal.student_id and name of all students whose grade is higher than the class average.
factorial ← 1
FOR i ← 1 TO n DO
factorial ← factorial * i
ENDFOR
WRITE factorial
i += 1 inside the while block.total ← total + value inside the loop and after the loop compute average ← total / count; output average as well.
Step | value | max | count | pos | total
1 | 7 | 7 | 1 | 1 | 7
2 | 3 | 7 | 2 | 1 |10
3 | 9 | 9 | 3 | 3 |19
4 | 2 | 9 | 4 | 3 |21
5 | -1 | 9 | 4 | 3 |21 (loop ends)
Result = NOT C AND (NOT A OR NOT B) (or equivalently Result = ¬C ∧ (¬A ∨ ¬B)). Gate diagram uses a NOT gate on C, NOT gates on A and B, an OR gate combining ¬A and ¬B, then an AND gate with the output of the OR and ¬C.11010110₂ = 214₁₀ = D6₁₆.
SELECT student_id, name
FROM students
WHERE grade > (SELECT AVG(grade) FROM students);
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.