# Hexidecimal to Denary

We know that a digit's worth depends on what position it is in relative to the other digits in the number.

• Base 10 positions are worth 107, 106, 105, 104, 103, 102, 101, 100
• Base 2 positions are worth 27, 26, 25, 2423, 22, 21s, 20
• Base 16 positions are worth 167, 166, 165, 164, 163, 162, 161, 160

How does the hexadecimal system work?

The first thing to note is that there are 16 'numbers' in this system: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. It may well seem a little odd using letters to represent numbers: 10=A, 11=B, 12=C, 13=D, 14=E, 15=F. With a little practice, you will see what an excellent system this is.

Just to remind you, to show what system is being used when you write down a number, it is common to use a subscript. So for example: 3410 means (3 x 10) + (4 x 1) whereas 3416 means (3 x 16) + (4 x 1)

As you know, when we write down numbers in our daily life, we omit the subscript because we assume that every one is using base 10. Sometimes, especially in computer circles, it is a dangerous assumption to make! If there is any doubt, then add a subscript!

When doing exam questions, always use a subscript, just to show how clever you are!

Let's convert a few hex numbers into denary. For the first few you do, you should write down the worth of each position. Then write the number you are converting underneath it. Finally, do the conversion.

Example 1: convert 3C 16 into decimal.

 Worth of each position 256 (162) 16 (161) 1 (160) Number to convert 3 C

3C16 is the same as (3 x 16) + (12 x 1) = 6010

Example 2: convert 2516 into decimal.

 Worth of each position 256 (162) 16 (161) 1 (160) Number to convert 2 5

2516 is the same as (2 x 16) + (5 x 1) = 3710

Example 3: convert 816 into decimal.

 Worth of each position 256 (162) 16 (161) 1 (160) Number to convert 8

816 is the same as (8 x 1) = 810

Example 4: convert 3AF16 into decimal.

 Worth of each position 256 (162) 16 (161) 1 (160) Number to convert 3 A F

3AF16 is the same as (3 x 256) + (10 x 16) + (15 x 1) = 94310

Q1. Convert these numbers into their denary form: a) 3616      b) 316     c) FA16     d) 1516

Q2. Convert these decimal numbers into hex: a) 10310      b) 1410      c) 5810     d) 710

Q3. Why are nibbles important when using hex?