# Binary to Hex and Hex to Binary

This is the continuation of the learning binary series.

Be sure to read my binary blog post and hexadecimal blog post before you read this article on binary to hex.

## Binary to hexadecimal

Lets start with a binary number

1110010111010

As with binary numbers you start from right to left.

Starting from right you divide the binary numbers into nibbles.

1 | 1 1 0 0 | 1 0 1 1 | 1 0 1 0

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

*Remember the* *Rule of thumb!
*For every number you do not use you put a 0(off).

1 | 0 + 0 + 4 + 8 | 1 + 2 + 0 + 8 | 0 + 2 + 0 + 8

1 | 12 | 11 | 10

Looking at the hex chart you can now substitute the numbers for the hex

1 | C | B | A

## Hexadecimal to Binary

Lets star with a hex number

F47B

Using the hex chart convert the hex to decimal numbers.

F | 4 | 7 | B

15 4 7 11

Now convert each decimal number into binary

1111 | 0100 | 0111 | 1011

8 + 4 + 2 + 1 | 0 + 4 + 0 + 0 | 0 + 4 + 2 + 1 | 8 + 0 + 2 + 1

15 4 7 | 11

The answer is

11110100011111011