# Binary to Hex Converter

Use this online converter to easily convert binary numbers to hexadecimal.

## Conversion of binary numbers to hex numbers

Both hex and binary numbers are heavily used in practical and theoretical disciplines which have to do with computer science. Since computer architecture at the low level is all about electricity and encoding information happens through the presence or absence of it, all computer code is basically zeroes and ones at the lowest level of abstraction. However, binary numbers, or base 2 numbers, are quite cumbersome to remember and operate with, early computer programmers needed to find a more convenient way to represent the same information. The hexadecimal (base 16) system turned out to be ideal for the purpose since it represented the same amount of information in a much more condensed way. For example, 111100001100 becomes simply f0c - much easier to remember.

For this reason, hex numbers are widely used and still present even in high-level abstractions such as character tables such Unicode ones where the index of a given character is usually written as a hex number. Still, nowadays it is rare to see information in binary form, but one can encounter it as a homework or exam task in a computer science course, especially if learning some of the low-level languages or the basics of computer architecture.

## How to convert binary to hex

Converting a binary system number to one represented in the hexadecimal system is very straightforward. Begin by separating the binary number in groups of 4 digits, starting from the right to the left. For each group of 4, find the corresponding hex number from the reference table below. Finally, simply concatenate the hex numbers to get the result in base 16.

*Example 1:* Convert the number 11110110011110010 in binary to a hex number.

Solution: The first group is 0010, the leading zeroes are insignificant so that is 10_{2} = 2_{16}. The second group 1111_{2} is f_{16}. The third group is 1100_{2} = c_{16}. The fourth group is 1110_{2} = e_{16}. Finally, the fifth group is 1_{2} = 1_{16}. Concatenating these in reverse order we get 1ecf2.

## Binary to hex conversion table

Binary | Hex |
---|---|

1 | 1 |

10 | 2 |

11 | 3 |

100 | 4 |

101 | 5 |

110 | 6 |

111 | 7 |

1000 | 8 |

1001 | 9 |

1010 | a |

1011 | b |

1100 | c |

1101 | d |

1110 | e |

1111 | f |

11111 | 1f |

111111 | 3f |

1111111 | 7f |

11111111 | ff |

10001000 | 88 |

10101010 | aa |

11110000 | f0 |

1111101000 | 3e8 |

Note how the decimal for 88 is 10001000 and 8 is 1000. So, it is simply joining together the numbers, same for 1111101000, 3 is 11, e is 1110 and 8 is 1000. However, one should be careful with numbers containing zero, e.g. f0.

#### Cite this converter & page

If you'd like to cite this online converter resource and information as provided on the page, you can use the following citation:

Georgiev G.Z., *"Binary to Hex Converter"*, [online] Available at: https://www.gigacalculator.com/converters/convert-binary-to-hex.php URL [Accessed Date: 23 Sep, 2020].