Use flowcharts, structure diagrams and pseudocode to construct a solution

Cambridge IGCSE Computer Science (0478) – Complete Syllabus Notes

Learning Objective

Use flowcharts, structure diagrams and pseudocode to construct a solution to a given problem, and understand the wider context of computer systems, data representation, networking, cyber‑security and emerging technologies as required by the Cambridge IGCSE syllabus.


1. Computer Systems

1.1 Number Systems & Data Representation

  • Decimal (base 10) – digits 0‑9.
  • Binary (base 2) – digits 0 and 1. Used internally by all computers.
  • Hexadecimal (base 16) – digits 0‑9 and A‑F. Convenient for grouping binary bits in fours.
Conversion Methods (required for the exam)
From → ToMethod
Decimal → BinaryRepeated division by 2; record remainders (least‑significant bit first).
Binary → DecimalSum of each bit × 2ⁿ (n = position index, starting at 0).
Decimal → HexadecimalRepeated division by 16; record remainders (0‑9, A‑F).
Hexadecimal → BinaryReplace each hex digit with its 4‑bit binary equivalent.
Binary → HexadecimalGroup binary digits into 4‑bit blocks (add leading 0’s if needed) and convert each block.
Two’s‑Complement (signed integers)
  1. Invert all bits (one’s complement).
  2. Add 1 to the result.
  3. The most‑significant bit (MSB) indicates the sign (0 = positive, 1 = negative).
Floating‑Point Representation (IEEE‑754 single precision)
  • 1 bit sign, 8 bits exponent (bias = 127), 23 bits mantissa (fraction).
  • Value = (‑1)sign × 1.mantissa × 2(exponent‑127).
  • Used for very large or very small real numbers; precision ≈ 7 decimal digits.
Overflow & Underflow (8‑bit arithmetic)

When an addition or subtraction produces a result outside the range 0‑255 (unsigned) or –128‑127 (signed), the processor sets an overflow flag. In the exam you may be asked to indicate whether overflow occurs.

Character Encoding
EncodingBits per characterTypical use
ASCII7 bits (often stored in 8‑bit bytes)Basic English text
Unicode (UTF‑8)1‑4 bytes per characterWorld‑wide text, emojis, etc.
Data Types for Text, Sound & Images
  • Text – stored as a sequence of characters (ASCII/Unicode).
  • Sound – sampled at a given sample rate (e.g., 44 kHz) and stored with a bit depth (e.g., 16 bits).
    File‑size formula: size (bits) = sample‑rate × bit‑depth × duration (seconds) Example: 44 000 samples × 16 bits × 5 s = 3 520 000 bits = 440 kB.
  • Images – defined by resolution (pixels) and colour depth (bits per pixel). File‑size formula: size (bits) = width × height × colour‑depth Example: 800 × 600 pixels, 24‑bit colour → 800 × 600 × 24 = 11 520 000 bits ≈ 1.44 MB.
Data Compression
  • Lossless – original data can be perfectly reconstructed (e.g., ZIP, PNG).
  • Lossy – some information is discarded for higher compression (e.g., MP3, JPEG).

1.2 Hardware & Architecture

  • CPU (Central Processing Unit)
    • ALU – performs arithmetic and logical operations.
    • Control unit – carries out the fetch‑decode‑execute cycle.
    • Registers – very fast, small storage (e.g., accumulator, program counter).
  • Von Neumann Architecture – single memory stores both data and instructions; the CPU fetches instructions sequentially unless a branch occurs.
    Simplified Von Neumann architecture showing CPU, memory, and I/O
    CPU ↔ Memory ↔ I/O devices (single bus for data & instructions)
  • Memory hierarchy
    • Primary: RAM (volatile) and ROM (non‑volatile).
    • Cache: L1 (fastest, smallest), L2, L3 – reduce latency between CPU and RAM.
    • Secondary: HDD, SSD, optical discs, magnetic tape.
  • Input/Output devices – keyboard, mouse, scanner, printer, monitor, speakers, touch screen, etc.
  • Bus architecture
    • Data bus – carries actual data.
    • Address bus – specifies memory locations.
    • Control bus – carries timing and control signals.
  • Motherboard & expansion slots – PCI, PCI‑e, USB, HDMI, etc.
  • Embedded systems – computers built into appliances, cars, medical devices; usually have a fixed set of functions and limited resources.

1.3 Software

  • System software – operating system (OS), device drivers, utility programs.
  • Application software – word processors, spreadsheets, databases, web browsers, games.
  • Development tools
    • IDE – editor, compiler/interpreter, debugger.
    • Compiler – translates high‑level code to machine code (e.g., C, Java).
    • Interpreter – executes code line‑by‑line (e.g., Python).

