 # The Easiest Way to Convert Binary to Hexadecimal

Binary uses 0 and 1 counting system. Digital circuits have only two states (0 and 1), which is the favorite of modern computer engineers, network, and communications experts. Further, the other professionals' favorite method is binary.

Hexadecimal is a counting system with 16 numbers, and it has 16 characters:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and A, B, C, D, E, F

Among them, A, B, C, D, E, and F are the unit representations of decimal values ​​10, 11, 12, 13, 14, and 15, respectively.

The hexadecimal number system provides an easy way to convert binary numbers into groups. Individuals can use direct or indirect methods to convert binary numbers to hexadecimal numbers. First, individuals will need to convert binary to other basic systems (decimal or octal). Then convert it to a hexadecimal number.

The number is a type of number system. That means the weights from right to left are 160, 161, 162, 163, and so on. The consequences for the integer part and the left-to-right position are 16-1, 16-2, 16-3, and so on.

Take the conversion of 1101010 from binary to hexadecimal as an example.

First, convert this binary to decimal:

Then convert the obtained decimal result to hexadecimal:

However, there is a direct way to convert binary numbers to hexadecimal numbers: grouping.

Grouping

Because there are only 16 numbers in hexadecimal (from 0 to 7 and A to F), use the four digits to represent hexadecimal.

Use a 4-bit binary to replace the equivalent hexadecimal number. That is the hexadecimal of the given number. Yet it should be noted that for the integer part, add any number of 0s to the leftmost bit, and for the decimal part,  add any number of 0s to the rightmost bit to complete 4 bits will not change the input binary the value of the number.

Steps to convert a binary number to a hexadecimal number: take a binary number; divide the binary number into four groups (starting from the right) as the integer part, and start from the left as the decimal part; group the four numbers as a group, and divide each The group is converted to the corresponding hexadecimal number. This is a simple algorithm, but it requires binary group numbers and replacing the groups with their equivalent hexadecimal numbers.

Example 1: Convert the binary number 1010101101001 to a hexadecimal number. Because there is no binary point and no decimal part, as shown below.

Therefore, the binary is converted to hexadecimal:

Example 2: Convert the binary number 001100101.110111 to a hexadecimal number. Since there is a binary point, there is a decimal part, as shown below.

Therefore, the binary is converted to hexadecimal:

However, there is a direct way to convert binary numbers to hexadecimal numbers: grouping.

Thus, this concludes the binary numbers to hexadecimal numbers. 