GCSE COMPUTING
NUMBER
THEORY8. Converting decimal into hexadecimal
From the previous page consider the following list
Hex Decimal Calculator
0F 15 decimal
10 16 decimal (1x16)
20 32 decimal (2x16)
30 48 decimal (3x16)
40 64 decimal (4x16)
Example 1: Convert 46 decimal into hex
Create a small table for yourself using a calculator as above. Fill out the table so that the last decimal number is bigger than the one you are trying to convert, like this
Decimal |
48 |
32 |
16 |
15 |
14 |
13 |
12 |
11 |
10 |
0-9 |
Hexadecimal |
3 |
2 |
1 |
F |
E |
D |
C |
B |
A |
0-9 |
The largest denary number in the table is 48 which is the equivalent of 30 Hex. The table finished here because the number to be converted, (46) is less than this.
Step 1: Go down the table to find the largest number that is still less than the decimal. In this case 32 decimal since the next decimal is 48 and that is too large. So write down 20 Hex
Now work out what is left over by taking away that closest number : 46 - 32 = 14
So 14 is left over. 14 decimal is E hex. Place this as the first digit in the hex number So the answer is
2E Hex = 46 decimal
Example 2: Convert 17 decimal into hex
It is quite common to shorten the full 'hexadecimal' term to simply 'hex'. It's just easier to say!
We can still use the same table as before since 17 is less than 48.
Step 1: Go down the table to find the largest number that is still less than the decimal. In this case 16 decimal since the next decimal is 32 and that is too large. So write down 10 Hex
Now work out what is left over by taking away that closest number : 17 - 16 = 1
So 1 is left over. 1 decimal is also 1 hex. Place this as the first digit in the hex number. So the answer is
11 Hex = 17 decimal
Challenge see if you can find out one extra fact on this topic that we haven't already told you
Click on this link: Hexadecimal
Copyright © www.teach-ict.com


