How to Convert Binary to Hexadecimal – Conversion, Steps, Examples

Home » Math Vocabulary » How to Convert Binary to Hexadecimal – Conversion, Steps, Examples

What Is the Binary to Hexadecimal Conversion?

The binary to hexadecimal conversion is used to convert binary numbers to the equivalent hexadecimal numbers. 

What Is a Binary Decimal System?

The binary number system is the base-2 number system. It uses only two digits, 0 and 1, to represent all the numbers. Thus, the place values of binary numbers are defined in terms of powers of 2. It is the most commonly used number system in computer systems due to its compactness. 

What Is a Hexadecimal Number System?

The base of the hexadecimal number system is 16. It uses 16 symbols to represent all the numbers. These symbols include 0-9 digits and A-F letters. The place values of the hexadecimal number system are defined in terms of powers of 16.

Decimal to hexadecimal table

How To Convert Binary to Hexadecimal

Hexadecimal number system makes it simple to convert large binary numbers into compact hex representation. There is no direct binary to hexadecimal formula but we can use two methods for this conversion. 

Indirect Method: Binary to Decimal followed by Decimal to Hexadecimal

In this method, we first convert the binary number into its equivalent decimal number. Next, we carry out the decimal to hexadecimal conversion.

Example: Convert (1010)2 from the binary to hexadecimal system. 

Step 1: Binary to Decimal

Find the equivalent decimal number of (1010)2. To find the decimal equivalent, we multiply each digit with the powers of 2 starting from the ones place.

$(1010)_{2} = 1 \times 2^{3} + 0 \times 2^{2} + 1 \times 2^{1} + 0 \times 2^{0}$

(1010)2 = 8 + 0 + 2 + 0

(1010)2 = 10

So, (1010)2 = (10)10

Step 2: Decimal to Hexadecimal 

Convert decimal to binary by dividing the decimal number repeatedly by 16 until we get 0 quotient. Once the quotient is zero, we arrange the remainder from bottom to top (in the reverse order) to obtain the binary number.

DivisionQuotientRemainder(decimal value)Remainder (hexadecimal value)
$10 \div 16$010A

So, (10)10 = (A)16

Hence, (1010)2 = (10)10 = (A)2


Direct Method: Binary to Hexadecimal Using Grouping

We can represent a group of any 4 binary digits using a unique hexadecimal value. Simply divide the given binary number into the groups of 4. Add zeros to the left when there are not enough digits to form a group. Convert each group into the equivalent hexadecimal number using the following binary to hexadecimal table.

Binary to Hexadecimal Conversion Chart

BinaryHexadecimal
00000
00011
00102
00113
01004
01015
01106
01117
10008
10019
1010A
1011B
1100C
1101D
1110E
1111F

This is a simple shortcut method. Before we take an example, let’s first understand how this table is created. 

Write the powers of 2 (20 = 1, 21 = 2, 22 = 4, 23 = 8) for each digit in the group of 4 binary digits. So, we assign the numbers 1, 2, 4, and 8 starting from the leftmost digit. Add the product of the corresponding digits to find the hexadecimal number.

Powers of 284218421842184218421842184218421
Binary00000001001000110100010101100111
Hexadecimal01234567
Powers of 284218421842184218421842184218421
Binary10001001101010111100110111101111
Hexadecimal89ABCDEF

Example: Convert the binary number 101010112 into hexadecimal.

Let’s create groups of 4 digits starting from the ones place.

101010112 = 10102 | 10112

From the table, we have

10102 = A16

10112 = B16

Thus, 101010112 = (AB)16

Facts about Binary to Hexadecimal Conversion

  • Each group of four binary digits corresponds to a single hexadecimal digit.
  • Binary to hexadecimal conversion is done by dividing binary digits into groups of four, and then assigning each group a corresponding hexadecimal number.
  • Binary to hexadecimal conversion allows us to represent each binary number in a compact and concise manner.

Conclusion

