Hexadecimal Cambridge IGCSE Computer Science (9–1) revision
Not started
Learn it
In plain words
Long strings of 1s and 0s are hard for people to read and easy to mistype. Hexadecimal, or hex, is a shorthand: base 16, where one hex digit stands for exactly four bits.
Base 16 needs sixteen digits, so after 9 it borrows letters: A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.
7 things to know
- Hexadecimal is base 16. Its digits are 0 to 9 and then A to F for 10 to 15.
- Binary to hex: split the bits into groups of four, starting from the right. Convert each group to one hex digit.
- Hex to binary: turn each hex digit into its own four bits.
- Hex to denary: the place values are 1, 16, 256, 4096. Multiply each digit by its place value and add.
- Denary to hex: divide by 16. The whole-number answer is the first digit and the remainder is the second.
- Hex is used because it is shorter than binary, easier for people to read and write, and so less likely to be copied wrongly. The computer itself still works in binary.
- Where you meet it: MAC addresses, IPv6 addresses, colour codes in web pages (such as #FF8800), memory addresses and error codes.
Worked example
Convert the binary number 10111100 to hexadecimal.
- Split it into two groups of four: 1011 and 1100.
- 1011 = 8 + 2 + 1 = 11, which is B. 1100 = 8 + 4 = 12, which is C.
- 10111100 = BC.
Worked example
Convert the denary number 200 to hexadecimal.
- 200 ÷ 16 = 12 remainder 8.
- 12 is C, and the remainder is 8.
- 200 = C8.
Tips and tricks
- Going between hex and denary with big numbers is easiest through binary: one hex digit, four bits.
- "Why is hex used?" is about people, not machines. Never say the computer runs faster or saves memory.
It lands in your notebook with its questions as flashcards.
Hexadecimal: 7 questions and answers
These are the quiz’s questions. Do the quiz first, then come back here for the ones that got you.
Which hex digit stands for the denary number 13?
A = 10, B = 11, C = 12, D = 13.
What is the binary number 11110101 in hexadecimal?
1111 = F and 0101 = 5.
What is the hexadecimal number 3A in denary?
3 × 16 + 10 = 58.
Why do programmers use hexadecimal instead of binary?
It is a convenience for humans. Inside the computer it is still binary.
Which of these is usually written in hexadecimal?
MAC addresses, IPv6 addresses and web colour codes are all written in hex.
What is the denary number 255 in hexadecimal?Stretch
255 ÷ 16 = 15 remainder 15, and 15 is F.
What is the hexadecimal number 1F4 in denary?Stretch
1 × 256 + 15 × 16 + 4 = 256 + 240 + 4.
Quiz
7 questions
Tap an answer and you’ll see straight away whether it’s right, and why.
Worksheet
3 questions, 6 marks. Write your answers on paper, then check them.
Hexadecimal
Cambridge IGCSE Computer Science (9–1) 0984 · 6 marks · papermunch.org
Name ______________________________ Date ______________
Convert the binary number 10011110 to hexadecimal.[2]
Show answerHide answer
9E. 1001 = 9 and 1110 = 14 = E.
Convert the hexadecimal number B7 to denary. Show your working.[2]
Show answerHide answer
183. 11 × 16 + 7 = 176 + 7.
Give two reasons why a programmer might write a value in hexadecimal instead of binary.[2]
Show answerHide answer
It is shorter, so it is quicker to read and write. It is easier for people to understand, so fewer mistakes are made.
Answers: Hexadecimal
- 1. 9E. 1001 = 9 and 1110 = 14 = E.
- 2. 183. 11 × 16 + 7 = 176 + 7.
- 3. It is shorter, so it is quicker to read and write. It is easier for people to understand, so fewer mistakes are made.



