IGCSE Computer Science (0478) – Core Topics
1. Programme Development Life Cycle (PDLC)
The PDLC is a systematic, iterative process that turns a real‑world problem into a working computer solution and maintains it over time. It is the framework used for every programming task in the Cambridge IGCSE syllabus.
1.1 Stages of the PDLC
- Problem Definition
- State the problem in plain language.
- Identify purpose, scope, constraints and end‑users.
- Produce a short problem brief (often a paragraph).
- Analysis
- Gather functional and non‑functional requirements.
- List all inputs, required processing steps and expected outputs.
- Consider data types, ranges, special conditions, security and performance constraints.
- Design
- Develop a high‑level algorithm (pseudocode or flowchart).
- Select appropriate data structures (arrays, records, lists).
- Plan control structures – selection, iteration, sub‑routines.
- Design any required user‑interface elements.
- Validate the design using test data and trace tables.
- Coding (Implementation)
- Translate the design into a programming language (Python, Java, etc.).
- Use meaningful identifiers, consistent indentation and comments.
- Follow the language’s syntax rules and coding conventions.
- Testing
- Write test cases covering normal, boundary and error conditions.
- Perform unit testing on each module, then integration testing.
- Record results, log defects and retest after fixes.
- Evaluation
- Check that the final product meets all original requirements.
- Assess performance, usability, reliability and security.
- Gather feedback from users and produce an evaluation report.
- Maintenance
- Correct defects discovered after deployment.
- Enhance functionality or adapt to new requirements.
- Document all changes and update user manuals.
1.2 PDLC Summary Table
| Stage |
Key Activities |
Typical Outputs |
| Problem Definition |
- Write problem statement
- Identify constraints & stakeholders
|
Problem brief, stakeholder list |
| Analysis |
- Gather functional & non‑functional requirements
- List inputs, outputs and processing steps
|
Requirements document, data‑flow diagram |
| Design |
- Create algorithm (pseudocode/flowchart)
- Select data structures & control structures
- Validate with test data and trace tables
|
Pseudocode, flowchart, design specification |
| Coding |
- Write source code
- Comment and format code
|
Source files, compiled program (or interpreted script) |
| Testing |
- Develop test cases
- Execute tests, record results
|
Test log, defect list, revised code |
| Evaluation |
- Compare outcomes with requirements
- Collect user feedback
|
Evaluation report, acceptance sign‑off |
| Maintenance |
- Bug fixing
- Feature updates
- Documentation of changes
|
Updated source code, revision notes |
1.3 Worked Example – “Average Exam Score”
- Problem Definition: Compute the mean of n exam scores ( n ≥ 1 ).
- Analysis:
- Input: integer n, then n real numbers (0 ≤ score ≤ 100).
- Output: average (real number, rounded to one decimal place).
- Constraints: reject non‑numeric input; n must be positive.
- Design (pseudocode):
READ n
WHILE n < 1
DISPLAY "Enter a positive number of scores"
READ n
END WHILE
total ← 0
FOR i FROM 1 TO n
READ score
WHILE score < 0 OR score > 100
DISPLAY "Score must be 0‑100"
READ score
END WHILE
total ← total + score
END FOR
average ← total / n
DISPLAY "Average = ", average
- Coding (Python):
n = int(input("Number of scores: "))
while n < 1:
n = int(input("Enter a positive integer: "))
total = 0.0
for _ in range(n):
score = float(input("Score: "))
while score < 0 or score > 100:
score = float(input("Score must be 0‑100: "))
total += score
average = total / n
print(f"Average = {average:.1f}")
- Testing:
- Normal case: n=3, scores 80, 90, 70 → average 80.0
- Boundary case: n=1, score 0 → average 0.0
- Error case: n=0 (prompt again), score –5 (re‑prompt), non‑numeric input (handle exception).
- Evaluation: Verify all requirements are met, check handling of invalid data, and obtain peer feedback.
- Maintenance: Add an option to save results to a file and compute the median as an extra feature.
2. Computer Systems
2.1 Hardware
- CPU – Fetch‑Decode‑Execute Cycle
- Fetch the next instruction from memory (Program Counter).
- Decode the opcode and identify operands.
- Execute the instruction (ALU operation, memory access, I/O).
- Multicore & Clock Speed
| CPU | Cores | Clock (GHz) | Typical Use‑Case |
| Entry‑level laptop | 2 | 2.0 | Web browsing, office apps |
| Mid‑range desktop | 4 | 3.2 | Gaming, video editing |
| High‑performance workstation | 8 | 3.8 | 3D rendering, scientific computing |
- Cache Memory – L1 (fastest, smallest), L2, L3; reduces average memory‑access time.
- Primary Storage – RAM (volatile), registers, cache.
- Secondary Storage – HDD, SSD, optical discs, USB flash drives.
- Virtual Memory – Paging between RAM and disk to give the illusion of more RAM.
- Input/Output Devices & Sensors
- Digital input: keyboard, mouse, touch screen.
- Analogue input converted by ADC: microphone, temperature sensor.
- Typical sensor data types:
- Temperature – real number (°C/°F)
- Proximity – Boolean (object detected / not detected)
- Accelerometer – three real numbers (x, y, z)
2.2 Software
- System software – operating system (OS), device drivers, utility software.
- OS functions: manage resources, provide file system, schedule processes, handle I/O, provide a user interface.
- Interrupts – signals that temporarily halt the CPU to service hardware events.
- Application software – programs that perform specific tasks for the user (e.g., word processors, games, database managers).
- Development tools – compilers (translate source code to machine code), interpreters (execute source line‑by‑line), IDEs (integrated development environments) that combine editor, compiler/interpreter and debugger.
2.3 Internet & the World Wide Web
- Internet = global network of interconnected computers; WWW = collection of web pages accessed via HTTP/HTTPS.
- URL (Uniform Resource Locator) identifies a resource on the web.
- Client‑server model – client (browser) requests a page; server returns the page.
- Cookies – small data files stored on the client to maintain state.
- Basic protocol flow:
- Browser sends HTTP GET request.
- Server processes request and returns an HTTP response (status code + HTML).
- Browser renders the page.
2.4 Cyber‑security
- Common threats
- Malware (viruses, worms, ransomware)
- Phishing & social engineering
- Denial‑of‑service (DoS/DDoS) attacks
- Unauthorised access (hacking, password cracking)
- Data loss (hardware failure, accidental deletion)
- Mitigation techniques
- Firewalls – filter incoming/outgoing traffic.
- Encryption – protect data in transit (HTTPS, TLS) and at rest.
- Authentication – passwords, biometrics, two‑factor authentication.
- Regular backups and version control.
- Anti‑virus/anti‑malware software and safe‑computing practices.
3. Data Representation
3.1 Number Systems
- Binary (base‑2), Decimal (base‑10), Hexadecimal (base‑16).
- Conversion methods:
- Decimal → binary/hex: repeated division by the target base, recording remainders.
- Binary/hex → decimal: positional weighting (sum of digit × baseⁿ).
- Binary arithmetic (addition, subtraction, multiplication) follows the same rules as decimal but carries/borrows at 2.
3.1.1 Two’s‑Complement (signed integers)
Represent –13 in an 8‑bit two’s‑complement system:
- 13 in binary =
00001101
- Invert bits →
11110010
- Add 1 →
11110011
Result: 11110011 (–13).
3.2 Logical Shifts
| Operation | Binary Example | Result |
| Logical left shift (<< 2) | 0010 1101 | 1011 0100 |
| Logical right shift (>> 2) | 1011 0100 | 0010 1101 |
3.3 Text, Sound & Images
- Text – ASCII (7‑bit) and Unicode (UTF‑8, UTF‑16). Example: ‘A’ = 65₁₀ =
01000001₂.
- Sound – Sample rate (samples / second) and bit depth (bits per sample). CD quality = 44 100 Hz × 16 bits.
- Images – Resolution (pixels) and colour depth (bits per pixel). Example: 640 × 480, 24‑bit colour.
3.3.1 Image File‑Size Calculation
For a 640 × 480 image with 24‑bit colour:
Pixels = 640 × 480 = 307 200
Bits = 307 200 × 24 = 7 372 800
Bytes = 7 372 800 ÷ 8 = 921 600 bytes ≈ 900 KB
3.4 Data Storage Units & Compression
- Units: bit, byte, KiB (2¹⁰ bytes), MiB (2²⁰ bytes), GiB (2³⁰ bytes).
- Lossless compression – e.g., Run‑Length Encoding (RLE).
AAAABBBCCDAA → 4A3B2C1D2A
- Lossy compression – discards some data to achieve higher ratios (JPEG for images, MP3 for audio).
4. Data Transmission
4.1 Packet Structure
| Field | Purpose |
| Header | Source & destination addresses, control information (e.g., protocol version). |
| Payload | User data being transmitted. |
| Trailer | Error‑detection code such as CRC. |
4.2 Error Detection & Correction
- Parity bit – even or odd parity for a 7‑bit data word.
- Checksum – sum of all bytes modulo 256.
- CRC (Cyclic Redundancy Check) – polynomial‑based detection used in Ethernet and many protocols.
- ARQ (Automatic Repeat Request) – retransmit the packet when an error is detected.
4.2.1 Parity Example
Data word: 1011001 (seven bits).
Even parity → add a 0 (total 4 ones).
Transmitted word: 10110010.
4.3 Encryption Basics
- Symmetric key – same key for encryption and decryption (e.g., AES).
- Asymmetric key – public key encrypts, private key decrypts (e.g., RSA, used in HTTPS).
- Encryption provides confidentiality; decryption restores the original data.
4.4 Transmission Media
- Twisted‑pair (UTP, STP) – most common for Ethernet.
- Coaxial cable – older TV and broadband networks.
- Fiber‑optic – high‑speed, low‑loss, immune to electromagnetic interference.
- Wireless – Wi‑Fi (radio), Bluetooth (short‑range), infrared (line‑of‑sight).
5. Algorithms, Programming & Logic
5.1 Algorithm Design & Problem Solving
- Decomposition – break a problem into smaller sub‑problems.
- Structure diagram – visual representation of modules and their relationships.
- Pseudocode conventions
- All caps for keywords (IF, WHILE, FOR, END IF).
- Indentation to show nesting.
- Meaningful variable names.
- Flowchart symbols
- Oval – start/end
- Parallelogram – input/output
- Rectangle – processing
- Diamond – decision (selection)
- Arrows – flow of control
- Validation & Verification
- Validate – check that the algorithm does what the user wants (requirements).
- Verify – check that the algorithm is correctly implemented (no logical errors).
- Trace tables & test data – step through the algorithm with sample inputs to ensure correct outputs.
5.2 Programming Concepts
- Variables & Data Types – integer, real, Boolean, character, string, array.
- Operators – arithmetic (+, –, *, /, %), relational (=, ≠, <, >, ≤, ≥), logical (AND, OR, NOT).
- Control structures
- Selection: IF…ELSE, IF…ELSE IF…ELSE, CASE (switch).
- Iteration: WHILE, REPEAT‑UNTIL, FOR.
- Sub‑routines / Functions – reusable blocks of code with parameters and return values.
- Arrays
- Single‑dimensional – e.g.,
scores[10].
- Two‑dimensional – e.g.,
matrix[3][3].
- Indexing starts at 0 (Python) or 1 (Pascal/Java examples in the syllabus).
- File handling
- Sequential access – read/write records in order.
- Random access – seek to a specific record (e.g., using
seek()).
- Databases (basic)
- Table with rows (records) and columns (fields).
- Primary key uniquely identifies a record.
- CRUD operations – Create, Read, Update, Delete.
- Boolean logic
- Truth tables for AND, OR, NOT, XOR.
- Use in selection statements and circuit design.
5.3 Testing, Evaluation & Maintenance (Re‑visited)
- Testing – unit, integration, system and acceptance testing; use black‑box (input/output) and white‑box (code‑path) techniques.
- Evaluation – compare actual results with requirements, assess usability, performance and security, collect user feedback.
- Maintenance – corrective (bug fixing), adaptive (environment changes), perfective (enhancements), preventive (future‑proofing).
5.4 Example – Using an Array to Store Scores
# Pseudocode
READ n
DECLARE scores[ n ] // dynamic array
FOR i FROM 1 TO n
READ scores[i]
END FOR
total ← 0
FOR i FROM 1 TO n
total ← total + scores[i]
END FOR
average ← total / n
DISPLAY "Average = ", average
Key points illustrated:
- Array declaration and indexing.
- Two separate loops – one for input, one for processing.
- Use of variables for totals and averages.
- Validation can be added by checking each
scores[i] before storing.