1.4 Networks & the Internet

  • Network types – LAN, WAN, MAN, PAN, Internet.
  • Topologies – star, bus, ring, mesh.
  • Transmission media – twisted‑pair, coaxial, fibre‑optic, wireless (Wi‑Fi, Bluetooth).
  • OSI Model (7 layers)
    1. Physical
    2. Data Link
    3. Network (IP)
    4. Transport (TCP/UDP)
    5. Session
    6. Presentation
    7. Application
  • Data Transmission Concepts
    • Serial vs. Parallel: Serial sends bits one after another over a single channel; parallel sends multiple bits simultaneously over multiple channels.
    • Simplex, Half‑duplex, Full‑duplex: direction of communication (one‑way, alternating, both‑ways simultaneously).
    • Packet structure – typical fields:
    FieldDescription
    HeaderSource & destination addresses, protocol information.
    PayloadActual data being transferred.
    TrailerError‑checking information (e.g., CRC).
    Simple packet diagram showing header, payload, trailer
    Header → Payload → Trailer
  • Internet basics
    • URL structure: protocol://domain[:port]/path?query#fragment
    • HTTP vs. HTTPS – HTTPS adds TLS/SSL encryption.
    • Cookies – small pieces of data stored on the client side for session management.

1.5 Error Detection & Correction

  • Parity bit – even or odd parity; example: data 1011001 → even parity bit = 0 (total number of 1’s becomes even).
  • Checksum – sum of data bytes; the receiver adds the checksum and expects a predefined result (often zero).
  • Automatic Repeat reQuest (ARQ) – sender retransmits a packet if the receiver reports an error.
  • Check digits – e.g., ISBN‑13: Sum = 1×d₁ + 3×d₂ + 1×d₃ + 3×d₄ + … + 3×d₁₂ Check digit = (10 – (Sum mod 10)) mod 10

1.6 Encryption

  • Symmetric encryption – same key for encryption and decryption (e.g., AES, DES). Fast, suitable for large data volumes.
  • Asymmetric encryption – pair of keys (public & private) (e.g., RSA, ECC). Used for secure key exchange and digital signatures.
  • Typical public‑key exchange diagram:
    Diagram showing Alice and Bob exchanging public keys and encrypting a session key
    Alice encrypts a session key with Bob’s public key; Bob decrypts with his private key.

1.7 Cyber‑Security

  • Common threats – malware (virus, worm, Trojan), phishing, DoS/DDoS, man‑in‑the‑middle, unauthorised access.
  • Counter‑measures
    • Firewalls – packet filtering, stateful inspection.
    • Encryption – symmetric (AES) and asymmetric (RSA) as above.
    • Authentication – passwords, biometrics, two‑factor authentication.
    • Secure coding – input validation, least privilege, proper error handling.
  • Legal & ethical issues – copyright, data protection (GDPR), computer misuse legislation.

1.8 Emerging Technologies

  • Artificial Intelligence (AI) – machine learning, neural networks, expert systems.
  • Robotics & Automation – sensors, actuators, programmable logic controllers (PLCs).
  • Internet of Things (IoT) – interconnected devices, cloud storage, edge computing.
  • Big Data & Data Mining – the 4 Vs: volume, velocity, variety, value.

2. Algorithms & Programming (Topic 7‑10)

2.1 What Is an Algorithm?

An algorithm is a finite, ordered set of unambiguous instructions that solves a problem or performs a task. It must be:

  • Clear – each step is understandable.
  • Finite – it terminates after a limited number of steps.
  • Effective – every step can be carried out in a reasonable amount of time.

2.2 Problem‑Solving Process (Six‑step model)

  1. Analyse the problem – list inputs, required outputs, constraints and special cases.
  2. Design a solution – choose a representation (flowchart, structure diagram, pseudocode) and decompose into sub‑problems if needed.
  3. Write pseudocode – follow Cambridge conventions (line numbers, indentation, comments).
  4. Translate to a programming language – implement the design in Python, Java, etc.
  5. Test and debug – run at least three test cases (including edge cases); correct any errors.
  6. Document – label diagrams, comment code, and write a brief description of the algorithm.

2.3 Flowchart Symbols (Cambridge Specification)

SymbolMeaningShape
Start/EndMarks the beginning or termination of the algorithmOval
ProcessPerforms an operation such as assignment or calculationRectangle
DecisionTests a condition; two outgoing arrows for True/FalseDiamond
Input/OutputReads data from the user or displays resultsParallelogram
ConnectorLinks separate parts of a flowchart (used when the diagram does not fit on one page)Circle

2.4 Structure Diagrams

Structure diagrams show the hierarchical relationship between modules (sub‑programs). They help visualise decomposition and data flow.

  • Top‑level box – labelled Main Program or Controller.
  • Sub‑boxes – represent individual modules such as InputData, ProcessData, DisplayResult.
  • Arrows indicate the direction of control and data flow.
Structure diagram with Main Program and three sub‑modules
Main Program → InputData → ProcessData → DisplayResult

2.5 Pseudocode Conventions (Cambridge)

ElementConvention (example)
Line numbering01 READ a
Assignment05 total ← a + b + c
Input02 READ a, b, c
Output10 WRITE "Average = ", average
Decision (IF)15 IF average ≥ 50 THEN
 WRITE "Pass"
ELSE
 WRITE "Fail"
ENDIF
Loop – WHILE20 WHILE i ≤ n DO
 sum ← sum + array[i]
 i ← i + 1
