Hex to binary, step by step
Each hex digit is its own 4-bit "nibble" -- no multiplication or division, just a lookup:
1→0001A→1010
Joined together: 00011010 = 11010 (dropping the leading zero nibble's extra zeros)
0-F nibble table: hex to 4-bit binary
Every single hex digit and its exact 4-bit binary pattern:
| Hex | Decimal | Binary (4-bit) |
|---|---|---|
0 | 0 | 0000 |
1 | 1 | 0001 |
2 | 2 | 0010 |
3 | 3 | 0011 |
4 | 4 | 0100 |
5 | 5 | 0101 |
6 | 6 | 0110 |
7 | 7 | 0111 |
8 | 8 | 1000 |
9 | 9 | 1001 |
A | 10 | 1010 |
B | 11 | 1011 |
C | 12 | 1100 |
D | 13 | 1101 |
E | 14 | 1110 |
F | 15 | 1111 |
More number-base converters
- Binary to hex converter
- Hex to decimal converter
- Decimal to hex converter
- Binary to decimal converter
- Decimal to binary converter
- Binary translator (text ↔ binary bytes, not plain numbers)
Frequently asked questions
How do I convert hex to binary by hand?
Look up each hex digit's 4-bit binary "nibble" and write the nibbles side by side, no arithmetic needed. For 1A: 1 -> 0001, A -> 1010, giving 00011010 (leading zeros are usually dropped, so 11010). The tool above shows this per-digit breakdown for whatever you type.
What is FF in binary?
FF = F -> 1111, F -> 1111, so FF = 11111111. That's 8 ones, the largest value a single byte can hold.
Why does 1 hex digit always equal exactly 4 bits?
Hex is base 16 and binary is base 2, and 16 = 2^4 -- so every possible 4-bit pattern (0000 to 1111) corresponds to exactly one hex digit (0-F), with no remainder or overlap. That clean relationship is why hex is used as a compact, human-friendly stand-in for binary in programming.
Do I need to pad the binary result with leading zeros?
Not for the numeric value -- 1A is the same number as 00011010, just as 26 doesn't need to be written 00026. This tool drops leading zero nibbles by default, matching how a hex value is normally written. If you need a fixed-width bit pattern (e.g. exactly 8, 16, 32 or 64 bits for a byte/word), pad the result yourself or use the two's complement width option, which always shows the full fixed-width pattern.
Does this handle negative or very large hex numbers?
Yes to both. A leading minus sign (e.g. -FF) is read as a negative value and produces a signed binary result (-11111111). Numbers of any size are handled exactly using JavaScript BigInt internally, so there's no floating-point rounding.
How is this different from converting hex or binary through decimal?
It isn't mathematically different -- hex 1A and binary 11010 both equal decimal 26. But going hex-to-binary directly (via nibble lookup) is faster and less error-prone than converting hex to decimal and then decimal to binary, since it's a pure lookup with no multiplication or division.
How do I convert hex to binary in code?
JavaScript: parseInt("1A", 16).toString(2). Python: bin(int("1A", 16)) (strip the "0b" prefix), or f"{0x1A:08b}" for a fixed 8-bit width with leading zeros.
What are hex digits A-F worth in binary?
A=1010, B=1011, C=1100, D=1101, E=1110, F=1111 -- see the full 0-F nibble table above for every hex digit.