Binary to Hexadecimal Converter
Convert a base-2 integer into hexadecimal, decimal, grouped nibbles, and a traceable digit-by-digit table.
Input
Results
Four-bit conversion table
| Group | Bit positions | Binary nibble | Decimal | Hex digit |
|---|
How to use the binary to hexadecimal converter
What this calculator does. This tool converts one non-negative whole number written in base 2 into its exact base-16 representation. It also shows the decimal value, the number of original bits, any zero padding used to form four-bit groups, and a row-by-row conversion table. It is a numeral-system conversion utility, not a text decoder, floating-point interpreter, signed two's-complement analyzer, or file-format parser.
When to use it. Use it when checking bit masks, reading machine-level values, translating a binary exercise into compact hexadecimal notation, or verifying byte and nibble boundaries while programming. Hexadecimal is convenient because one hex digit corresponds exactly to four binary bits, a relationship also illustrated by the IBM binary and hexadecimal conversion table.
How to calculate. The calculator opens with the demonstration value 100101100011101, so the results and a validated XLSX export are available immediately.
- Replace the value in Binary number with a sequence containing only zeroes and ones. Spaces or underscores are accepted as separators, so both 11110000 and 1111_0000 are valid.
- Read Hexadecimal for the compact base-16 result. The conversion updates as you type.
- Use Grouped binary and the Four-bit conversion table to audit each nibble and its matching hexadecimal digit.
- Select Download Excel to save the current input, outputs, and conversion rows in a real OOXML workbook. Select Reset to clear the demonstration and all calculated content; Excel export remains unavailable until a complete valid binary number is entered again.
Input guide. Binary number is required and accepts between 1 and 4,096 binary digits after separators are removed. It accepts only the digits 0 and 1, plus ordinary spaces and underscores. A realistic value is 1011010. Adding a bit on the left generally increases the value; adding a zero on the right doubles it, while adding a one on the right doubles it and adds one. Do not paste prefixes such as 0b, decimal digits such as 2, signs, fractions, or scientific notation. Leading zeroes are allowed and preserved in the bit count, although they do not alter the numeric value.
Output guide. Hexadecimal is the exact base-16 identity, using digits 0 – 9 and uppercase A – F. Decimal value is the same integer in base 10 and may be very long. Grouped binary pads the left edge to a multiple of four and inserts spaces between nibbles. The summary pills report bit count, hex digit count, and leading pad bits. In the table, Group counts nibbles from left to right; Bit positions gives the covered powers of two; Binary nibble is the four-bit group; Decimal is its value from 0 to 15; and Hex digit is the matching symbol. A result of zero is valid. Larger outputs simply indicate a larger unsigned integer; no recommendation or approximation is involved.
Worked example. The startup binary value has 15 digits, so one leading zero is added for grouping: 0100 1011 0001 1101. Reading each nibble gives 4, 11, 1, and 13 in decimal, which map to 4, B, 1, and D. Therefore the exact hexadecimal output is 4B1D, and the decimal identity is 19,229.
Why four-bit grouping works
Binary is base 2 and hexadecimal is base 16. Because 16 equals 2 raised to the fourth power, every possible four-bit pattern maps to exactly one hexadecimal digit. The pattern 0000 maps to 0, while 1111 maps to F. This direct mapping avoids repeated division and makes hexadecimal especially useful for compactly displaying bytes, addresses, flags, and encoded values. NIST's hexadecimal notation glossary entry provides an example connecting a hex value to an eight-bit binary representation.
Common mistakes and interpretation notes
Always group from the rightmost bit. Grouping from the left can change every later digit. Padding zeroes belong only on the left; adding a zero to the right multiplies the value by two. Hexadecimal letters are symbols for values ten through fifteen, not variables. For very long inputs, the converter uses integer arithmetic rather than floating-point arithmetic, so it does not lose low-order bits. The University of California, Riverside conversion notes demonstrate the same four-bit grouping method, while the NIST Digital Library of Mathematical Functions describes computer arithmetic in binary and hexadecimal systems.