KS3National Curriculum Y9.2 32 min read 10 question quiz 18 exam marks

Data Representation

Binary, hexadecimal, binary addition, and exactly how text, images and sound become numbers. This is the foundation of the whole GCSE course.

Binary and hexadecimal

Binary to denary

Write the place values above the digits and add where there is a 1.

1286432168421
11010010

128 + 64 + 16 + 2 = 210

Denary to binary

Work from the left, asking whether each place value fits. Convert 156:

  • 128 fits, leaving 28. Write 1.
  • 64 does not fit. Write 0.
  • 32 does not fit. Write 0.
  • 16 fits, leaving 12. Write 1.
  • 8 fits, leaving 4. Write 1.
  • 4 fits, leaving 0. Write 1.
  • 2 no, 1 no. Write 0, 0.

Result 10011100. Check: 128 + 16 + 8 + 4 = 156.

Hexadecimal

Base 16, using 0 to 9 then A to F.

Denary101112131415
HexABCDEF

Why it is used: one hex digit replaces four binary digits, so values are a quarter of the length and far easier for a person to read, write and remember without mistakes. You see it in colour codes, MAC addresses and error codes.

Converting

Binary to hex: split into nibbles of four bits from the right, convert each.

11010110 becomes 1101 and 0110, which is 13 and 6, so D6.

Hex to binary: expand each digit to four bits.

2F becomes 0010 and 1111, so 00101111.

Hex to denary: multiply the first digit by 16 and add the second.

3A = (3 x 16) + 10 = 58

Number base converter

Convert between denary, binary and hexadecimal, with every step of the working written out. This tool needs JavaScript, so turn it on to use it. Everything you need to answer the exam question is explained in the text above.

Converting 1010 1111 to hexadecimal one nibble at a time, and the sixteen hex digitsHow to convert a byte to hexadecimal. The byte 1010 1111 is split into two nibbles of four bits each: 1010 on the left and 1111 on the right. Each nibble is converted on its own using the place values 8, 4, 2 and 1. The left nibble is 8 plus 2, which is 10, and 10 is the hex digit A. The right nibble is 8 plus 4 plus 2 plus 1, which is 15, and 15 is the hex digit F. Written side by side the byte is AF in hex. Underneath is a table of all sixteen hex digits with their denary and four bit binary values: 0 to 9 are written as themselves and 10 to 15 are written A, B, C, D, E and F.Binary to hex, one nibble at a time101011118 + 2 = 10A8 + 4 + 2 + 1 = 15FAFside by sideThe sixteen hex digitshexdenarybinary000000110001220010330011440100550101660110770111881000991001A101010B111011C121100D131101E141110F151111One hex digit is always exactly four bits.1234
  1. Split the byte into two nibbles of four bits. Colours keep each nibble with its digit.
  2. Convert each nibble on its own with 8, 4, 2 and 1: 1010 is 10 and 1111 is 15.
  3. Write each value as one hex digit, 10 as A and 15 as F, and put them side by side.
  4. Learn the table: 0 to 9 look the same in hex, then A is 10 up to F which is 15.
Split into nibbles, convert each, join them up. Going the other way, turn each hex digit back into four bits.

Binary addition and units

The four rules

0 + 0 = 0 0 + 1 = 1 1 + 1 = 0 carry 1 1 + 1 + 1 = 1 carry 1

Work from right to left, exactly like column addition.

01101010 (106)

  • 00110101 (53)

---------- 10011111 (159)

Overflow

An overflow error happens when the answer needs more bits than are available. With 8 bits the largest value is 255, so any total above that overflows, the carry out of the leftmost column is lost, and the stored answer is wrong.

Units

