To convert Binary to hexadecimal:
- Starting from the right, divide the number in the binary into groups of 4.
- Write down the hexadecimal value from the following table:
Decimal | Binary | Hexadecimal |
0 | 0000 | 0 |
1 | 0001 | 1 |
2 | 0010 | 2 |
3 | 0011 | 3 |
4 | 0100 | 4 |
5 | 0101 | 5 |
6 | 0110 | 6 |
7 | 0111 | 7 |
8 | 1000 | 8 |
9 | 1001 | 9 |
10 | 1010 | A |
11 | 1011 | B |
12 | 1100 | C |
13 | 1101 | D |
14 | 1110 | E |
15 | 1111 | F |
For Example:
Convert 11111011101110110
Solution:
1.Starting from the right divide into 4 groups as
2.You would notice that the last group has only 1 binary digit i.e 1. To make it a group of 4 we can add three 0’s in front of it to make it 0001.
- Using the table above we can write it as
0110 as 6, 0111 as 7, 1111 as F and 0001 as 1 to get 1F776.
To convert Hexadecimal to Binary:
- Write down the number in the Hexadecimal System.
- Write down the Binary value of each from the following table:
Decimal | Binary | Hexadecimal |
0 | 0000 | 0 |
1 | 0001 | 1 |
2 | 0010 | 2 |
3 | 0011 | 3 |
4 | 0100 | 4 |
5 | 0101 | 5 |
6 | 0110 | 6 |
7 | 0111 | 7 |
8 | 1000 | 8 |
9 | 1001 | 9 |
10 | 1010 | A |
11 | 1011 | B |
12 | 1100 | C |
13 | 1101 | D |
14 | 1110 | E |
15 | 1111 | F |
For Example,
Convert the Hexadecimal number FACB23.
Solution:
- Starting from the left , we have F A C B 2 3
- Using the table above, write F as 1111, A as 1010, C as 1100, B as 1011, 2 as 0010 and 3 as 0011
- We get the Binary number as 111110101100101100100011.
Exercise 1.
Convert the following binary numbers into hexadecimal:
- 111001111100
- 111001111100
- 100110101100
- 110010101001
- 101011000011
Exercise 2. Convert the following from hexadecimal number system to binary number system:
- A193
- BCF8
- ABC4
- BEF4
- CDAB
Answers to the Exercise:
- CE7
- E7C
- 9AC
- CA9
- AC3
Answers to Exercise2:
- 1010000110010011
- 1011110011111000
- 1010101111000100
- 1011111011110100
- 1100110110101011