← Computer Science

Data Storage and Compression

This lesson covers how the amount of data is measured, from the bit up to the terabyte, and the distinction between the decimal units and the IEC binary units. You will practise calculating file sizes and learn the difference between lossy and lossless compression, including realistic examples of when each is used.

Slide 1 / 4

Measuring the quantity of data

Measuring data: two sets of units 1 nibble = 4 bits · 1 byte = 8 bits Decimal (×1000) Binary / IEC (×1024) 1 kB = 1000 bytes 1 KiB = 1024 bytes 1 MB = 1000 kB 1 MiB = 1024 KiB 1 GB = 1000 MB 1 GiB = 1024 MiB Storage is sold in decimal units; memory is addressed in binary (1024)
  • The smallest unit of storage is the bit, a single binary digit; a group of 4 bits is a nibble and a group of 8 bits is a byte.
  • Data is measured in bytes, and the units scale up: 1 kilobyte (kB) is 1000 bytes, 1 megabyte (MB) is 1000 kB, 1 gigabyte (GB) is 1000 MB and 1 terabyte (TB) is 1000 GB.
  • The IEC binary units use powers of two: 1 kibibyte (KiB) is 1024 bytes, 1 mebibyte (MiB) is 1024 KiB and 1 gibibyte (GiB) is 1024 MiB.
  • The reason two sets of units exist is that storage is often quoted in the decimal units (powers of 1000) while the binary powers of 1024 match how memory is actually addressed.

Check you've got it

0/4

1. How many bytes are there in 2 kibibytes (KiB)?

2. An image is 100 pixels wide, 50 pixels high, and has a colour depth of 8 bits. What is its uncompressed file size in bytes?

3. Which situation most clearly requires lossless rather than lossy compression?

4. What is the key characteristic of lossy compression?

Practise real exam questions on this

Type your answer, see your mark against the mark scheme in seconds. Free, 5 a day.

Start practising →

Teaching this topic?

Mark your whole class's answers and see who's stuck, for £19 a month.

See the class plan →

Free revision content. Multiple-choice answers are marked instantly. Written answers are marked by AI on /free-mark.