UnitSize
BitOne 1 or 0
Nibble4 bits
Byte8 bits
Kilobyte1000 bytes
Megabyte1000 KB
Gigabyte1000 MB
Terabyte1000 GB
Binary addition with carries, and overflowA worked binary addition set out in columns. The first number is 01101101, which is 109 in denary. The second is 00110110, which is 54. Working from the right, the four rules are that 0 plus 0 is 0, 1 plus 0 is 1, 1 plus 1 is 0 carry 1, and 1 plus 1 plus 1 is 1 carry 1. Carries of 1 are generated in four of the columns. The result is 10100011, which is 163 in denary, and 109 plus 54 does equal 163. Overflow happens when a carry comes out of the leftmost column: with only eight bits available there is no ninth bit to hold it, so the carry is lost and the stored answer is wrong.Adding two 8 bit numbers, and what overflow meanscarry1111101101101= 109+00110110= 54=10100011= 163The four rules0 + 0 = 0 1 + 0 = 11 + 1 = 0 carry 11 + 1 + 1 = 1 carry 1OverflowIf a carry comes out of the leftmostcolumn there is no ninth bit to hold it,so the answer stored is wrong.
Always write the carry row above the columns. Losing a carry off the left hand end is overflow, and it is a favourite exam question.

File size calculator

Work out the size of an image, a sound file or a block of text, one conversion at a time. This tool needs JavaScript, so turn it on to use it. Everything you need to answer the exam question is explained in the text above.

Overflow: 255 plus 1 does not fit in eight bitsWhat overflow is. Adding 1111 1111, which is 255, and 0000 0001 in an eight bit register gives 1 0000 0000, which is 256 and needs nine bits. The register only holds eight, so the ninth bit, the leading 1, has nowhere to go and is lost, and the register keeps 0000 0000, which is 0. The answer is wrong. An odometer does the same thing: 999 plus 1 turns all three wheels to 0 and the 1000 does not fit. When this happens the processor sets the carry flag in the status register. It can be avoided by using more bits, or by checking the flag.255 + 1 in an 8 bit register1111111100000001+000000001what the register keeps: 09th bit: no roomThe same thing on an odometer999+ 10001000doesnot fitWhat goes wrongThe answer is wrong255 + 1 shows as 0,not 256.A flag is setThe carry flag in thestatus registerrecords it.How to avoid itUse more bits, orcheck the flag.123
  1. Adding 1111 1111 and 0000 0001 produces a ninth bit. The register only keeps eight, so the answer shown is 0000 0000.
  2. An odometer is the same: 999 plus 1 gives 000 because the 1000 does not fit in three wheels.
  3. The answer is wrong, the carry flag is set to record it, and it is avoided with more bits or a check.
Overflow happens when a result needs more bits than the register has. The largest 8 bit number is 255.

Representing text, images and sound

Text

Every character is given a number, and that number is stored in binary. The agreed list is the character set.

  • ASCII uses 7 bits, giving 128 characters. Enough for English.
  • Unicode uses 16 bits or more, giving over a million characters, covering every major writing system and emoji.

Unicode's advantage is language coverage. Its cost is file size, because each character takes more bits.

Characters are in order, so if A is 65 then D is 68. The character '5' is not the number 5: its ASCII code is 53.

Images

An image is a grid of pixels, each storing a colour as a binary number.

  • Resolution is the number of pixels, written width by height
  • Colour depth is the number of bits per pixel, and n bits gives 2n colours
  • Metadata is data about the image such as its dimensions, needed so the computer knows how to arrange the pixels

file size in bits = colour depth x width x height

A 500 by 400 image at 8 bit colour depth:

8 x 500 x 400 = 1,600,000 bits = 200,000 bytes = 200 KB

Sound

Sound is a continuous wave, so it must be sampled: measured at regular intervals with each measurement stored as a binary number.

  • Sample rate is how many measurements per second, in hertz
  • Bit depth is how many bits store each measurement

file size in bits = sample rate x duration in seconds x bit depth

A 60 second clip at 44,100 Hz with 16 bit depth:

44100 x 60 x 16 = 42,336,000 bits = 5,292,000 bytes = about 5.3 MB

The pattern across all three

Better quality always means more numbers, and more numbers always means a bigger file. There is no way around that trade off.

