57 exam-style questions plus unlimited generated ones on this topic, at up to four difficulty levels, with full mark schemes. Notes and past-paper booklets are open to everyone. Practice needs a free account.
Or take a quick quiz: 11 questions on this subtopic in GCSE Computer Science (OCR), marked as you tap.
Why computers store data in binary, the units of data from bit to petabyte, converting between units, and calculating how much storage is needed, including file sizes for text, images and sound. Both J277 papers are non-calculator, so the numbers are chosen to be worked out by hand.
To a smaller unit → multiply; to a larger unit → divide
Text (bits) = bits per character × number of characters
Image (bits) = colour depth × width × height
Sound (bits) = sample rate × bit depth × seconds
Bits ÷ 8 = bytes
Notes
Why binary
A computer's processor and memory are made of billions of tiny switches (transistors) that are either on or off.
These two states are represented by 1 and 0, so all data (numbers, text, images, sound and program instructions) must be converted into binary before a computer can store or process it.
Units of data
diagram
Bit: a single binary digit, 0 or 1. The smallest unit.
Each step is 1000 (8 between bytes and bits): multiply going down, divide going up
The specification also accepts 1024 at each step. Use whichever the question tells you; 1000 is much easier without a calculator.
With 1024, 1 MB = 1024 × 1024 = 1,048,576 bytes. The same number of bytes gives a slightly smaller number of KB, MB or GB than with 1000; the amount of data is unchanged. Grade 8+ only
Converting
To a smaller unit, multiply: 3 GB = 3 × 1000 = 3000 MB.
To a larger unit, divide: 4500 KB = 4500 ÷ 1000 = 4.5 MB.
Between bits and bytes, use 8: bytes = bits ÷ 8, and bits = bytes × 8.
Sound file size (bits) = sample rate × bit depth × duration (in seconds).
These formulas give bits: divide by 8 for bytes, then by 1000 for KB. Real files are a little larger because they also store metadata.
When working out how many files fit, round down: part of a file cannot be stored.
How to answer each type of question
Convert between units
1 to 2 marksGrade 4
Decide whether you are going to a smaller unit (multiply) or a larger unit (divide).
Use 1000 between KB, MB, GB, TB and PB (or 1024 if the question says so), and 8 between bits and bytes.
Sense check: a smaller unit gives a bigger number.
Example. (a) Convert 3.5 GB into megabytes. Use 1 GB = 1000 MB. [1] (b) Convert 48 bits into bytes. [1]
Show the model answerHide the model answer
(a) 3.5 × 1000 = 3500 MB
(1)
(b) 48 ÷ 8 = 6 bytes
(1)
Calculate the size of a text file
2 to 3 marksGrade 6
Multiply the bits per character by the number of characters.
Divide by 8 to get bytes.
Divide by 1000 to get kilobytes if asked.
Example. A document contains 2500 characters. Each character is stored using 16 bits. Calculate the file size in kilobytes. Use 1 KB = 1000 bytes. Show your working. [3]
Show the model answerHide the model answer
2500 × 16 = 40,000 bits
(1)
40,000 ÷ 8 = 5000 bytes
(1)
5000 ÷ 1000 = 5 KB
(1)
Calculate the total storage needed and choose a device
3 to 4 marksGrade 6
Multiply file size by number of files for each type of file.
Convert everything into the same unit and add.
Compare with each capacity and choose the smallest device that is big enough.
Show every step: method marks are available even if you make a slip.
Example. A student wants to store 200 photos of 3 MB each and 40 videos of 250 MB each. Memory cards are available in 8 GB, 16 GB and 32 GB sizes. Use 1 GB = 1000 MB. Calculate the total storage needed and identify the smallest card that is big enough. Show your working. [3]
Find the space available (capacity minus space already used).
Convert it into the same unit as the file size.
Divide, then round DOWN to a whole number of files.
Example. A 64 GB USB flash drive already has 16 GB of data on it. Songs are 9 MB each. Calculate how many songs can be stored in the remaining space. Use 1 GB = 1000 MB. Show your working. [3]
Show the model answerHide the model answer
Free space: 64 − 16 = 48 GB
(1)
48 × 1000 = 48,000 MB and 48,000 ÷ 9 = 5333.3…
(1)
5333 songs, rounded down because there is not enough space for another whole song
(1)
Don’t lose marks
Dividing when you should multiply, or the other way round.
Forgetting to divide by 8 to change bits into bytes, or dividing by 8 twice.
Adding sizes in different units, e.g. MB and GB, without converting first.
Rounding up the number of files that fit. Always round down.
Using minutes instead of seconds in sound file calculations.
More tips
Memory tricks
Unit ladder: 4 bits = 1 nibble, 2 nibbles = 1 byte, then 1000 of each unit makes the next: KB, MB, GB, TB, PB.
'Kind Men Give Tiny Presents' = KB, MB, GB, TB, PB.
Sense check: changing to a smaller unit should give a bigger number.
In file size formulas, multiply everything to get bits first, then divide by 8 and by 1000 at the end.
Exam technique
Show your working step by step with a unit at each step: method marks are given even if the final answer is wrong.
Use whichever of 1000 or 1024 the question states. If it doesn't say, either is accepted, but 1000 is easier by hand.
Write large numbers with commas (48,000) so you don't lose a zero.
What each grade needs
What you need to be able to do, from the first marks up to the top grade.
Grade 3
Explain why data is stored in binaryComputers are made of switches (transistors) with two states, on and off, represented by 1 and 0.
Grade 3
Put the units in orderBit, nibble, byte, kilobyte, megabyte, gigabyte, terabyte, petabyte.
Grade 4
Convert between units of dataMultiply by 1000 to change to a smaller unit and divide by 1000 to change to a larger one (use 8 between bits and bytes).
Grade 5
Calculate the storage needed for several filesConvert every file size to the same unit, add them up and compare the total with a device's capacity.
Grade 6
Calculate the size of a text fileBits per character × number of characters, then divide by 8 for bytes.
Grade 7
Solve multi-step capacity problemsE.g. find how many files fit in the space left on a device, rounding down to a whole number of files.
Grade 8
Work with 1000 and 1024 conventionsKnow that 1 KB can be taken as 1000 or 1024 bytes and use whichever the question states.
Quick recall
Cover the answers and test yourself. The app has these as flashcards that come back just before you'd forget them.
State the number of bits in one byte.
8
A text document contains 2000 characters. Each character is stored using 1 byte. Calculate the size of the document in bytes.
2000 bytes
A file transfer tool shows the amount downloaded so far in MB, but the app's summary screen shows the total in GB. Use 1 GB = 1000 MB. Calculate 2500 MB in GB.
2.5 GB
Name the smallest unit of data that a computer can store.
Bit
Write out in full the name of the unit of data that has the symbol GB.
Gigabyte
Dev has a photo that is 3000 KB in size. Dev says, ‘My photo is 3 GB.’ Explain why Dev is wrong.
3000 KB is 3 MB, and 3 GB would be 3 000 000 KB.
Sample questions
Written for this site in the style of OCR exam questions. They are not taken from real past papers.
Question 1Easy3 marks
(a) Which one of the following lists the units in order from smallest to largest? Tick (✓) one box.
[1]
nibble, bit, byte, kilobyte
bit, byte, nibble, kilobyte
byte, bit, nibble, megabyte
bit, nibble, byte, kilobyte
(b) State the number of bits in one byte.
[1]
(c) State the name of the unit that is equal to 1000 terabytes.
[1]
Show the answer and mark scheme
(a)Answer: bit, nibble, byte, kilobyte
(b)Answer: 8
8
(c)Answer: petabyte (PB)
petabyte / PB
Question 2Medium3 marks
(a) Explain why data must be converted into binary before it can be processed by a computer.
[2]
(b) Calculate the number of bytes in 2.5 MB. Use 1 MB = 1000 KB and 1 KB = 1000 bytes.
[1]
Show the answer and mark scheme
(a)
computers are made of (billions of) switches / transistors / logic gates
which only have two states (on and off), represented by 1 and 0
(b)Answer: 2,500,000 bytes
2,500,000 (bytes)
Question 3Hard4 marks
A student wants to back up these files onto a single USB flash drive:
350 photos, each 4.2 MB
120 songs, each 5 MB
45 videos, each 750 MB
documents with a total size of 850 MB
USB flash drives are available with capacities of 16 GB, 32 GB, 64 GB and 128 GB.
Calculate the total size of the files and identify the smallest USB flash drive that the student could use. Use 1 GB = 1000 MB. Show your working.