Table of Contents
Last modified on April 25th, 2024
A binary-to-hexadecimal conversion is done to convert a binary number (base 2) to its equivalent hexadecimal number (base 16). It is done by the given methods.
In this method, we directly represent a group of binary digits (of 4 bits) to its hexadecimal value using the conversion table.
Let us convert (11010)2 into its corresponding hexadecimal number.
Step 1: Grouping 11010 into 4 bits starting from the right, we have (1) and (1010).
Step 2: Since the first group is not of four bits, we add zeros to the front. Now, the groups (0001) and (1010) are of four bits.
Step 3: We find their corresponding hexadecimal values using the conversion table.
Binary Number | Hexadecimal Number |
---|---|
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 |
By converting each group into its corresponding hexadecimal values, we get
(0001)2 = (1)16 and (1010)2 = (A)16
Step 4: Taking the values based on the order of the groups, we get
(11010)2 = (1A)16
For Fractional Hexadecimal Numbers
Similarly, we convert the fractional binary numbers into corresponding hexadecimal numbers by grouping them into four bits. Unlike the integral part, the fractional part should be grouped from left to right.
Now, converting (0.101)2 into its equivalent hexadecimal, we get
For the Integral Part:
(0)2 → (0000)2 → (0)16
For the Fractional Part:
(101)2 → (1010)2 → (A)16
Thus, (0.101)2 = (0.A)16
Convert (1111110010001)2 into its equivalent hexadecimal number.
(0001) → 1
(1111) → F
(1001) → 9
(0001) → 1
(1111110010001)2 → (1F91)16
There is another way the binary numbers are represented to their corresponding hexadecimal numbers without using the conversion table.
Let us convert (100101)2 into its hexadecimal number.
First, we convert 100101 into its corresponding decimal number and then to the hexadecimal.
Step 1: Binary to Decimal
While converting (100101)2 to its respective decimal number, we multiply each digit (right to left) by the corresponding powers of 2, as shown.
Binary Value | 1 | 0 | 0 | 1 | 0 | 1 |
Decimal Value | 1 × 25 = 32 | 0 × 24 = 0 | 0 × 23 = 0 | 1 × 22 = 4 | 0 × 21 = 0 | 1 × 20 = 1 |
Now, on adding the value, we get the decimal number
32 + 0 + 0 + 4 + 0 + 1 = 32 + 4 + 1 = 37
Step 2: Decimal to Hexadecimal
Now, converting (37)10 into its hexadecimal form, we divide the number repeatedly by 16 until the quotient is 0.
On dividing 37 by 16, the quotient is 2, and the remainder is 5
Further, by repeating the same steps, we get
2 ÷ 16, quotient = 0, and remainder = 2
When the quotient is 0, the hexadecimal number is obtained by writing the remainders in reverse order (from last to first).
Thus, (37)10 = (25)16
Translate (11000)2 in its equivalent hexadecimal form without using the conversion chart.
By converting (11000)2 into its corresponding decimal, we get
(1 × 24) + (1 × 23) + (0 × 22) + (0 × 21) + (0 × 20) = 16 + 8 + 0 + 0 + 0 = 24
Now, by converting (24)10 into its corresponding hexadecimal, we get
24 ÷ 16, quotient = 1, and remainder = 8
1 ÷ 16, quotient = 0, and remainder = 1Thus, (11000)2 = (18)16
Last modified on April 25th, 2024