How a bitmap image is stored, and what decides its sizeAn eight by eight bitmap image of a simple face shown next to the binary that stores it. Each square of the picture is one pixel, and because this image uses one bit per pixel each pixel is either 0 for the background or 1 for the ink. The eight rows of bits are 00111100, 01000010, 10100101, 10000001, 10100101, 10011001, 01000010 and 00111100. Three properties decide the file. Resolution is how many pixels across by how many down, here eight by eight, giving 64 pixels in total. Colour depth is how many bits are stored per pixel: one bit gives two colours, eight bits gives 256 colours and 24 bits gives about 16.7 million. Metadata is the extra information stored with the image, such as width, height, colour depth and date, so that software can open it correctly. File size in bits equals width times height times colour depth, plus the metadata.An 8 by 8 image, one bit per pixelthe picture0 0 1 1 1 1 0 00 1 0 0 0 0 1 01 0 1 0 0 1 0 11 0 0 0 0 0 0 11 0 1 0 0 1 0 11 0 0 1 1 0 0 10 1 0 0 0 0 1 00 0 1 1 1 1 0 0the same thing, stored as bitsResolutionhow many pixels across by how manydown. Here 8 x 8, so 64 pixels.Colour depthbits per pixel. 1 bit gives 2 colours,8 gives 256, 24 gives 16.7 million.Metadatawidth, height, colour depth, date,so the file can be opened correctly.file size in bits = width x height x colour depth, then add the metadata
Increasing colour depth by one bit doubles the number of available colours and adds one bit to every single pixel.
How a bitmap image is stored: a grid of pixels, each three numbersHow a bitmap image is stored. The image is a grid of pixels, and this one is eight by eight, so sixty four pixels in total. Every pixel holds one colour, and that colour is stored as three numbers: how much red, how much green and how much blue. In 24 bit colour each of those three numbers gets eight bits, so one pixel costs 8 plus 8 plus 8, which is 24 bits or 3 bytes. The colour depth is simply how many bits each pixel gets. The file size in bits is the width times the height times the colour depth: for this image 8 times 8 times 24 is 1,536 bits, and dividing by 8 gives 192 bytes.8 pixels wide8 tall: 64 pixels in allone pixelR24011110000G10301100111B91010110113 numbers × 8 bits = 24 bits = 3 bytesFile size in bits8width×8height×24colour depth= 1,536 bits, and ÷ 8 = 192 bytes1234
  1. A bitmap is a grid of pixels. This one is 8 by 8, so 64 of them.
  2. Pick one pixel. Its colour is three numbers: red, green and blue.
  3. Each number is 8 bits, so one pixel costs 24 bits, which is 3 bytes.
  4. File size = width × height × colour depth. That is the whole formula.
Width times height times colour depth gives bits. Divide by 8 for bytes. Every image file size question is that line and nothing more.
Characters stored as numbers, and the three character sets ASCII, extended ASCII and UnicodeComputers store text as numbers. A character set is the agreed list that says which number means which character. In ASCII the capital letter A is 65, which is 0100 0001 in binary, B is 66, a lower case a is 97 and the character 7 is 55. The codes run in order, so B is always one more than A, and a lower case letter is 32 higher than its capital. The character 7 is text with code 55, which is different from the number 7. Below are three character sets. ASCII uses 7 bits per character and so holds 128 characters. Extended ASCII uses 8 bits and holds 256, adding accents and symbols such as é, ñ and £. Unicode uses up to 32 bits and holds over a million characters, covering every writing system and emoji, with the first 128 codes kept the same as ASCII.Every character is stored as a numberA6501000001B6601000010a970110000175500110111Codes run in order:A 65, B 66, C 67 ...Lower case is 32 higher:a is 97, A is 65The character 7 is code 55,not the number 7Three character setsASCII7 bits each128 charactersAz5?Extended ASCII8 bits each256 characterséñ£©Unicodeup to 32 bits eachover a millionΩЖ123
  1. Each character has a code number, and the computer stores that number in binary.
  2. The codes run in order, so you can work out C from A. The character 7 is not the number 7.
  3. More bits per character means more characters: 128, then 256, then over a million.
