Skip to content

1.2.3 Units

GCSE · Paper 1 · Computer systems · Section 1.2 · 16 flashcards · 10 practice questions

Questions

1.2.3 Units

How big is a photo? How much music fits on a phone? To answer these questions you need to know the units that measure data, and how to calculate the size of a file.

Why data is stored in binary

A computer is built from circuits (switches) that are either on or off. These two states are easy to build, very fast, and very reliable. We write them as 1 (on) and 0 (off). So a computer stores all data (numbers, text, images and sound) as patterns of 1s and 0s, which is binary.

Key Point
Computers use binary because the circuits inside them have only two states: on (1) and off (0). Two states are simple, cheap and reliable to build and to read.

The units of data

Definition
A bit is a single binary digit: 0 or 1. It is the smallest unit of data.

All the other units are built up from the bit. In the exam, units go up in 1,000s.

UnitSize
Bit1 binary digit (0 or 1)
Nibble4 bits
Byte8 bits
Kilobyte (KB)1,000 bytes
Megabyte (MB)1,000 kilobytes
Gigabyte (GB)1,000 megabytes
Terabyte (TB)1,000 gigabytes
Petabyte (PB)1,000 terabytes
Remember
bit (1) < nibble (4 bits) < byte (8 bits) < KB < MB < GB < TB < PB. Each unit from the kilobyte upwards is 1,000 times bigger than the one before.

Some systems use 1,024 instead of 1,000 for each step (because 1,024 is 2 to the power 10). The exam also accepts 1,024. This page uses 1,000, so use 1,000 unless the question tells you otherwise.

Converting between units

  • •
    To go from a smaller unit to a bigger unit, divide by 1,000 for each step.
  • •
    To go from a bigger unit to a smaller unit, multiply by 1,000 for each step.
Bits and bytes use 8 instead: divide by 8 to go from bits to bytes, and multiply by 8 to go from bytes to bits.
Worked Example
Convert 4,500 megabytes to gigabytes.

MB to GB is going up one unit, so divide by 1,000.

4,500 / 1,000 = 4.5

Answer: 4.5 GB

Check: 4.5 GB x 1,000 = 4,500 MB.
Worked Example
Convert 2.5 terabytes to megabytes.

TB to GB is down one unit: 2.5 x 1,000 = 2,500 GB.
GB to MB is down one more unit: 2,500 x 1,000 = 2,500,000 MB.

Answer: 2,500,000 MB

Check: 2,500,000 MB / 1,000 = 2,500 GB, and 2,500 GB / 1,000 = 2.5 TB.
Worked Example
Convert 24,000 bits to kilobytes.

Bits to bytes: 24,000 / 8 = 3,000 bytes.
Bytes to kilobytes: 3,000 / 1,000 = 3.

Answer: 3 KB

Check: 3 KB = 3,000 bytes, and 3,000 x 8 = 24,000 bits.

Capacity calculations

You may be asked how many files fit on a device, or how much space a set of files uses. Put everything in the same unit first. Then add or divide.

Worked Example
A memory card holds 8 GB. A photographer has 40 photos of 5 MB each. How much space is left?

Total size of the photos: 40 x 5 = 200 MB.
Convert to GB: 200 / 1,000 = 0.2 GB.
Space left: 8 - 0.2 = 7.8 GB.

Answer: 7.8 GB

Check in MB: 8 GB = 8,000 MB. 8,000 - 200 = 7,800 MB = 7.8 GB.
Worked Example
How many 4 MB photos fit on a 2 GB memory stick?

2 GB = 2 x 1,000 = 2,000 MB.
Number of photos: 2,000 / 4 = 500.

Answer: 500 photos

Check: 500 x 4 MB = 2,000 MB = 2 GB.

File size formulas

You need three formulas. The answer is always in bits. Then convert to bytes (divide by 8), and then to KB or MB if you need to.

Key Point
Sound file size (bits) = sample rate (samples per second) x duration (seconds) x bit depth

Image file size (bits) = colour depth (bits per pixel) x height (pixels) x width (pixels)

Text file size (bits) = bits per character x number of characters

The words mean:

  • •
    Sample rate: the number of samples taken each second (measured in hertz, Hz). A bigger rate means a higher quality sound, and a bigger file.
  • •
    Bit depth: the number of bits used for each sample.
  • •
    Colour depth: the number of bits used for the colour of each pixel.
  • •
    Resolution: the height and width of an image in pixels.

