## 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.

## 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.

Division | Quotient | Remainder(decimal value) | Remainder (hexadecimal value) |
---|---|---|---|

$10 \div 16$ | 0 | 10 | A |

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**

Binary | Hexadecimal |
---|---|

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 |

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 (2^{0} = 1, 2^{1} = 2, 2^{2} = 4, 2^{3} = 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 2 | 8421 | 8421 | 8421 | 8421 | 8421 | 8421 | 8421 | 8421 |

Binary | 0000 | 0001 | 0010 | 0011 | 0100 | 0101 | 0110 | 0111 |

Hexadecimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Powers of 2 | 8421 | 8421 | 8421 | 8421 | 8421 | 8421 | 8421 | 8421 |

Binary | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 |

Hexadecimal | 8 | 9 | A | B | C | D | E | F |

**Example:** Convert the binary number 10101011_{2} into hexadecimal.

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

10101011_{2 }= 1010_{2} | 1011_{2}

From the table, we have

1010_{2} = A_{16}

1011_{2 }= B_{16}

Thus, 10101011_{2 }= (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,

0000_{2} = 0_{16}

1011_{2} = B_{16}

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 1111_{2} and the hexadecimal number 2 stands for 0010_{2}.

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.

Division | Quotient | Remainder (Decimal value) | Remainder(Hexadecimal value) |
---|---|---|---|

$78 \div 16$ | 4 | 14 | E |

$4 \div 16$ | 0 | 4 | 4 |

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

1101_{2} = D_{16}

1110_{2 }= E_{16}

So, (11011110)_{2} = (DE)_{16}

## Practice Problems on Binary to Hexadecimal Conversion

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

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

$1111_{2} =$ F

$0101_{2} = 5$

So, $(11110101)_{2} = (F5)_{16}$

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

$0111_{2} = 7_{16}$

$1011_{2} = B_{16}$

$(01111011)_{2} =(7B)_{16}$

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

$1010_{2} = A_{16}$

$1001_{2} = 9_{16}$

So, $(10101001)_{2} = (A9)_{16}$

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

$0110_{2} = 6_{16}$

$1100_{2} = C_{16}$

So, $(01101100)_{2} = (6C)_{16}$

## Frequently Asked Questions about Binary to Hexadecimal Conversion

**How do you convert hexadecimal to binary?**

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

**What is the difference between a hexadecimal system and an octal system?**

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**.**

**How to convert decimal to hexadecimal?**

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.