# Binary to Hex

To convert Binary to Hexadecimal, input binary value in the box below, and then click on the big blue button that says “CONVERT TO HEX” and Hex is generated, copy it or you can download output file.

Copied to Clipboard.

## Binary Numbering System

In Binary number system there are only two digits that are 0 and 1. In this number system every number (value) represents with 0 and. The base of binary number system is 2, because it has only two digits.

Example: What is (110)2 in base 10?

1102 = (1 x 22) + (1 x 21) + (0 x 10) = 610

In a Hexadecimal number system there are sixteen (16) alphanumeric values from 0 to 9 and A to F. In this number system every number (value) represents with 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F. The base of this number system is 16, because it has 16 alphanumeric values. Here A is 10, B is 11, C is 12, D is 14, E is 15 and F is 16.

Example: What is 0xA5 in base 10?

0xA5 = A516 = (10 x 161) + (5 x 160) = 16510

## How to convert a Binary to Hexadecimal Number and Vice Versa:

We know that the maximum digit in a hexadecimal system is 15, which can be represented by 11112 in a binary system. Hence, starting from the LSB, we group four digits at a time and replace them with the hexadecimal equivalent of those groups and we get the final hexadecimal number.

Example 1: Convert 110101102 into an equivalent hexadecimal number.

Solution. The binary number given is 11010110 Starting with LSB and grouping 4 bits 1101 0110 Hexadecimal equivalent D 6

Hence the hexadecimal equivalent number is (D6)16.

Example 2: Convert 1100111102 into an equivalent hexadecimal number.

Solution. The binary number given is 110011110

Starting with LSB and grouping 4 bits 0001 1001 1110

Hence the hexadecimal equivalent number is (19E)16.

Since at the time of grouping of four digits starting from the LSB, in Examples we find that the third group cannot be completed, since only one 1 is left out, so we complete the group by adding three 0s to the MSB side. Now if the number has a fractional part, as in the case of octal numbers, then there will be two different classes of groups—one for the integer part starting from the left of the decimal point and proceeding toward the left and the second one starting from the right of the decimal point and proceeding toward the right. If, for the second class, any uncompleted group is left out, we complete the group by adding 0s on the right side.

Hence the converted binary number is (0001011)2

#### Binary to Hex Conversion Chart:

 Hex 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