Binary to Hexadecimal Converter
Convert binary (base-2) to hexadecimal (base-16). Because one hex digit equals exactly 4 binary bits (a "nibble"), this conversion is especially elegant.
Common Values
How It Works
Each hex digit maps to exactly 4 binary bits. Group the binary number from the right into groups of 4, padding with leading zeros if needed. Then convert each 4-bit group: 0000=0, 0001=1, ..., 1001=9, 1010=A, 1011=B, 1100=C, 1101=D, 1110=E, 1111=F. For example, 11111111 → 1111 1111 → FF.
Worked Examples
| Binary | Hexadecimal |
|---|---|
| 0000 | 0 |
| 0001 | 1 |
| 1010 | a |
| 1111 | f |
| 00010000 | 10 |
| 11111111 | ff |
| 100000000 | 100 |
| 1111111111111111 | ffff |
Related Conversions
Frequently Asked Questions
- How do I convert binary to hex?
Group the binary digits from the right into sets of 4. Pad the leftmost group with zeros if needed. Convert each 4-bit group to its hex digit (0000=0 through 1111=F).
- What is 11111111 in hexadecimal?
11111111 in binary equals FF in hexadecimal. Split into 1111 and 1111, each equals 15 (F).
- Why does 1 hex digit equal 4 binary bits?
Hex is base 16 and 16 = 2⁴, so one hex digit can represent exactly 4 binary digits. This is why hex is preferred over decimal for representing binary data.
- Is binary to hex conversion reversible?
Yes, perfectly. Every binary number has exactly one hex representation, and every hex number has exactly one binary representation.