How to convert
Method 1
-
Divide the leftmost digit of hex number by 2 until the quotient is 0. Write down the remainders of each division in reverse order, thus getting binary number.
Letters in hexadecimal represent the following numbers:
A B C D E F 10 11 12 13 14 15 - If the binary number obtained on the previous step has less than 4 digits, add leading zeros to get 4 digits.
- Repeat same actions for all next digits of source number. After that, you will have a set of 4-bit groups.
- Write them one after another and drop leading zeroes.
Let's convert hex number 8E16.
-
Divide the leftmost digit by 2, get remainders:
8 / 2 = 4, remainder 04 / 2 = 2, remainder 02 / 2 = 1, remainder 01 / 2 = 0, remainder 1
- Write down the remainders in reverse order: 1000
-
Repeat for other digits:
E / 2 = 14 / 2 = 7, remainder 07 / 2 = 3, remainder 13 / 2 = 1, remainder 11 / 2 = 0, remainder 1Got 1110
- Write results together (1000)(1110), binary number is 100011102
Method 2
Replace each digit of hexadecimal number with corresponding 4-bit group using the conversion table:
Hexadecimal | Binary |
---|---|
0 | 0000 |
1 | 0001 |
2 | 0010 |
3 | 0011 |
4 | 0100 |
5 | 0101 |
6 | 0110 |
7 | 0111 |
8 | 1000 |
9 | 1001 |
A | 1010 |
B | 1011 |
C | 1100 |
D | 1101 |
E | 1110 |
F | 1111 |
D816 = (1101) (1000) = 110110002