Ad Banner Placeholder
Cambridge IGCSE Computer Science — 0478
Topic 1: Data Representation — Part 3
Data Storage & Compression
Measurement units
Critical update: You must use 1024 (not 1000) for all calculations.
The smallest units used to measure data:
- Bit — a single binary digit (0 or 1).
- Nibble — 4 bits (half a byte).
- Byte — 8 bits.
Larger storage sizes use powers of 1024:
| Unit | Equals |
|---|---|
| 1 byte | 8 bits |
| 1 Kibibyte (KiB) | 1024 bytes |
| 1 Mebibyte (MiB) | 1024 KiB |
| 1 Gibibyte (GiB) | 1024 MiB |
| 1 Tebibyte (TiB) | 1024 GiB |
| 1 Pebibyte (PiB) | 1024 TiB |
| 1 Exbibyte (EiB) | 1024 PiB |
File size calculations
- Sound size = Sample rate — Duration (s) — Bit depth.
- Image size = Resolution (Width — Height) — Colour depth.
Exam Traps
- In calculations, bit depth / colour depth must be in bits — convert bytes to bits (—8) before using the sound/image formulas if the question gives bytes.
Data compression
Compression reduces file size to save storage space, use less bandwidth, and speed up transmission.
| Compression Type | Method | Effect |
|---|---|---|
| Lossy | Permanently removes data (e.g., reducing resolution or colour depth). | Quality is reduced; original file cannot be restored. |
| Lossless | Reduces size without losing data using algorithms to find patterns. | Quality is maintained; original file can be fully restored. |
Run Length Encoding (RLE)
A form of lossless compression that replaces "runs" of identical data with one value and a count of how many times it repeats.
- Example: A row of pixels
1 1 1 1 0 0becomes1, 4, 0, 2. - Suitability: RLE is best for images with large areas of the same colour. It is unsuitable for text as repeated patterns are rare.
0/15
Ad Banner Placeholder