Units of Data Storage
The Basics
| Unit | Size |
|---|---|
| Bit | 1 binary digit (0 or 1), smallest unit |
| Nibble | 4 bits |
| Byte | 8 bits |
A byte can represent: a character, a small number, part of an image or part of a sound file.
Binary Storage Units (Powers of 1024)
Computing storage uses binary multiples, each unit is 1024 times the previous.
| Unit | Symbol | Size | Approx. |
|---|---|---|---|
| Kibibyte | KiB | 1,024 bytes | ~1,000 bytes |
| Mebibyte | MiB | 1,048,576 bytes | ~1,000,000 bytes |
| Gibibyte | GiB | 1,073,741,824 bytes | ~1,000,000,000 bytes |
| Tebibyte | TiB | ~1.1 × 10¹² bytes | ~1 TB |
Exam Language
Use KiB, MiB, GiB (binary prefixes) in answers, not KB, MB, GB (which are SI/decimal units). In exams, these are tested precisely.
Decimal vs Binary Units
| Prefix | SI (Decimal) | Binary |
|---|---|---|
| Kilo | 1,000 | 1,024 (KiB) |
| Mega | 1,000,000 | 1,048,576 (MiB) |
| Giga | 1,000,000,000 | 1,073,741,824 (GiB) |
Windows inconsistency: Windows labels drives in “KB” and “MB” but uses binary values internally (1 KB = 1,024 bytes in Windows). For exams, always use the correct binary prefix.
Conversions
Bits ↔ Bytes
- Bytes to bits: × 8
- Bits to bytes: ÷ 8
Between Storage Units (approximate, going up)
| Conversion | Factor |
|---|---|
| Bytes → KiB | ÷ 1,024 |
| KiB → MiB | ÷ 1,024 |
| MiB → GiB | ÷ 1,024 |
| GiB → MiB | × 1,024 |
File Size Calculations
Bitmap Image File Size
File size (bits) = width (pixels) × height (pixels) × colour depth (bits per pixel)
File size (MiB) = (width × height × colour depth) ÷ (1024 × 1024)
See Bitmap Images for full detail.
Sound File Size
File size (bits) = sample rate (Hz) × bit depth (bits) × duration (seconds)
See Sound Representation for full detail.
Worked Example
Q: An image is 50 × 40 pixels with a colour depth of 24 bits. Express its size in MiB.
Size in bits = 50 × 40 × 24 = 48,000 bits
Size in bytes = 48,000 ÷ 8 = 6,000 bytes
Size in KiB = 6,000 ÷ 1,024 ≈ 5.86 KiB
Size in MiB = 6,000 ÷ (1,024 × 1,024) ≈ 0.0057 MiB
Expression: (50 × 40 × 24) ÷ (8 × 1,024 × 1,024) MiB
Exam Questions
Q: Convert 2048 bytes into kibibytes.
2048 ÷ 1024 = 2 KiB
Q: Explain the difference between a megabyte and a mebibyte.
A megabyte (MB) uses the decimal SI definition of approximately 1,000,000 bytes. A mebibyte (MiB) is exactly 1,048,576 bytes, based on powers of 1024 (binary units).
Exam Tip
For file size questions, examiners usually want the expression (e.g.,
50 × 40 × 24 ÷ 1024 ÷ 1024), not just the final number. Write the expression clearly.