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

1286432168421
00111001

2. Split it into 2 nibbles

8421 8421
0011 1001

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:

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

Hexadecimal

Decimal
A10
B11
C12
D13
E14
F15
  • 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
    161E5
  • 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

8421 8421
1110 0101

2. Convert the binary to denary

1286432168421
11100101

128+64+32+4+1=229

Loading

error: Content is protected !!