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
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?