- Binary to Hexadecimal Conversion Definition: Converting a binary number to a hexadecimal number involves dividing the binary digits into groups of four, converting each group to decimal, and then to hexadecimal.
- Padding Zeros: When converting, pad groups of binary digits with zeros on the left if they have fewer than four digits.
- Binary to Hexadecimal Conversion Example: For example, the binary number 100010100101₂ converts to hexadecimal as 8A5₁₆.
- Hexadecimal to Binary Conversion Definition: Converting a hexadecimal number to a binary number involves converting each hexadecimal digit to a four-digit binary equivalent.
- Hexadecimal to Binary Conversion Example: For example, the hexadecimal number 3DC₁₆ converts to binary as 001111011100₂.
Binary and hexadecimal provide two compact ways to write values in digital electronics. One hexadecimal digit corresponds to four binary digits because 16 equals 2 to the power of 4. This fixed mapping supports direct binary to hexadecimal and hexadecimal to binary conversions.
Binary to Hexadecimal Conversion
You can convert any binary numbers to decimal or convert binary numbers to octal. For hexadecimal, each four-bit group maps directly to one digit from 0 through F.
To convert a binary number to hexadecimal, split the integer digits of the binary number into groups of four, starting at the right. If the leftmost group contains fewer than four digits, add zeros on its left.
Map each group to its hexadecimal digit, then write the digits in the same order.
For example, start with 1000101001012.
Split it into four-bit groups:
1000 | 1010 | 0101
The group values are:
8 | A | 5
Therefore, binary 1000101001012 equals hexadecimal 8A516.
Hexadecimal to Binary Conversion
For hexadecimal-to-binary conversion, replace each hexadecimal digit with its four-bit binary code. Keep all four bits in every group during the conversion.
Join the four-bit groups in their original order. After joining them, leading zeros at the far left may be omitted without changing the value.
Convert hexadecimal 3DC16. The digit D maps to binary 1101, and C maps to 1100.
Replacing all three hexadecimal digits gives:
0011 | 1101 | 1100
Joining the groups gives 0011110111002. Omitting the two leading zeros gives the equivalent shorter form 1111011100 for hexadecimal 3DC16.





