Binary to Decimal Converter

Convert between binary, decimal, hexadecimal, and octal

Frequently Asked Questions

Each binary digit represents a power of 2, starting from the rightmost digit (2⁰=1). Multiply each digit by its place value and add them up: binary 1010 = (1×8) + (0×4) + (1×2) + (0×1) = 10 in decimal.
Repeatedly divide the decimal number by 2, recording the remainder each time, until you reach 0 — then read the remainders from bottom to top. This calculator does that conversion automatically in either direction.
Hexadecimal (base 16) is commonly used in computer science for representing memory addresses, color codes (like #FF5733), and binary data more compactly, since each hex digit represents exactly 4 binary bits.
Octal (base 8) was historically common in computing (Unix file permissions like 755 are octal) since it's a simple grouping of binary digits (3 bits per octal digit), though it's less common than hex in modern use.
Computers represent negative integers using two's complement: invert all the bits of the positive value and add 1. Enable "Signed (two's complement)" and choose a bit width to interpret your binary or hex input as a signed value — for example, 11111011 in 8-bit two's complement equals −5 in decimal.

How number base conversion works

In a positional number system, each digit is multiplied by the base raised to the power of its position, counting from zero on the right. The converter reads your number in its base, turns it into a decimal value, and writes that value in binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16).

Examples

  • Binary 1010 = 1×8 + 0×4 + 1×2 + 0×1 = 10 in decimal, A in hex.
  • Hex FF = 15×16 + 15 = 255, which is 11111111 in binary.
  • Decimal 100 = 1100100 in binary, 144 in octal and 64 in hex.

Converting decimal to another base by hand

Divide the number by the target base repeatedly and write down the remainders; read them from last to first. For 13 in binary: 13 ÷ 2 = 6 r1, 6 ÷ 2 = 3 r0, 3 ÷ 2 = 1 r1, 1 ÷ 2 = 0 r1, so 13 = 1101.

Quick reference

DecimalBinaryOctalHex
81000108
10101012A
15111117F
16100002010
25511111111377FF

Each hex digit corresponds to exactly four binary digits and each octal digit to three, which is why programmers use hex as a compact way to write binary.

Signed numbers and two's complement

With the signed option, the converter treats the highest bit of an 8, 16 or 32-bit value as the sign using two's complement, the format almost all computers use. In 8 bits, 11111011 is −5: invert the bits (00000100), add 1 (00000101) and apply a minus sign. The 8-bit signed range is −128 to 127; unsigned it is 0 to 255.

Where you see each base

  • Hex: colors (#FF8800), memory addresses, MAC addresses.
  • Octal: Unix file permissions such as 755.
  • Binary: bit flags, subnet masks and low-level hardware.

For other conversions, see the unit converter, and for counting arrangements of bits or digits, the combination and permutation calculator.