StudyVault
Home Unit Overview Exam Technique Revision Techniques ← Previous Lesson Next Lesson →

← Back to Dashboard

Overlay:
0:00 / 0:00 Narration generated using AI text-to-speech.

Storage Units, Capacity and Compression

Units of Digital Storage

Every piece of data in a computer is ultimately made of bits. Bits are grouped into larger units so that storage capacity can be expressed at a human-readable scale. Your exam uses base-2 (binary) prefixes, which are defined in powers of 2, not powers of 10. This distinction matters: answers using base-10 values will lose marks in storage calculation questions.

Storage units — base-2 (binary) prefix definitions
UnitAbbreviationExact value
Bitb1 binary digit (0 or 1)
Nibble—4 bits = 1 hex digit
ByteB8 bits
KilobyteKB1024 bytes = \(2^{10}\) bytes
MegabyteMB1024 KB = \(2^{20}\) bytes
GigabyteGB1024 MB = \(2^{30}\) bytes
TerabyteTB1024 GB = \(2^{40}\) bytes
PetabytePB1024 TB = \(2^{50}\) bytes

In everyday consumer products, manufacturers often count in powers of 10 instead: 1 kilobyte = 1000 bytes, 1 megabyte = 1,000,000 bytes, and so on — this is why a “500 GB” hard drive shows about 465 GB of space once it is formatted. Your exam uses the base-2 definitions: 1 KB = 1024 bytes, 1 MB = 1024 KB etc. Always use these in calculations.

Key Fact

Each step up the base-2 prefix scale multiplies by 1024: 1 KB = 1024 B, 1 MB = 1024 KB, 1 GB = 1024 MB, and so on. A nibble is 4 bits (half a byte) and is useful because it matches exactly one hexadecimal digit.

Calculating Storage Capacity

Storage capacity questions often involve converting between units or working out how many files fit in a given space. The general method is to express both the capacity and the file size in the same unit, then divide. Always work in base-2 (multiply or divide by 1024 at each prefix step).

A USB drive has a capacity of 8 GB. Each audio file has an uncompressed size of 40 MB. How many files fit on the drive?

Step 1: Convert the drive capacity to megabytes: 8 GB × 1024 = 8192 MB.

Step 2: Divide: 8192 ÷ 40 = 204.8, so 204 files fit (round down — you can’t store a partial file).

If the same files were compressed to 4 MB each (10:1 compression): 8192 ÷ 4 = 2048 files. Compression allows ten times as many files on the same drive.

What Is Compression?

Compression reduces file size by encoding data more efficiently. There are two fundamentally different types: lossy and lossless. The right choice depends on whether the exact original data must be recovered.

Lossy Compression

Lossy compression permanently discards some data to achieve a much smaller file. The algorithm exploits limits of human perception: it removes detail that the eye or ear is unlikely to notice. Common lossy formats are JPEG (images) and MP3 (audio).

A JPEG might store a photograph at one-tenth the size of an uncompressed bitmap by discarding subtle colour variations in smooth gradients. An MP3 removes audio frequencies below the threshold of human hearing and reduces detail in frequencies masked by louder sounds. The reduction in quality is “lossy” because you can never recover the removed data — each time a lossy file is re-compressed, more data is lost.

Lossless Compression

Lossless compression reduces file size without losing any information. When the file is decompressed, the output is bit-for-bit identical to the original. Common lossless formats include PNG (images) and FLAC (audio), as well as ZIP for general data.

A simple lossless technique is run-length encoding (RLE): instead of storing “AAAAAABBB” as 9 separate characters, RLE stores “6A3B” (6 copies of A, then 3 copies of B). The compressed version is shorter, and the original can be reconstructed exactly. Lossless compression works best when there is a lot of repeated or predictable data.

Key Fact

Use lossy compression (JPEG, MP3) when a small file size matters more than perfect quality — for example, streaming video, social media images, downloaded music. Use lossless compression (PNG, FLAC, ZIP) when the original data must be reconstructed exactly — for example, text files, medical images, software executables, or master audio files. Using lossy compression on a text file would corrupt the text.

Compression Ratio

The compression ratio expresses how much smaller a compressed file is compared to the original:

Compression ratio = original size ÷ compressed size

A ratio of 4:1 means the compressed file is one-quarter the size of the original. For example, if a 20 MB WAV audio file is compressed to a 2 MB MP3, the compression ratio is 20 ÷ 2 = 10:1. A higher ratio means greater size reduction, which usually also means greater quality loss for lossy formats.

FeatureLossy (JPEG, MP3)Lossless (PNG, FLAC, ZIP)
Data recoveryCannot recover removed dataIdentical to original on decompression
File size reductionVery large (often 10:1 or more)Moderate (typically 2:1 to 5:1)
QualityReduced; worsens with each re-compressionNo quality loss
Use caseStreaming, social media, casual listeningText, software, medical images, master files

A key exam point: when comparing lossy and lossless, you must always state which data can or cannot be recovered. Simply saying “lossy loses quality” is not sufficient — explain that the discarded data is permanently removed and the original cannot be reconstructed.

Practice Questions

Test yourself on this lesson. Pick a question, write your answer, then get it marked.

AI feedback
AI feedback is guidance, not a final exam mark. If you disagree, your teacher's view is always the tie-breaker.
← Back to unit
Video

© 2026 StudyVault · About · FAQ · Copyright & IP · Privacy · Disclaimers

StudyVault Education Ltd · registered in England and Wales, company no. 17490559 · 71–75 Shelton Street, London WC2H 9JQ