ENDWHILE
Loop – FOR30 FOR i ← 1 TO n DO
 WRITE array[i]
ENDFOR
Comment-- This is a comment

2.6 Control Structures

  • Sequence – statements executed one after another.
  • SelectionIF…THEN…ELSE or CASE statements.
  • RepetitionWHILE, FOR, REPEAT…UNTIL.

2.7 Data Structures (Basic)

  • Variables – single values (integer, real, Boolean, character, string).
  • Arrays (lists) – ordered collection of items of the same type; indexed from 1 (or 0 in some languages).
  • Records (structures) – group of related fields (e.g., student{name, id, grade}).

2.8 Testing & Debugging

Effective testing follows a systematic approach:

  1. Identify normal, boundary and error‑condition inputs.
  2. Record the expected output for each case.
  3. Run the program and compare actual vs. expected results.
  4. Use trace tables to follow variable values step‑by‑step.
  5. Fix any logical or syntax errors and re‑test.

2.9 Worked Example – Average of Three Numbers

Problem Statement

Read three integers from the user, calculate their average (to two decimal places) and display the result.

2.9.1 Analyse the Problem
  • Inputs: integers a, b, c
  • Processing: average ← (a + b + c) / 3 (real division)
  • Output: the average, rounded to two decimal places
  • Constraints: none beyond integer input; ensure division is performed using real arithmetic.
2.9.2 Design – Flowchart
Flowchart showing Start, Input a,b,c, total←a+b+c, average←total/3, Output average, End
Start → Input a, b, c → total ← a + b + c → average ← total / 3 → Output average → End
2.9.3 Design – Structure Diagram
Structure diagram with Main Program containing InputNumbers, CalculateAverage, DisplayResult modules
Main Program → InputNumbers → CalculateAverage → DisplayResult
2.9.4 Pseudocode (with line numbers & comments)
01  -- Average of three numbers
02  READ a, b, c                -- input three integers
03  total ← a + b + c           -- sum the numbers
04  average ← total / 3.0       -- real division to get a float
05  WRITE "Average = ", average -- display result (rounded by language)
06  END
2.9.5 Test Cases (including edge cases)
Test #Input (a,b,c)Expected Output
110, 20, 30Average = 20.00
20, 0, 0Average = 0.00
3-5, 5, 10Average = 3.33
2.9.6 Trace Table (Test 1)
Stepabctotalaverage
After line 02102030
After line 0310203060
After line 041020306020.0

3. Quick Reference Tables

3.1 Number‑System Conversion Summary

FromToKey Steps
Decimal → BinaryBinaryDivide by 2, record remainders (LSB first).
Binary → DecimalDecimalSum each bit × 2ⁿ.
Decimal → HexHexadecimalDivide by 16, record remainders (0‑9, A‑F).
Hex → BinaryBinaryReplace each hex digit with its 4‑bit binary equivalent.
Binary → HexHexadecimalGroup bits in fours (add leading 0’s if needed) and convert.

3.2 ASCII vs. Unicode (UTF‑8)

AspectASCIIUnicode (UTF‑8)
Bits per character7 bits (stored in 8‑bit bytes)1‑4 bytes (variable length)
Character set128 characters (English letters, digits, control codes)Over 1 million code points – supports virtually all world scripts.
Typical useSimple text files, legacy systemsWeb pages, modern applications, multilingual data

3.3 Packet Header Fields (simplified)

FieldPurpose
Source addressIdentifies the sender.
Destination addressIdentifies the intended receiver.
ProtocolIndicates the type of payload (e.g., TCP, UDP).
LengthSize of the payload.
Checksum / CRCDetects errors in transmission.

3.4 Error‑Detection Examples

  • Even parity for 1011001 → add 0 (total 4 ones, even).
  • ISBN‑13 check digit for 978030640615 → calculate sum = 100, check digit = (10‑(100 mod 10)) mod 10 = 0.

3.5 Encryption Summary

TypeKey(s)Typical AlgorithmUse
SymmetricSingle secret keyAES, DESBulk data encryption, fast.
AsymmetricPublic & private key pairRSA, ECCSecure key exchange, digital signatures.

4. Summary of Key Points for Exam Revision

  • Be able to convert between decimal, binary and hexadecimal quickly.
  • Understand two’s‑complement, overflow detection and IEEE‑754 floating‑point format.
  • Know the differences between ASCII and Unicode, and be able to calculate image or sound file sizes.
  • Recall the main components of the Von Neumann architecture and the role of cache levels.
  • Memorise OSI layers, common network topologies and the difference between serial/parallel and duplex modes.
  • Be able to draw and interpret simple flowcharts and structure diagrams.
  • Write correct pseudocode using Cambridge conventions, including IF, FOR, WHILE and comments.
  • Apply systematic testing: normal, boundary and error cases; use trace tables.
  • Identify common cyber‑security threats and appropriate counter‑measures.
  • Understand basic concepts of encryption (symmetric vs. asymmetric) and error detection (parity, checksum, ARQ, check digits).

Create an account or Login to take a Quiz

48 views
0 improvement suggestions

Log in to suggest improvements to this note.