Number base conversion

Hex to Binary Calculator

Convert a whole number from hexadecimal (base 16) to binary (base 2). Each hexadecimal digit corresponds to four bits.

Base 16 input

Enter a hexadecimal integer

Base 16 → 2
Base 2 output

Binary equivalent

The binary value will appear here

Use hexadecimal digits 0–9 and A–F. Letter case does not change the value.

What is Hex to Binary?

The Hex to Binary Calculator helps you turn a hexadecimal whole number into its binary representation. Hexadecimal is compact: one hex digit corresponds to exactly four binary bits. That makes the conversion useful when reading memory addresses, color values, bit masks and low-level data.

Use it as a transparent arithmetic check. The worked example below follows the same inputs and rounding as the live form, while the notes explain what the result can and cannot support.

How to Use This Calculator

  1. Enter a hexadecimal value using digits 0–9 and letters A–F. Letter case does not change the value.
  2. Leave out prefixes such as 0x, spaces, decimal points and minus signs. Up to 1,000 digits are accepted; the input represents a nonnegative whole number.
  3. Choose Convert to binary, then read the normalized hexadecimal input and binary result. Add leading zeroes yourself only when a fixed bit width is required.

Each hexadecimal digit maps directly to four bits, so conversion remains exact even for large inputs.

Formula Used

For hex digits d from right to left, value = Σ di16i. The same value is then written as powers of 2. A direct shortcut replaces each hex digit with four bits: F → 1111, A → 1010 and 0 → 0000.

Variables Explained

Input or resultMeaning
Hexadecimal inputA base-16 whole number made from 0–9 and A–F.
Binary outputThe same nonnegative integer written with base-2 digits 0 and 1.
Leading zeroesFormatting characters that do not change numeric value and are omitted from the result.
Input lengthUp to 1,000 hexadecimal digits, converted exactly by digit mapping.

Worked Example

Enter FF. Each F is 15, or 1111 in four-bit binary, so the two digits become 1111 1111. The displayed result is 11111111, which is decimal 255.

As a check, F×16 + F = 15×16 + 15 = 255. In binary, 128+64+32+16+8+4+2+1 also equals 255.

Why Use This Calculator?

The output describes a number, not automatically a byte, character or instruction. FF often represents one byte with every bit set, but meaning comes from the file format, protocol or program using it. Preserve a required width separately because numeric conversion drops leading zeroes.

Practical use: People usually open this page when they need to turn a hexadecimal whole number into its binary representation without building a spreadsheet for a single question. Hexadecimal is compact: one hex digit corresponds to exactly four binary bits. That makes the conversion useful when reading memory addresses, color values, bit masks and low-level data. For a real decision, calculate a central case and then change the most uncertain input to a reasonable lower and upper value. Seeing that range is often more informative than treating one rounded answer as permanent.

A useful result should be repeatable: keep the original inputs, unit choices and relevant date beside the binary digits. If a second source uses another convention, reconcile that difference before comparing the numbers.

When sharing the answer, include a short label such as “binary digits from the stated inputs.” That label keeps the number attached to its meaning. It also prevents a reader from mistaking a converted value, model output or planning estimate for a direct observation.

Scope: It does not decode text, signed integers, fractions or floating-point storage.

Common Mistakes

  • Typing G or another character outside A–F.
  • Including 0x even though the field expects digits only.
  • Assuming the output will retain a four-bit group for every leading zero.
  • Reading a bit pattern as signed without knowing its width and signed-number convention.

The converter accepts up to 1,000 hexadecimal digits and maps each digit directly to four bits. It does not use a floating-point base conversion, so the bit sequence is preserved exactly.

Frequently Asked Questions

How do I convert a hexadecimal digit to binary?

Replace each hex digit with its four-bit equivalent. For example, A becomes 1010 and F becomes 1111. Join the groups and remove only leading zeroes if you want the shortest integer representation.

What is FF in binary?

Each F maps to 1111, so hexadecimal FF is binary 11111111. Both represent decimal 255.

Does the result keep leading zeroes?

No. Leading zero bits are omitted because they do not change the integer value. Add them back separately when a fixed width is required.

Can I enter a 0x prefix or a negative number?

No. Enter a nonnegative whole number using only 0–9 and A–F. The form does not accept prefixes, signs, separators, or fractions.

Are long conversions exact?

Yes, up to 1,000 hexadecimal digits. Each character maps directly to four bits, without floating-point base conversion.

Sources & References