In this article, we learned about binary to hexadecimal conversion which is basically base-2 to base-16 conversion. We learned two methods of binary to hexadecimal conversion with steps. Let’s solve a few examples and MCQ practice problems.

Solved Examples on Binary to hexadecimal

1. Convert (00001011)2 into a hexadecimal number system by direct method.

Solution: 

Let’s form the groups of four digits.

(00001011)2 = (0000) | (1011)

Here, 

00002 = 016 

10112 = B16

So, (00001011)2=(0B)16 

2. What is the value of (11110010)2 into a hexadecimal number system?

Solution: 

Form the groups of 4.

(11110010)= (1111) | (0010)

The hexadecimal number F stands for 11112 and the hexadecimal number 2 stands for 00102.

So, (11110010)2 = (F2)16

3. Convert (1001110)2 into a hexadecimal number system by indirect method.

Solution: 

(1001110)2

$= 1 \times 2^{6} + 0 \times 2^{5} + 0 \times 2^{4} + 1 \times 2^{3} + 1 \times 2^{2} + 1 \times 2^{1} + 0 \times 2^{0}$

= 64 + 0 + 0 + 8 + 4 + 2 + 0

= (78)10

Now, we convert (78)10 into the hexadecimal number.

DivisionQuotientRemainder (Decimal value)Remainder(Hexadecimal value)
$78 \div 16$414E
$4 \div 16$044

Write the remainders in the reverse order.

(78)10 = (4E)16

4. What will you get if you convert (11011110)2 into a hexadecimal number system?

Solution: 

Form the groups of four digits.

(11011110)2 = 1101 | 1110

11012 = D16

11102 = E16

So, (11011110)2 = (DE)16

Practice Problems on Binary to Hexadecimal Conversion

How to Convert Binary to Hexadecimal - Conversion, Steps, Examples

Attend this quiz & Test your knowledge.

1

Find the value of $(11110101)_{2}$ in the hexadecimal number system.

$(5F)_{16}$
$(D5)_{16}$
$(F5)_{16}$
$(5E)_{16}$
CorrectIncorrect
Correct answer is: $(F5)_{16}$
$1111_{2} =$ F
$0101_{2} = 5$
So, $(11110101)_{2} = (F5)_{16}$
2

What is the value of $(01111011)_{2}$ into a hexadecimal number system?

$(B7)_{16}$
$(8B)_{16}$
$(C7)_{16}$
$(7B)_{16}$
CorrectIncorrect
Correct answer is: $(7B)_{16}$
$0111_{2} = 7_{16}$
$1011_{2} = B_{16}$
$(01111011)_{2} =(7B)_{16}$
3

Convert $(10101001)_{2}$ into a hexadecimal number system.

$(A8)_{16}$
$(9A)_{16}$
$(AB)_{16}$
$(A9)_{16}$
CorrectIncorrect
Correct answer is: $(A9)_{16}$
$1010_{2} = A_{16}$
$1001_{2} = 9_{16}$
So, $(10101001)_{2} = (A9)_{16}$
4

On converting $(01101100)_{2}$ into a hexadecimal number system, we get

$(6C)_{16}$
$(E6)_{16}$
$(6F)_{16}$
$(6D)_{16}$
CorrectIncorrect
Correct answer is: $(6C)_{16}$
$0110_{2} = 6_{16}$
$1100_{2} = C_{16}$
So, $(01101100)_{2} = (6C)_{16}$

Frequently Asked Questions about Binary to Hexadecimal Conversion

The easiest way to convert hexadecimal to binary is the indirect method. First convert from hexadecimal to binary, followed by decimal to binary conversion.

We use the base of a hexadecimal system as 16. Each digit is 16 times more significant than the previous digit. We use the base of a binary system as 8. Each digit is 8 times more significant than the previous digit. of a binary system as 2. Each digit is 2 times more significant than the previous digit.

Divide the number repeatedly by 16 until the quotient is 0. Note down the remainder in each step. Once the quotient is 0, write the remainders in the reverse order to get the equivalent hexadecimal number.