Hex is very easy to convert to binary.
Write down the hex number and represent each hex digit by its binary equivalent number from the table above
Use 4 digits and add insignificant leading zeros if the binary number has less than 4 digits. E.g. Write 102 (2 decimal) as 00102
Then concatenate or string all the digits together.
Discard any leading zeros at the left of the binary number
Binary is also easy to convert to hex.
Start from the least significant bit (LSB) at the right of the binary number and divide it up into groups of 4 digits. (4 digital bits is called a "nibble")
Convert each group of 4 binary digits to its equivalent hex value (see table above)
Concatenate the results together, giving the total hex number
Binary to hex conversion examples
(1110)2 = 0Eh
(111001)2 = 39h
(10011100)2 = 9Ch
Binary to Hexadecimal Conversion Chart
Binary |
Hexadecimal |
0000 |
0 |
0001 |
1 |
0010 |
2 |
0011 |
3 |
0100 |
4 |
0101 |
5 |
0110 |
6 |
0111 |
7 |
1000 |
8 |
1001 |
9 |
1010 |
A |
1011 |
B |
1100 |
C |
1101 |
D |
1110 |
E |
1111 |
F |