Data is measured in units based on powers of 2 (binary system). Cambridge uses the IEC binary prefixes:
| Unit | Abbreviation | Value |
|---|---|---|
| Bit | b | 1 binary digit (0 or 1) |
| Nibble | — | 4 bits |
| Byte | B | 8 bits |
| Kibibyte | KiB | 1024 bytes (2¹⁰) |
| Mebibyte | MiB | 1024 KiB (2²⁰) |
| Gibibyte | GiB | 1024 MiB (2³⁰) |
| Tebibyte | TiB | 1024 GiB (2⁴⁰) |
Note: Cambridge 0478 uses 1 KB = 1024 bytes in calculations. Always check the question wording.
Compression reduces the size of a file. This saves storage space and reduces transmission time.
There are two main types:
RLE is a simple lossless compression technique. Consecutive repeated values (a run) are stored as a single value and a count, rather than repeating the value many times.
Example: AAAABBBCCDDDDDD → (A,4)(B,3)(C,2)(D,6) — stores 12 characters as 6 pairs
RLE is effective when there are many long runs of the same value (e.g. simple images, fax data). It is not effective for data with little repetition.
| Feature | Lossy | Lossless |
|---|---|---|
| Data loss | Yes — permanent | No |
| File size reduction | Greater | Less |
| Decompression quality | Approximation of original | Exact original |
| Typical use | JPEG images, MP3 audio | ZIP archives, PNG images |
5 questions · 9 marks
| Term | Definition |
|---|
10 minutes · 9 marks