Converting Between Hexadecimal & Denary (CIE IGCSE Computer Science)

Revision Note

Test Yourself
Becci Peters

Expertise

Computer Science

Converting Between Hexadecimal & Denary

Converting Denary to Hexadecimal Walkthrough:

  1. Divide the decimal number (in this example 57) by 16 and write down the answer including the remainder:
    57 ÷ 16 = 3 remainder 9
  2. If the remainder is above 9, replace this with the corresponding letter
  3. Repeat steps 1 and 2 until the number you’re dividing is zero:
    3 ÷ 16 = 0 remainder 3
  4. Write the hexadecimal values from step 3 to step 1 in reverse order:
    39

Alternatively, you can turn your denary number into binary, and then turn the binary number into hexadecimal:

1. Work out 57 in binary

128 64 32 16 8 4 2 1
0 0 1 1 1 0 0 1

2. Split it into 2 nibbles

8 4 2 1   8 4 2 1
0 0 1 1   1 0 0 1

3. Turn each nibble into its hex value

2+1=3                                 8+1=9

Answer is 39

Converting Hexadecimal to Denary Walkthrough:

  • Write down the place value of each digit in the number, starting from the right and increasing by a power of 16:

    161

    160

    16

    1

  • If the hex digit is a letter, convert it to its denary equivalent (Using the following table to help you):


Hexadecimal


Decimal

A

10

B

11

C

12

D

13

E

14

F

15

  • The hexadecimal value of the leftmost digit E has a decimal value of 14. The hexadecimal value of the rightmost digit is 5, which has a decimal value of 5

    16

    1

    E

    5

  • Multiply each decimal value by its corresponding place value, and sum the products:

(14 x 16) + (5 x 1) = 224 + 5 = 229

Therefore, the denary equivalent of E5 is 229.

Alternatively, you can turn your hexadecimal number into binary, and then turn the binary number into denary:

1. Write each hex digit in binary

8 4 2 1   8 4 2 1
1 1 1 0   0 1 0 1

2. Convert the binary to denary

128 64 32 16 8 4 2 1
1 1 1 0 0 1 0 1

128+64+32+4+1=229

Exam Tip

  • When doing conversions don’t remove any 0s on the right hand side of your answer as this will cost you marks. E.g. B0 isn’t the same as B, just like 30 isn’t the same as 3.

You've read 0 of your 0 free revision notes

Get unlimited access

to absolutely everything:

  • Downloadable PDFs
  • Unlimited Revision Notes
  • Topic Questions
  • Past Papers
  • Model Answers
  • Videos (Maths and Science)

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Did this page help you?

Becci Peters

Author: Becci Peters

Becci has been a passionate Computing teacher for over 9 years, teaching Computing across the UK helping to engage, interest and develop confidence in the subject at all levels. Working as a Head of Department and then as an educational consultant, Becci has advised schools in England, where her role was to support and coach teachers to improve Computing teaching for all. Becci is also a senior examiner for multiple exam boards covering GCSE & A-level. She has worked as a lecturer at a university, lecturing trainee teachers for Computing.