### #ezw_tco-2 .ez-toc-title{ font-size: 120%; ; ; } #ezw_tco-2 .ez-toc-widget-container ul.ez-toc-list li.active{ background-color: #ededed; } chapter outline

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.

## Direct Method: Using Table

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.

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

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.

Solution:

(0001) â†’ 1
(1111) â†’ F
(1001) â†’ 9
(0001) â†’ 1
(1111110010001)2 â†’ (1F91)16

## Indirect Method: Without Using Table

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.

Now, on adding the value, we get the decimal number

32 + 0 + 0 + 4 + 0 + 1 = 32 + 4 + 1 = 37

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.

Solution:

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