Data Storage, Compression & Related Topics – IGCSE Computer Science (0478)
Learning Objective
Calculate the file size of an image or a sound file from the data given, explain how compression changes the size, and relate these calculations to data representation, transmission, security and emerging technologies.
Overflow occurs when a calculation exceeds the maximum value a word can hold. In an 8‑bit unsigned word the max is 255 (11111111₂). Adding 1 wraps to 0.
1.3 Text Representation
Characters are stored as numeric codes.
ASCII – 7‑bit code (0‑127) covering English letters, digits and common symbols.
Unicode (UTF‑8) – variable‑length code that can represent over 100 000 characters from many languages.
Example: The word “IGCSE” in ASCII
I → 73₁₀ → 01001001₂ → 49₁₆
G → 71₁₀ → 01000111₂ → 47₁₆
C → 67₁₀ → 01000011₂ → 43₁₆
S → 83₁₀ → 01010011₂ → 53₁₆
E → 69₁₀ → 01000101₂ → 45₁₆
2. Image & Sound Representation
2.1 Images
Resolution: width × height in pixels.
Colour depth: bits per pixel. Common depths:
1‑bit – black & white
8‑bit – 256 colours (indexed colour)
24‑bit – true colour (≈16.7 million colours)
32‑bit – true colour + 8‑bit alpha (transparency)
Colour models: RGB (additive) for screens, CMYK (subtractive) for printing.
2.2 Sound
Sampling rate: how many times per second the analogue waveform is measured (e.g., 44.1 kHz = 44 100 samples / s).
Bit depth: precision of each sample (higher depth → larger dynamic range).
Lossless – data can be perfectly reconstructed (e.g., PNG, FLAC).
Lossy – some information is permanently discarded for greater reduction (e.g., JPEG, MP3).
Typical ratios (exam‑friendly):
PNG: 4 : 1 to 6 : 1
JPEG: 8 : 1 to 12 : 1
FLAC: ≈2 : 1
MP3: 12 : 1 to 15 : 1
7. The Internet & Cyber‑Security (Brief Overview)
URL – Uniform Resource Locator, the address of a web resource.
HTTP / HTTPS – protocols for transferring web pages; HTTPS adds encryption.
Cookies – small pieces of data stored by browsers, used for sessions.
Common threats:
Malware (viruses, ransomware)
Phishing – deceptive emails/websites to steal credentials.
Brute‑force attacks – trying many passwords.
Basic mitigations:
Strong, unique passwords (use a manager).
Regular software updates & antivirus.
Firewalls and safe browsing habits.
8. Emerging Technologies (Contextual Links)
Cloud storage – files kept on remote servers; size calculations help estimate storage costs.
Artificial Intelligence (AI) – large data sets (images, audio) are required for training; understanding file size informs dataset management.
Internet of Things (IoT) – sensors generate streams of data (often audio or image); bandwidth and storage planning rely on the formulas above.
Robotics – robots may capture video/audio; compression reduces transmission load to control centres.
9. Steps to Solve a File‑Size Question
Read the question carefully; list every given value (resolution, colour depth, duration, sampling rate, bit depth, channels, compression ratio, bandwidth, latency).
Convert units:
Time → seconds.
kHz → Hz (multiply by 1 000).
KB/MB/GB → use 1024 as the divisor.
Choose the appropriate formula (image or sound). For transmission problems, also use the transmission‑time formula.
Assuming MP3 compression of 12:1, what is the resulting size?
Video frame: 1280 × 720 pixels, 24‑bit colour. 30 frames per second.
Determine the uncompressed data generated per second (in megabytes).
Transmission: Transfer the uncompressed audio file from question 2 over a 2 Mbps link with a latency of 0.1 s. How long will the transfer take?
11. Common Mistakes to Avoid
Forgetting to convert minutes + seconds to total seconds before using the audio formula.
Dividing by 1000 instead of 1024 when converting bytes → KB/MB/GB.
Using colour depth in **bytes** rather than **bits** (24 bits ≠ 24 bytes).
Omitting the number of channels for stereo audio – this doubles the data.
Ignoring overflow limits when a question mentions a specific address size (e.g., 16‑bit address space → 65 536 bytes ≈ 64 KB).
Mixing up bandwidth (bits / s) with file size (bytes) – always convert to the same unit before dividing.
12. Summary
Accurate file‑size calculations are the quantitative bridge between data representation, storage capacity, transmission requirements and security considerations. Master the two core formulas, remember the 1024‑based conversions, and always check whether lossless or lossy compression applies. These skills are directly relevant to hardware limits, network planning, and the programming tasks that manipulate files in the later parts of the IGCSE Computer Science syllabus.
13. Link‑Back to the Wider Syllabus
Understanding file sizes informs several other syllabus areas:
Topic 1.3 – quantitative basis for storage & compression.
Topic 1.4 – helps evaluate whether a storage device (e.g., 2 GB SD card) can hold a set of media files.
Topic 1.2 – bandwidth calculations use the same size figures to estimate transmission times.
Topics 7–10 – programs that read/write or compress data rely on these calculations.
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.