A character set is just an agreed table of numbers. Unicode is needed because 256 characters cannot cover the world's languages.
A photograph and the metadata stored with itAn image file holds more than the pixels. Metadata is data about the data: it is stored in the file but it is not part of the picture. Some metadata is needed to rebuild and show the image: the width and height in pixels, here 4032 by 3024, the colour depth, here 24 bits, and the file type, here JPEG. Other metadata is extra information: the date and time the photo was taken, the device, the resolution in pixels per inch, and the GPS location, here 51.50 north, 0.12 west. Without the width, height and colour depth the computer would not know how to turn the stream of bits back into a grid of pixels. The extra information can be a privacy risk, because a photo shared online can reveal where it was taken.IMG_0412.jpgthe pixels you seeMetadata: data about the dataneeded to show the pictureWidth4032 pxHeight3024 pxColour depth24 bitsFile typeJPEGextra informationDate taken14 Jun 2026 09:41DevicesmartphoneLocation51.50 N, 0.12 WResolution300 ppiFile size = width × height × colour depth, plus a little for the metadata.123
  1. The picture is a grid of pixels, stored as one long stream of bits.
  2. Metadata that must be stored: width, height and colour depth. Without them the bits cannot be turned back into the picture.
  3. Extra metadata such as date, device and GPS location is useful, but sharing it can be a privacy risk.
Metadata is data about the data. It is not part of the picture, but the file would not open properly without the key parts.

Key terms you must be able to define

Binary
Base 2, using only the digits 0 and 1.
Denary
Base 10, the everyday number system. Also called decimal.
Hexadecimal
Base 16, using 0 to 9 and A to F, where one digit represents four bits.
Overflow
An error where a result needs more bits than are available, so the stored answer is wrong.
Character set
The agreed list of characters and the binary code used for each.
ASCII
A 7 bit character set representing 128 characters.
Unicode
A character set using 16 or more bits, representing over a million characters.
Resolution
The number of pixels in an image, given as width by height.
Colour depth
The number of bits used to store the colour of each pixel.
Sampling
Measuring a sound wave at regular intervals and storing each measurement in binary.
Sample rate
The number of sound samples taken each second, measured in hertz.

Flashcards

Say the definition out loud before you flip the card. Retrieving it from memory is what builds recall, reading it again is not.

DefineBinary
AnswerBase 2, using only the digits 0 and 1.
DefineDenary
AnswerBase 10, the everyday number system. Also called decimal.
DefineHexadecimal
AnswerBase 16, using 0 to 9 and A to F, where one digit represents four bits.
DefineOverflow
AnswerAn error where a result needs more bits than are available, so the stored answer is wrong.
DefineCharacter set
AnswerThe agreed list of characters and the binary code used for each.
DefineASCII
AnswerA 7 bit character set representing 128 characters.
DefineUnicode
AnswerA character set using 16 or more bits, representing over a million characters.
DefineResolution
AnswerThe number of pixels in an image, given as width by height.

Reach the top grade on this topic

This topic is where careful students collect free marks and careless ones give them away.

Write the place values down every time. 128 64 32 16 8 4 2 1. Every single time, even when you are sure.

Check by converting back. It takes ten seconds and catches almost every error.

Show every line of working in calculations, with units. Method marks are real marks, and an answer left in bits when the question asked for kilobytes loses the final mark even when everything else was perfect.

Explain rather than assert. Higher sample rate improves quality because measurements are taken closer together, so the stored data follows the original wave more closely.

  • Convert 8 bit binary to denary and back in under 30 seconds
  • Convert between binary, hex and denary in both directions
  • Add two 8 bit numbers and identify overflow
  • Calculate an image or sound file size in the unit requested

Mistakes that cost marks here

Avoid these
  • Writing the place values in the wrong direction. The 1 is on the right.
  • Splitting binary into nibbles from the left instead of the right.
  • Treating hexadecimal A as 1 rather than 10.
  • Saying a colour depth of 4 means four colours. It means four bits, so sixteen colours.
  • Forgetting to divide by 8 when the answer must be in bytes.
  • Forgetting to convert minutes into seconds before a sound calculation.
Fun fact

Hexadecimal exists only for people. The computer never uses it. The colour white in 24 bit binary is twenty four ones in a row, and in hexadecimal it is just FFFFFF, which is why every web developer is grateful for base 16.

Knowledge check