Sound

Worked Example
A sound is recorded at a sample rate of 8,000 Hz for 10 seconds with a bit depth of 8. Find the file size in kilobytes.

Samples: 8,000 x 10 = 80,000 samples.
Bits: 80,000 x 8 = 640,000 bits.
Bytes: 640,000 / 8 = 80,000 bytes.
Kilobytes: 80,000 / 1,000 = 80.

Answer: 80 KB

Check a different way: a bit depth of 8 is 1 byte per sample, so 80,000 samples is 80,000 bytes = 80 KB.

Image

Worked Example
An image is 100 pixels wide and 50 pixels high. The colour depth is 8 bits. Find the file size in kilobytes.

Pixels: 100 x 50 = 5,000 pixels.
Bits: 5,000 x 8 = 40,000 bits.
Bytes: 40,000 / 8 = 5,000 bytes.
Kilobytes: 5,000 / 1,000 = 5.

Answer: 5 KB

Check a different way: 8 bits is 1 byte per pixel, so 5,000 pixels is 5,000 bytes = 5 KB.
Worked Example
An image is 1,000 pixels wide and 500 pixels high. The colour depth is 24 bits. Find the file size in megabytes.

Pixels: 1,000 x 500 = 500,000 pixels.
Bits: 500,000 x 24 = 12,000,000 bits.
Bytes: 12,000,000 / 8 = 1,500,000 bytes.
Megabytes: 1,500,000 / 1,000 / 1,000 = 1.5.

Answer: 1.5 MB

Check a different way: 24 bits is 3 bytes per pixel, so 500,000 x 3 = 1,500,000 bytes = 1.5 MB.

Text

Worked Example
A text file has 2,000 characters. Each character uses 8 bits. Find the file size in kilobytes.

Bits: 2,000 x 8 = 16,000 bits.
Bytes: 16,000 / 8 = 2,000 bytes.
Kilobytes: 2,000 / 1,000 = 2.

Answer: 2 KB

Check a different way: 8 bits is 1 byte per character, so 2,000 characters is 2,000 bytes = 2 KB.
Worked Example
A message has 500 characters, stored with 16 bits per character. Find the file size in bytes.

Bits: 500 x 16 = 8,000 bits.
Bytes: 8,000 / 8 = 1,000 bytes.

Answer: 1,000 bytes

Check a different way: 16 bits is 2 bytes per character, so 500 x 2 = 1,000 bytes.
Exam Tip
1. Write the formula.
2. Put in the numbers (check the units: seconds, pixels, bits).
3. Multiply to get an answer in bits.
4. Divide by 8 for bytes, then by 1,000 for each step up to KB, MB or GB.
5. Check it a second way. For example, divide bits per sample by 8 first to get bytes per sample. The answer must match.

No calculator is allowed, so the numbers are chosen to work out by hand. Write each step down so you can pick up marks if one step goes wrong.

What changes the file size?

If you...The file size...
double the sample ratedoubles
double the duration of a sounddoubles
halve the bit depthhalves
double the colour depthdoubles
double the width and the height of an imageis 4 times bigger (2 x 2)

A bigger file means more storage used and longer to send over a network. But it gives better quality: more detail in a sound or an image.

Warning
Do not forget the final step. Many students stop at bits. If the question asks for bytes, kilobytes or megabytes, divide by 8 and then by 1,000 as needed.

Metadata

Files also hold extra information about themselves, such as the image's height and width, the date it was made and the file type. This is called metadata. It makes a real file slightly bigger than the formula gives. In the exam, you may be told to ignore it. Or you may be told to allow a number of bytes for it.

Worked Example
A 2,000-character text file has a further 500 bytes of metadata. Each character uses 8 bits. Find the total file size.

Text: 2,000 x 8 = 16,000 bits = 2,000 bytes.
Total: 2,000 + 500 = 2,500 bytes = 2.5 KB.

Answer: 2,500 bytes (2.5 KB)

Exam technique

  • •
    State questions need one fact, such as "a byte is 8 bits".
  • •
    Convert and calculate questions need working. Show every step. Most of the marks are for the method.
  • •
    Always give the unit with your answer.
  • •
    For explain questions on binary, say that computers are made of circuits with two states (on and off), so only two digits can be used.
  • •
    Write the formula first. This often earns the method mark.