Write algorithms using pseudocode or flowcharts

Cambridge IGCSE Computer Science (0478) – Complete Revision Notes

This single‑page resource covers all syllabus sections (1‑6 Computer Systems and 7‑10 Algorithms, Programming & Logic). It is designed for quick exam revision – clear headings, bullet points, tables, and exam‑style examples.


1 – 6 Computer Systems

1.1 Data Representation

  • Number systems – binary, octal, decimal, hexadecimal.
    • Conversion example: 45₁₀ = 101101₂ = 55₈ = 2D₁₆
  • Signed numbers – two’s complement (invert bits + 1). Example: −13 (8‑bit) = 11110011₂
  • Character encoding
    • ASCII – 7‑bit, e.g. A = 65₁₀ = 01000001₂
    • Unicode – 16‑bit (UTF‑16) or variable‑length (UTF‑8)
  • Image representation
    • Pixel = colour depth × number of pixels.
    • Example: 640 × 480 image, 24‑bit colour → 640×480×24 = 7 372 800 bits ≈ 900 KB
  • Sound representation
    • Sample rate × bit depth × channels × time.
    • Example: 44.1 kHz, 16‑bit stereo, 10 s → 44 100×16×2×10 = 14 112 000 bits ≈ 1.68 MB
  • Colour models – RGB (8‑bit per channel), hexadecimal colour code (e.g. #FF00AA).
  • Data compression
    • Lossless – e.g. ZIP, PNG.
    • Lossy – e.g. MP3, JPEG.
  • Error‑detection & correction
    • Parity bit (even/odd).
    • Checksum, CRC.
  • Simple encryption – Caesar shift, substitution, symmetric key (e.g. DES), public‑key basics.

1.2 Computer Hardware

  • CPU – ALU, control unit, registers, cache (L1/L2), instruction set, clock speed.
  • Memory hierarchy
    • Registers (nanoseconds), cache, primary RAM, secondary storage (HDD/SSD), tertiary (magnetic tape, cloud).
  • Embedded systems – microcontrollers, real‑time control, sensors & actuators.
  • I/O devices – input (keyboard, mouse, scanner), output (monitor, printer, speaker), storage (USB, CD‑ROM).
  • Network hardware – NIC, router, switch, hub, modem, access point.
  • Storage media characteristics
    • Volatile vs. non‑volatile, magnetic vs. solid‑state, capacity units (bit, byte, KiB, MiB, GiB).

1.3 Software

  • System software – Operating System (OS) functions: process management, memory management, file system, device drivers.
  • Application software – word processors, browsers, games, specialised apps.
  • Utility programmes – antivirus, backup, compression, disk defragmenter.
  • Programming‑language categories
    • Low‑level (machine, assembly) vs. high‑level (Python, Java).
    • Compiled (C, Pascal) vs. interpreted (BASIC, Python).
  • Interrupts – hardware & software signals that temporarily suspend the CPU’s current task.

1.4 The Internet & Data Transmission

  • Client/Server model – request/response paradigm.
  • Addressing
    • MAC address (hardware, 48‑bit).
    • IP address – IPv4 (dotted decimal) e.g. 192.168.0.1, IPv6 (hex groups).
  • Domain Name System (DNS) – translates URLs to IP addresses.
  • Packet structure – header (source/destination IP, protocol, length, checksum) + data + footer (optional).
  • Key protocols
    • HTTP / HTTPS (web), TCP (reliable), UDP (unreliable), FTP (file transfer), SMTP (email).
  • Data transmission concepts
    • Bandwidth, latency, packet loss, error‑control (ARQ).

1.5 Cyber‑Security

  • Common threats – virus, worm, Trojan, ransomware, phishing, DDoS, spyware.
  • Vulnerabilities – weak passwords, unpatched software, social engineering.
  • Security measures
    • Firewalls, antivirus/anti‑malware, encryption (AES, RSA), authentication (passwords, biometrics, 2‑FA), hashing (SHA‑256), digital signatures, PKI.
  • Safe Internet use – strong passwords, regular updates, backup, avoid suspicious links, use HTTPS.

1.6 Emerging Technologies

  • Artificial Intelligence & Machine Learning – supervised vs. unsupervised learning, neural networks (basic concept).
  • Robotics – sensors, actuators, control algorithms (feedback loops).
  • Internet of Things (IoT) – networked devices, data collection, cloud integration.
  • Big Data – 3 Vs (volume, velocity, variety), simple analysis (sorting, counting).
  • Blockchain & Digital Currency – distributed ledger, hashing, decentralised verification.
  • Cloud Computing – SaaS, PaaS, IaaS, virtualisation.

1.7 Quick‑Reference Table – Symbols & Units

Symbol / TermMeaningUnit / Example
bitbinary digit (0 or 1)1 bit = 0.125 bytes
byte8 bitsASCII character = 1 byte
KiB, MiB, GiB2¹⁰, 2²⁰, 2³⁰ bytes1 MiB = 1 048 576 bytes
MACMedia Access Control address48‑bit hardware identifier
IPInternet Protocol addressIPv4: 4 × 8‑bit octets
TTLTime‑to‑Live (packet hops)Typical default = 64
CRCCyclic Redundancy CheckUsed in Ethernet frames
ASCIIAmerican Standard Code for Information Interchange0‑127 decimal codes
UnicodeUniversal character setU+1F600 = 😀

7 – 10 Algorithms, Programming & Logic

2.1 The Complete Problem‑Solving Cycle

  1. Understand the problem – list inputs, required processing, expected outputs.
  2. Analyse – decompose into sub‑tasks, choose efficient structures (loops, decisions, arrays).
  3. Design – sketch a flowchart or write a pseudocode outline.
  4. Write – produce the full algorithm using syllabus‑specific conventions.
  5. Validate & Verify – ensure inputs are acceptable and the algorithm logically solves the problem.
  6. Test – run with typical, edge‑case, and invalid data; record results in a trace table.
  7. Refine – improve efficiency, readability, add comments.
  8. Document – title, START … END, assumptions, and any limitations.

2.2 Pseudocode – Syllabus‑Specific Conventions

2.2.1 General Rules
  • Plain English – no programming‑language syntax (no semicolons, braces, etc.).
  • One statement per line.
  • Indentation shows structure (4 spaces per block).
  • All keywords in UPPER CASE.
  • Optional line numbers: 1: INPUT n.
  • Comments start with // and occupy the remainder of the line.
2.2.2 Mandatory Keywords
KeywordPurpose
START / ENDMarks the entry and exit points.
INPUT / OUTPUTRead from or write to the user.
IF … THEN … ELSE … END IFTwo‑way decision.
CASE … OF … END CASEMultiple‑choice decision (optional).
FOR … TO … STEP … END FORCount‑controlled loop.
WHILE … DO … END WHILEPre‑test condition loop.
REPEAT … UNTIL … END REPEATPost‑test condition loop.
2.2.3 Allowed Operators
CategoryOperators
Arithmetic+  −  *  /  DIV  MOD
Relational=  ≠  <  ≤  >  ≥
BooleanAND  OR  NOT
2.2.4 Variable‑Naming Conventions
  • Meaningful, PascalCase (e.g., TotalScore).
  • First character a letter; subsequent characters letters or digits.
  • No underscores; case‑insensitive.
  • Implicit declaration on first use.
2.2.5 Pseudocode Checklist (Exam Quick‑Review)
Item
START and END present
All keywords in UPPER CASE
One statement per line
Correct indentation (4‑space blocks)
Only allowed operators used
Variable names follow conventions
Comments start with // (optional)
Loops and decisions closed correctly (END IF, END FOR, …)

2.3 Flowcharts – Standard Symbols & Layout Rules

SymbolNamePurpose
⧈ (rounded rectangle)Start / EndEntry and exit points.
▭ (rectangle)ProcessAssignment, calculation, or any non‑decision operation.
▱ (parallelogram)Input / OutputRead data or display results.
◇ (diamond)DecisionTest a condition – two arrows labelled Yes / No.
⬥ (pentagon) – optionalConnectorLinks separate parts of a large chart (labelled A, B, …).
Layout Guidelines
  • Flow direction: top‑to‑bottom, left‑to‑right.
  • One operation per process symbol.
  • Arrows must be clear; avoid crossing lines where possible.
  • Label decision arrows (Yes / No or True / False).
  • Title above the chart (e.g., “Average of Positive Numbers”).

2.4 Validation, Verification & Testing

2.4.1 Validation (checking input)
  • Range check – IF n < 1 THEN …
  • Length check – for strings or lists.
  • Type check – ensure numeric input.
  • Format check – e.g., date DD/MM/YYYY.
  • Checksum / check‑digit – e.g., ISBN validation.
2.4.2 Verification (does it do the right thing?)
  • Use a trace table to record variable values after each step.
  • Compare algorithm output with expected results for known inputs.
2.4.3 Sample Trace‑Table Template
StepVariable(s)Values after step
Initialisationsum0
Loop 1 (i=1)i, sum1, 0
Loop 2 (i=2)i, sum2, 2
After loopsum12 (for n=6)
2.4.4 Test‑Data Recommendations
  • Typical case – e.g., n = 10.
  • Edge cases – n = 1, n = 0, very large n.
  • Invalid input – negative numbers, non‑numeric characters, out‑of‑range dates.

2.5 Core Programming Concepts (IGCSE Level)

  • Variables & Data Types – integer, real, Boolean, character, string.
  • Operators – arithmetic, relational, Boolean (as listed above).
  • Control structures – IF…THEN, CASE, FOR, WHILE, REPEAT.
  • Arrays
    • One‑dimensional only (e.g., scores[10]).
    • Index starts at 0 or 1 – be consistent.
    • Example: sum of array elements.
  • File handling (basic) – OPEN, READ, WRITE, CLOSE (exam may ask to describe only).
  • Databases (basic) – tables, records, fields, primary key, simple SELECT query description.
  • Boolean logic & logic gates – AND, OR, NOT, NAND, NOR, XOR; truth tables useful for decision making.
Array Example – Find Maximum Value
// Find the maximum number in an array of 5 integers
START
    FOR i ← 1 TO 5 DO
        INPUT number
        numbers[i] ← number
    END FOR

    max ← numbers[1]
    FOR i ← 2 TO 5 DO
        IF numbers[i] > max THEN
            max ← numbers[i]
        END IF
    END FOR
    OUTPUT "Maximum =", max
END
File‑Handling Example (description only)

Open a text file “scores.txt” for reading, read each line into a variable score, add to a total, close the file, then output the average.

Database Example (description)

Table Students with fields StudentID, Name, Mark. To list students with marks ≥ 70: SELECT Name, Mark FROM Students WHERE Mark ≥ 70;


Worked Example – Sum of All Even Numbers from 1 to n

Problem Statement

Read a **positive integer** n and output the sum of all even numbers between 1 and n inclusive.

Pseudocode Solution

// Sum of even numbers
START
    INPUT n
    // Validation
    IF n < 1 THEN
        OUTPUT "Error: n must be positive"
        END
    END IF

    sum ← 0
    FOR i ← 1 TO n DO
        IF i MOD 2 = 0 THEN
            sum ← sum + i
        END IF
    END FOR
    OUTPUT sum
END

Flowchart (text description – draw using symbols above)

  1. Start (⧈)
  2. Input n (▱)
  3. Decision n < 1 ? (◇)
    • Yes → Output error (▱) → End.
    • No → Continue.
  4. Process sum ← 0 (▭)
  5. Loop (FOR) i = 1 … n (▭ with loop arrows)
    • Decision i MOD 2 = 0 ? (◇)
      • Yes → Process sum ← sum + i (▭)
      • No → Back to loop.
  6. Output sum (▱)
  7. End (⧈)

Sample Trace Table (n = 6)

ii MOD 2sum (after step)
110
202
312
406
516
6012

Quick‑Reference Summary (All Topics)

AreaKey Points
Data RepresentationBinary/hex conversion, two’s complement, ASCII/Unicode, image & sound size formulas, compression, error‑detect, simple encryption.
Computer HardwareCPU components, registers, cache, memory hierarchy, embedded systems, I/O devices, network hardware.
SoftwareOS functions, utility programmes, language categories, interrupts.
Internet & TransmissionClient/Server, MAC & IP, DNS, packet header fields, HTTP/HTTPS, TCP/UDP, FTP, SMTP.
Cyber‑SecurityThreats (virus, ransomware, phishing, DDoS), safeguards (firewall, antivirus, encryption, hashing, 2‑FA).
Emerging TechAI/ML basics, robotics control loop, IoT data flow, big‑data 3 Vs, blockchain hashing, cloud service models.
AlgorithmsProblem‑solving cycle, pseudocode conventions, flowchart symbols, validation, verification, testing, trace tables.
Programming ConceptsVariables, data types, operators, IF/CASE, loops, arrays (1‑D), file handling description, simple database query, Boolean logic.

Use this sheet to tick each syllabus requirement, practice the examples, and test yourself with the provided trace tables. Good luck with your IGCSE Computer Science exam!

Create an account or Login to take a Quiz

45 views
0 improvement suggestions

Log in to suggest improvements to this note.