Data storage
How numbers, text, images and sound are stored in binary and the effect on size and quality.
Learning Objectives
- 1Convert positive denary whole numbers to binary (up to 8 bits) and back
- 2Add two binary integers and explain overflow
- 3Convert between denary, binary and hexadecimal
- 4Carry out and explain the effect of a binary shift
- 5Explain how characters, images and sound are represented in binary
Converting denary to binary
Think of it like...
Think of it like making a number out of coins worth 128, 64, 32... down to 1: you always grab the biggest coin that still fits, then keep going with whatever's left.
Converting binary to denary
Binary addition and overflow
Converting to and from hexadecimal
Binary shifts
Character sets
Representing images
Representing sound
Exam Phrasing: Use These Exact Phrases
- ✓An 8-bit binary number can represent denary values from 0 to 255
- ✓Overflow occurs when the result of a calculation needs more bits than are available to store it
- ✓Each hexadecimal digit represents exactly 4 bits (one nibble)
- ✓A left shift multiplies the number by 2 for each place shifted; a right shift divides it by 2
- ✓A character set assigns a unique binary code to each character
- ✓Colour depth is the number of bits used to represent the colour of one pixel
- ✓Sampling measures and stores the amplitude of a sound wave at regular intervals
- 💡For 8-bit numbers, remember the range is 0 to 255, not 256, a very common exam slip.
- 💡Show every step of a conversion or calculation clearly, including carries in binary addition, examiners award marks for correct working.
- 💡If you change your mind, cross the answer out clearly and rewrite it. Overwriting a 1 into a 0 (or the reverse) is a real cause of lost marks, examiners cannot tell which digit you meant and award nothing.
- 💡When answering a binary shift question, double-check you have shifted by exactly the number of places stated.
- 💡For sound sampling questions, remember it is amplitude that is measured, not frequency.
- 💡Don't try to memorise ASCII codes, you are not required to know them, only how character sets work.
Wrong:
The largest 8-bit binary number represents 256 in denary
Right:
The largest 8-bit binary number (11111111) represents 255
Why it matters: An 8-bit number has 256 possible values, but because it starts at 0, the range is 0-255, not 1-256.
Wrong:
Converting binary numbers to denary, adding them, then converting back counts as binary addition
Right:
Binary addition should be carried out directly in binary, showing carries
Why it matters: OCR examiners noted this method can produce the correct final answer but does not earn the marks awarded for showing correct binary working.
Wrong:
Increasing the bit depth means more samples are taken per second
Right:
Increasing the bit depth means a wider range of amplitude values can be stored for each sample; it is the sample rate that controls how many samples are taken per second
Why it matters: OCR examiners are explicit that credit needs "a wider range of amplitudes can be recorded", and specifically not "more amplitudes or samples per second".
Wrong:
Sound sampling measures the frequency of the wave
Right:
Sound sampling measures the amplitude of the wave at set intervals
Why it matters: Frequency relates to pitch, not what is measured during sampling, this is a common mix-up flagged by examiners.
Wrong:
Shifting by the wrong number of places on a binary shift question
Right:
Always shift by exactly the number of places stated in the question
Why it matters: Examiners noted candidates often shifted digits accurately but by an incorrect number of places.
Wrong:
Increasing colour depth increases an image's resolution
Right:
Colour depth (bits per pixel) and resolution (number of pixels) are separate properties
Why it matters: OCR examiners flagged this as a common misconception, increasing colour depth increases the number of possible colours, not the number of pixels.
Question:
Convert the denary number 45 into an 8-bit binary number. [2]
💡 Attempt this before revealing the answer, practice makes perfect!
Model Answer:
45 = 32 + 8 + 4 + 1, so the binary number is 00101101.
Mark Scheme:
- 1Correct method: breaking 45 down into place values that sum to it (128, 64, 32, 16, 8, 4, 2, 1)
- 2Correct final 8-bit answer: 00101101
Convert an 8-bit binary number to denary.
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 the denary value represented by the 8-bit binary number 00000000.
[1]2.Convert the denary number 200 into an 8-bit binary number.
[2]3.Convert the hexadecimal number A0 into denary.
[2]4.Add the binary numbers 00010110 and 00001101, showing your working. Explain whether an overflow error occurs.
[3]5.Explain why increasing the colour depth of an image improves its quality but also increases its file size.
[3]6.The binary number 00000110 is shifted left by 2 places. State the result and its denary value, and explain the effect the shift has had.
[3]7.A character set uses 8 bits per character. Explain why it can represent 256 different characters, and why Unicode can represent more.
[3]8.Explain how an analogue sound is converted into a digital file, and state the effect of increasing the sample rate.
[4]9.Discuss why computers store all data in binary, and explain why programmers often work in hexadecimal instead.
[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 question about the range of values an 8-bit binary number can store, common errors included giving 1 instead of 0 as the smallest value, and giving 256 (or the 7-bit maximum of 127) instead of 255 as the largest value.
On a binary shift question, most candidates shifted the digits accurately, but some shifted by the wrong number of places, for example moving 3 places when a different number was required.
On a hex-to-denary conversion question, stronger answers clearly annotated each step of their working. Candidates who chose straightforward hex values (like A0) tended to convert more accurately than those who chose more complex values.
On a binary addition question, most candidates showed their carries and scored well. Some candidates converted both binary numbers to denary, added them, then converted back, this can give the correct final answer but does not earn the marks for showing binary working.
On a sound sampling question, candidates who correctly identified that amplitude is measured at set intervals did well. A common error was stating that frequency is measured instead.
On a question about the effect of increasing colour depth, most candidates correctly identified that file size increases and more colours become available. A common misconception was that increasing colour depth increases the image's resolution, when resolution is actually about the number of pixels, not the number of bits used per pixel.