Units
Bits to petabytes and calculating file sizes for text, images and sound.
Learning Objectives
- 1Explain why data must be stored and processed in binary
- 2Recall the units of data storage, from a bit to a petabyte
- 3Convert between data storage units
- 4Calculate the file size of text, image and sound files
- 5Calculate the storage capacity needed for a given set of files
Why data is stored in binary
Think of it like...
Think of a light switch: it can only be up or down, never in between. A computer's memory is made of billions of these "switches", so everything it stores has to be spelled out using just two symbols, 0 and 1.
Units of data storage
| Unit | Size |
|---|---|
| Bit | A single 0 or 1 |
| Nibble | 4 bits |
| Byte | 8 bits |
| Kilobyte (KB) | 1,000 bytes |
| Megabyte (MB) | 1,000 KB |
| Gigabyte (GB) | 1,000 MB |
| Terabyte (TB) | 1,000 GB |
| Petabyte (PB) | 1,000 TB |
| Unit | Size |
|---|---|
| Bit | A single 0 or 1 |
| Nibble | 4 bits |
| Byte | 8 bits |
| Kilobyte (KB) | 1,000 bytes |
| Megabyte (MB) | 1,000 KB |
| Gigabyte (GB) | 1,000 MB |
| Terabyte (TB) | 1,000 GB |
| Petabyte (PB) | 1,000 TB |
Calculating file size: sound
Think of it like...
Imagine photographing a wave crashing on a beach. Taking more photos per second (sample rate) and using a higher-resolution camera each time (bit depth) both give you a more accurate record, but also more data to store.
Calculating file size: images
Calculating file size: text
Calculating storage capacity requirements
Exam Phrasing: Use These Exact Phrases
- ✓Computers use binary (0s and 1s) because their hardware is built from switches that are either on or off
- ✓A bit is a single binary digit; a nibble is 4 bits; a byte is 8 bits
- ✓Each unit from kilobyte upwards is 1,000 times the unit before it
- ✓Sound file size = sample rate x duration (s) x bit depth
- ✓Image file size = colour depth x image height (px) x image width (px)
- ✓Text file size = bits per character x number of characters
- ✓Convert all values to the same unit before adding or comparing them
- 💡Learn all three file size formulas exactly: sound (sample rate × duration × bit depth), image (colour depth × height × width), text (bits per character × number of characters).
- 💡Always check what unit the question wants the answer in, you may need to convert your result from bits to bytes, KB, MB, etc.
- 💡You may use 1,000 or 1,024 for conversions, OCR credits both. Pick one and stay consistent within the question.
- 💡Questions may allow you to add an allowance for metadata (e.g. 10% on top of an image file size). OCR credits this in both the working and the final answer, so it is safe to include if the question mentions metadata.
- 💡Examiners are told that not all of the working has to be correct to earn the working mark, so always write your steps down even if you are unsure of the final answer.
- 💡Show every step of a calculation. Partial marks are given for correct working even if you make an error later on, don't just write the final answer.
- 💡When comparing storage sizes given in different units (e.g. 300MB vs 200,000KB), convert them to the same unit first before deciding which is bigger or smaller.
Wrong:
Comparing 300MB and 200,000KB without converting first
Right:
Convert both to the same unit first: 300MB = 300,000KB, so 300MB is larger than 200,000KB
Why it matters: OCR examiners noted candidates frequently picked the wrong answer when values were given in different units, this is a very common trap.
Wrong:
A byte is 4 bits
Right:
A nibble is 4 bits; a byte is 8 bits
Why it matters: Mixing up nibble and byte is a common slip, remember: byte = 8 bits (2 nibbles).
Wrong:
Only writing the final answer to a calculation question
Right:
Show each step of the calculation clearly
Why it matters: Marks are often available for correct working (e.g. correctly multiplying two of the values), even if the final answer is wrong.
Question:
A sound file is recorded with a sample rate of 44,100Hz, a duration of 3 seconds, and a bit depth of 16 bits. Calculate the file size in bits. [2]
💡 Attempt this before revealing the answer, practice makes perfect!
Model Answer:
File size = sample rate x duration x bit depth = 44,100 x 3 x 16 = 2,116,800 bits.
Mark Scheme:
- 1Correct method: sample rate x duration x bit depth
- 2Correct final answer: 2,116,800 bits (accept correct working shown even if the final figure is wrong)
Calculate the size of an image, sound or text file in bits.
Loading a question…
Questions are generated fresh every time, so you can keep practising as long as you want.
Tap a card to flip it. Use the arrow keys to move and space to flip.
Exam-style questions. Have a go, then reveal the mark scheme to check your answer.
1.State how many bits are in a byte.
[1]2.Explain why computers store and process data in binary.
[2]3.A text file contains 500 characters, using 8 bits per character. Calculate the file size in bytes.
[2]4.An image is 200 pixels wide and 100 pixels high, with a colour depth of 8 bits. Calculate the file size in bits.
[2]5.A student has three files: 250MB, 900,000KB, and 1.2GB. State which file is the largest, showing your working.
[3]6.A sound file is recorded with a sample rate of 20,000Hz, a bit depth of 8 bits and a duration of 30 seconds. Calculate the size of the file in megabytes.
[3]7.A memory card has a capacity of 2GB. A user wants to store 300 photos, each 4MB, and 12 videos, each 90MB. Determine whether all of these files will fit on the card, showing your working.
[4]8.A podcaster is choosing the sample rate and bit depth for recording an episode. Discuss the factors they should consider and the trade-offs involved.
[8]Extended response · marked in levels, not by counting points
The examiners' reports are the most useful and least read of the three: they say what candidates actually got wrong each year. All files are hosted by OCR.
Past-paper questions grouped by topic
The same OCR questions, sorted by topic rather than by year (via Physics & Maths Tutor).
On a storage capacity comparison question, candidates often struggled when the values were given in different units. Many picked the wrong answer (e.g. 300MB instead of 200,000KB) because they compared the numbers directly instead of converting to a common unit first.
On a file size calculation question, examiners awarded marks for correct partial working, for example correctly multiplying two of the three required values, even when a later step in the calculation was wrong. Always show your working.