Home › Math › Binary to Decimal Converter

Binary to Decimal Converter

Convert a binary number to decimal, with the hexadecimal and octal values and the place-value working.

Use only 0 and 1. Spaces and a 0b prefix are ignored, so 1011 0110 and 0b10110110 both work. Up to 128 digits.

Decimal value

-

Decimal with commas-
Hexadecimal-
Octal-
Number of bits-
Signed value (two's complement)-

What is binary to decimal conversion?

Binary is the number system that computers use. It has only two digits, 0 and 1, and each digit is called a bit. Decimal is the everyday system with ten digits, 0 to 9. A binary to decimal converter turns a string of 0s and 1s into the ordinary number it stands for. Type a binary number and this calculator gives the decimal value, together with the hexadecimal and octal forms.

How to convert binary to decimal

Each place in a binary number is worth a power of 2, starting from 1 on the right and doubling as you move left. Write down the value of every place that has a 1, then add them up.

Place values (right to left): 1, 2, 4, 8, 16, 32, 64, 128, ...
Decimal = sum of the place values where the digit is 1

Example

Convert 101101 to decimal. From the left, the places are worth 32, 16, 8, 4, 2 and 1. The digits 1, 0, 1, 1, 0, 1 switch on 32, 8, 4 and 1. So 32 + 8 + 4 + 1 = 45. The same number is 2D in hexadecimal and 55 in octal.

Handy values

  • 1111 in binary is 15, and 11111111 (8 bits) is 255.
  • 10000000 (a 1 followed by seven 0s) is 128, which is 2 to the power 7.
  • 1111111111111111 (16 bits) is 65,535.
  • An n-bit binary number can hold values from 0 up to 2ⁿ − 1.

Signed numbers (two's complement)

Computers often use the first bit to show a negative number. In two's complement, a number whose first bit is 1 is negative. For 8 bits, 11111111 means −1 and 10000000 means −128, while 01111111 is 127. This page shows the signed value too when you enter exactly 8, 16, 32 or 64 bits, because those are the common sizes. With any other length, only the unsigned value is shown.

Good to know

  • Leading zeros do not change the value. 0001 and 1 are both 1.
  • Binary uses only 0 and 1. A digit like 2 is not valid.
  • Each hexadecimal digit stands for exactly four bits, which is why programmers often write binary in hex.
  • To see the power of 2 behind a number, try the Log Calculator with base 2.

Related tools: Log Calculator, Factorial Calculator and Roman Numeral Converter.

Need another calculator?

Browse all calculators
Scroll to Top