Number Converters · Browser · Free

Binary/Decimal/Hex/Octal Converter

* The signed numbers are 2's complement.

Hex / decimal / octal / binary conversion table

HexDecimalOctalBinary
0000
1111
22210
33311
444100
555101
666110
777111
88101000
99111001
A10121010
B11131011
C12141100
D13151101
E14161110
F15171111
10162010000
203240100000
40641001000000
8012820010000000
100256400100000000
20051210001000000000
4001024200010000000000

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).

Worked examples
InputResult
Number format: Number, From base: Decimal (10), Value: 10Binary: 1010; Decimal: 10; Hex: A; Octal: 12
Number format: Number, From base: Binary (2), Value: 1010Binary: 1010; Decimal: 10; Hex: A; Octal: 12
Number format: Number, From base: Hex (16), Value: FFBinary: 11111111; Decimal: 255; Hex: FF; Octal: 377
Number format: Number, From base: Octal (8), Value: 400Binary: 100000000; Decimal: 256; Hex: 100; Octal: 400
Number format: Number, From base: Decimal (10), Value: 0.1Binary: 0.0001100110011001101; Decimal: 0.1; Hex: 0.1999999999999999999A; Octal: 0.06314631463146314632
Number format: Signed 8-bit, From base: Decimal (10), Value: -1Binary: 11111111; Decimal: -1; Hex: FF; Octal: 377