Number Converters · Browser · Free
Binary/Decimal/Hex/Octal Converter
Hex / decimal / octal / binary conversion table
| Hex | Decimal | Octal | Binary |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 2 | 2 | 10 |
| 3 | 3 | 3 | 11 |
| 4 | 4 | 4 | 100 |
| 5 | 5 | 5 | 101 |
| 6 | 6 | 6 | 110 |
| 7 | 7 | 7 | 111 |
| 8 | 8 | 10 | 1000 |
| 9 | 9 | 11 | 1001 |
| A | 10 | 12 | 1010 |
| B | 11 | 13 | 1011 |
| C | 12 | 14 | 1100 |
| D | 13 | 15 | 1101 |
| E | 14 | 16 | 1110 |
| F | 15 | 17 | 1111 |
| 10 | 16 | 20 | 10000 |
| 20 | 32 | 40 | 100000 |
| 40 | 64 | 100 | 1000000 |
| 80 | 128 | 200 | 10000000 |
| 100 | 256 | 400 | 100000000 |
| 200 | 512 | 1000 | 1000000000 |
| 400 | 1024 | 2000 | 10000000000 |
Select a number format, then enter a value into Binary, Decimal, Hex, or Octal to update all four representations live. For signed formats, click individual bits in the toggle table to flip them.
About this converter
Choose Number format: Number, Signed 8-bit, Signed 16-bit, Signed 32-bit, or Signed 64-bit. Typing in any of the four boxes (Binary, Decimal, Hex, Octal) updates the other three immediately.
The same amount looks different in every base: 10₁₀ = 1010₂ = A₁₆ = 12₈, and 255₁₀ = 11111111₂ = FF₁₆ = 377₈.
An invalid character or an out-of-range value tints the input light red. Clearing any box resets all fields and bits. Reset empties the four boxes.
Bits toggle table
When a signed format (8-bit, 16-bit, or 32-bit) is selected, a Bits toggle row appears with clickable bits. Bit 0 represents the least significant bit, while the highest bit represents the sign bit in two complement representation.
Clicking any bit flips it between 0 and 1, immediately recalculating the binary, decimal, hexadecimal, and octal representations.
Fractional values
A decimal fraction can need many digits in the other bases. Entering 0.1 with Number format set to Number returns Binary: 0.0001100110011001101, Decimal: 0.1, Hex: 0.1999999999999999999A and Octal: 0.06314631463146314632.
Those fractional results are rounded: 0.1₁₀ ≈ 0.0001100110011001101₂ ≈ 0.1999999999999999999A₁₆ ≈ 0.06314631463146314632₈.
Signed number formula
A signed format holds its value in a fixed number of bits using two complement representation. For example, in Signed 8-bit, -1 has the bit pattern 11111111₂ = FF₁₆ = 377₈.
The formula for negative numbers is value = 2^bits - abs(value).
| Input | Result |
|---|---|
| Number format: Number, From base: Decimal (10), Value: 10 | Binary: 1010; Decimal: 10; Hex: A; Octal: 12 |
| Number format: Number, From base: Binary (2), Value: 1010 | Binary: 1010; Decimal: 10; Hex: A; Octal: 12 |
| Number format: Number, From base: Hex (16), Value: FF | Binary: 11111111; Decimal: 255; Hex: FF; Octal: 377 |
| Number format: Number, From base: Octal (8), Value: 400 | Binary: 100000000; Decimal: 256; Hex: 100; Octal: 400 |
| Number format: Number, From base: Decimal (10), Value: 0.1 | Binary: 0.0001100110011001101; Decimal: 0.1; Hex: 0.1999999999999999999A; Octal: 0.06314631463146314632 |
| Number format: Signed 8-bit, From base: Decimal (10), Value: -1 | Binary: 11111111; Decimal: -1; Hex: FF; Octal: 377 |