How to convert binary to decimal with this tool
- 1Type or paste the binary number into the Value field. Binary is already selected as the input base, and a 0b prefix is optional.
- 2Read the decimal value in the highlighted result box. Anything other than 0 and 1 is flagged straight away.
- 3Check the Working section: each bit is multiplied by its power of 2, and the non-zero place values are added to give the result.
- 4Copy the decimal with the copy icon, or use the hexadecimal and octal results below it.
How to convert binary to decimal by hand
Binary is base 2. Each digit, or bit, is either 0 or 1, and each position is worth twice the position to its right. From the right, the place values are 1, 2, 4, 8, 16, 32, 64 and 128 for the eight bits of a byte, and they keep doubling after that. A bit that is 1 contributes its place value to the total and a bit that is 0 contributes nothing.
So to go from base 2 to base 10, add the place values of the 1 bits. For 101101 the 1s sit in the 32, 8, 4 and 1 positions, so the value is 32 + 8 + 4 + 1 = 45. For 1100100 they sit at 64, 32 and 4, giving 100. There's a left-to-right shortcut too: start at 0, and for each bit double the running total and add the bit. For 101101 that goes 1, 2, 5, 11, 22, 45.
A few patterns help with checking. A run of n ones is 2^n - 1, so 11111111 is 255, the largest value of a byte, and sixteen ones is 65,535. A 1 followed by n zeros is 2^n, so 10000000 is 128. Leading zeros don't change anything: 00101101 is still 45. Network engineers use this daily, because an IPv4 address is four bytes: 11000000.10101000.00000001.00000001 is 192.168.1.1.
The converter reads binary as an unsigned whole number. Hardware and most programming languages store negative integers in two's complement, where the leftmost bit carries a negative weight. Read as a signed 8-bit value, 11111111 is -128 + 127 = -1 rather than 255, so you need to know the bit width and whether the value is signed. There's no length limit here: values are parsed with BigInt, so a 64-bit or 128-bit string converts exactly.
Where you'll meet binary numbers
Computer science coursework
Check homework answers and see the place-value working laid out the way it's taught.
Bit flags and masks
Work out the decimal value of a set of flags, permission bits or a register layout you've written in binary.
Networking
Convert the octets of IP addresses and subnet masks between binary and decimal.
Electronics
Read the value on a set of GPIO pins, DIP switches or an ADC output.
Frequently asked questions
What is 11111111 in decimal?
+
255. It's eight 1 bits: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255, the largest unsigned value one byte can hold.
What is the quickest way to convert binary to decimal in my head?
+
Go left to right: double the running total and add the next bit. For 1011 that's 1, then 2 + 0 = 2, then 4 + 1 = 5, then 10 + 1 = 11.
How do I convert binary to decimal in code?
+
In JavaScript use parseInt('101101', 2), or BigInt('0b101101') for more than 53 bits. In Python use int('101101', 2).
How do I handle negative (two's complement) binary?
+
This tool reads binary as unsigned. For a signed value of n bits, if the leftmost bit is 1, subtract 2^n from the result. 11111011 in 8 bits is 251 - 256 = -5.
Can I paste spaces between groups of bits?
+
Yes. Spaces and underscores are ignored, so 1011 0110 and 1011_0110 both convert to 182. A 0b prefix is optional.
Related tools
Decimal to Binary Converter
Convert decimal numbers to binary with the divide-by-2 steps shown. Exact for huge numbers, with hex and octal alongside.
Hex to Decimal Converter
Convert hexadecimal to decimal as you type, with the positional working shown digit by digit. Exact for values of any size.
Binary, Hex & Decimal Converter
Convert numbers between binary, octal, decimal, and hexadecimal. Real-time conversion with input validation and BigInt precision for large values.
Chmod Calculator
Work out Unix file permissions: tick read/write/execute for owner, group and others, or type an octal mode like 755 or a string like rwxr-xr-x. Get the chmod command in numeric and symbolic form, including setuid, setgid and sticky bits.