## 10. Converting between hexadecimal and binary

It has been mentioned earlier, hex is mainly used in computing as a very convenient way of expressing a binary number in a compact form. It is quite straightforward to move between hex and binary numbers.

Hex numbers run from 0 to F or 15 decimal

15 decimal is the same as 1111 binary i.e. the largest value of a nibble

So, F hex is the same as 1111 binary

If two hexadecimal digits are used, then you simply need to combine two nibbles together to produce the equivalent binary number

As we are so familiar with decimal numbers, it is easier to use this as the in-between stage

#### Example 1: what is E3 Hex as a binary number?

Take the first hex digit and convert this into a binary nibble

So.... 3 Hex = 3 decimal = 0011 binary

Then take the second hex digit and convert this as well into a binary nibble

So... E hex = 15 decimal = 1110 binary

Now combine the two in the right order like this: 11100011 which is the answer

#### Example 2: What is 11011110 as a hex number?

Step 1.

Split the binary number into nibbles, like this

1101 ...... 1110

Now convert each nibble into decimal ..

13........14

then finally convert these directly to hex

D ...... E

Answer: 11011110 binary = DE Hex

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: binary conversion