0 of 10 answered
1What is 11001010 in denary?
2What is 45 in 8 bit binary?
3What is 10110110 in hexadecimal?
4Why is hexadecimal used by programmers?
5What is the denary value of hexadecimal 5C?
6An overflow error happens when:
7An image is 400 by 300 with a colour depth of 8 bits. What is the file size in bits?
8What does a colour depth of 6 bits allow?
9What is sample rate?
10What is the main disadvantage of Unicode compared with ASCII?
Score 0 / 10

Exam-style questions

Five written questions in the style of the real paper. Write a full answer, then let the marker check it against the mark scheme.

18 marks
1Convert the denary number 187 into 8 bit binary. Show your working.3 marks
Convert

Mark scheme0 / 3
  • LUses place values from 128 downwards
  • LShows the subtraction working
  • LCorrect answer 10111011
Model answer

Working from the largest place value: 128 fits into 187 leaving 59, so write 1. 64 does not fit into 59, write 0. 32 fits leaving 27, write 1. 16 fits leaving 11, write 1. 8 fits leaving 3, write 0 for 8 being used, so write 1. 4 does not fit into 3, write 0. 2 fits leaving 1, write 1. 1 fits leaving 0, write 1. This gives 10111011, and checking: 128 + 32 + 16 + 8 + 2 + 1 = 187.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
2Explain why hexadecimal is often used instead of binary.3 marks
Explain

Mark scheme0 / 3
  • LOne hexadecimal digit represents four binary digits
  • LValues are much shorter to write and read
  • LShorter values are easier for people to remember and less prone to error
Model answer

Hexadecimal is used because each hexadecimal digit represents exactly four binary digits, so an eight bit value that needs eight characters in binary needs only two in hexadecimal. Values written in hexadecimal are therefore around a quarter of the length, which makes them far quicker for a person to write down and read back. Because the values are short, people make fewer transcription mistakes and any error that is made is much easier to spot, which is why colour codes, MAC addresses and memory addresses are all normally written in hexadecimal. The computer itself still works entirely in binary.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
3Add the binary numbers 01011010 and 00110110, showing your working, and state the denary value of the answer.4 marks
Add

Mark scheme0 / 4
  • LAdds column by column from the right with carries
  • LCorrect binary answer 10010000
  • LConverts the answer to denary
  • LStates that no overflow occurs as the answer fits in 8 bits
Model answer

Adding column by column from the right and carrying wherever two or three ones meet gives 10010000. Checking in denary, 01011010 is 90 and 00110110 is 54, and 90 plus 54 is 144, which is 10010000 in binary since 128 + 16 = 144. No overflow error occurs, because 144 is within the range 0 to 255 that eight bits can represent, so nothing is carried out of the most significant column and no data is lost.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
4A photograph is 1200 pixels wide and 800 pixels high with a colour depth of 24 bits. Calculate the file size in megabytes.4 marks
Calculate

Mark scheme0 / 4
  • LMultiplies colour depth by width by height
  • LObtains 23,040,000 bits
  • LDivides by 8 to obtain 2,880,000 bytes
  • LStates 2.88 MB
Model answer

File size in bits is colour depth multiplied by width multiplied by height, so 24 x 1200 x 800 = 23,040,000 bits. Dividing by 8 gives 2,880,000 bytes. Dividing by 1000 gives 2880 kilobytes, and dividing by 1000 again gives a file size of 2.88 megabytes.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
5Explain how sound is stored digitally, and describe the effect of increasing the sample rate.4 marks
Explain

Mark scheme0 / 4
  • LThe amplitude of the sound wave is measured at regular intervals
  • LEach measurement is stored as a binary number
  • LA higher sample rate means measurements are taken closer together in time
  • LSo the recording is a more accurate copy of the original wave, but the file is larger
Model answer

Sound in the real world is a continuously varying wave, which cannot be stored directly because a computer can only store numbers. Instead the amplitude of the wave is measured at regular fixed intervals, a process called sampling, and each measurement is rounded to the nearest available level and stored as a binary number. Increasing the sample rate means those measurements are taken more often and therefore closer together in time, so less of the wave's shape is missed between samples and the stored data follows the original much more closely, producing a more accurate and better sounding recording. The cost is file size, which is directly proportional to sample rate, so doubling the sample rate doubles the amount of storage the recording needs.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
Machine mark 0 / 18