OtherCalculators

Binary to Decimal Converter

Enter a binary number to see it in decimal, with every bit multiplied by its power of 2 and the results added up, step by step.

Hexadecimal and octal are worked out at the same time, and numbers of any length convert exactly.

Last updated: ยท Reviewed by Shakeel Alvi, OtherCalculators

Calculator mode

Type in any field

The other fields update as you type. Spaces, underscores and the prefixes 0b, 0o and 0x are fine, and a leading minus sign makes the number negative.

Group binary digits
Hex letters

101101โ‚‚ in decimal

45

Hexadecimal
2D
Octal
55

Bits
6
Bytes
1
Fits in
8-bit unsigned

Step-by-step working

Which working to show

Multiply each bit by its place value โ€” a power of 2 that doubles with every step to the left โ€” then add the results.

Each bit of 101101 multiplied by its place value
BitPlace valueBit ร— place value
125 = 3232
024 = 160
123 = 88
122 = 44
021 = 20
120 = 11
  1. Write out the place values1011012 = 1ร—25 + 0ร—24 + 1ร—23 + 1ร—22 + 0ร—21 + 1ร—20
  2. Add the non-zero terms32 + 8 + 4 + 1 = 45

Exact at any size

Whole numbers are worked digit by digit, so 64-bit values and beyond never round off after 15 or 16 digits. Floating-point mode prints the exact value the bits store.

Runs in your browser

What you enter is worked out on this page and is not sent anywhere. Copy the address to share a conversion.

Binary to DecimalPlace ValuesPowers of 2Step-by-Step64-bit Exact

Quick answer

To convert binary to decimal, multiply each bit by its place value and add the results. Place values are powers of 2 that double from the right: 1, 2, 4, 8, 16, 32. For 101101, the 1 bits are worth 32, 8, 4 and 1, so 101101 in binary is 45 in decimal.
Guide

How the binary to decimal converter works

Type a binary number into the Binary field and the decimal value appears in the result card as you type. The step-by-step panel then lays out the conversion the way it is taught: a table of every bit with its place value, the expansion written as a sum of powers of 2, and the final addition with the zero bits left out.

Any character that is not a 0 or 1 is highlighted, so a mistyped 2 is caught rather than dropped. The same tool converts the other way, from decimal to binary; the decimal to binary converter explains that method, and the binary converter covers hexadecimal, octal and custom bases.

How the maths works

The binary to decimal formula

Decimal = bโ‚™ ร— 2โฟ + โ€ฆ + bโ‚‚ ร— 2ยฒ + bโ‚ ร— 2ยน + bโ‚€ ร— 2โฐ
Doubling: total = total ร— 2 + next bit, from left to right

Example: 1011 = 1 ร— 2ยณ + 0 ร— 2ยฒ + 1 ร— 2ยน + 1 ร— 2โฐ = 8 + 0 + 2 + 1 = 11. By doubling: 0 โ†’ 1 โ†’ 2 โ†’ 5 โ†’ 11.

Worked example

Worked examples

Example 1 โ€” place values

Binary:
10011100
  1. Place values of the 1 bits: 128, 16, 8, 4
  2. Add them: 128 + 16 + 8 + 4

Decimal: 156

Example 2 โ€” the doubling method

Binary:
110101
  1. Bits 1, 1: 0ร—2+1 = 1, 1ร—2+1 = 3
  2. Bits 0, 1: 3ร—2+0 = 6, 6ร—2+1 = 13
  3. Bits 0, 1: 13ร—2+0 = 26, 26ร—2+1 = 53

Decimal: 53

Check with place values: 32 + 16 + 4 + 1 = 53.

Reference data

Powers of 2: binary place values from 2โฐ to 2ยนโถ

Each binary place value from 2 to the power 0 up to 2 to the power 16, in decimal and binary
PowerDecimalBinary
2011
21210
224100
2381000
241610000
2532100000
26641000000
2712810000000
28256100000000
295121000000000
2101,02410000000000
2112,048100000000000
2124,0961000000000000
2138,19210000000000000
21416,384100000000000000
21532,7681000000000000000
21665,53610000000000000000
Source: OtherCalculators โ€” computed with the converter's own integer engine โ€” each place value is double the one before it
Reference data

Binary prefixes: where powers of 2 show up in storage

Memory sizes are counted in powers of 2, so the IEC defined binary prefixes for them in 1998 โ€” a kibibyte (KiB) is 2ยนโฐ = 1,024 bytes, while a kilobyte (kB) is 1,000 bytes.

The IEC binary prefixes, their power of 2, and the exact decimal value
PrefixFactorExact value
kibi (Ki)2101,024
mebi (Mi)2201,048,576
gibi (Gi)2301,073,741,824
tebi (Ti)2401,099,511,627,776
pebi (Pi)2501,125,899,906,842,624
exbi (Ei)2601,152,921,504,606,846,976
Source: NIST โ€” Definitions of the SI units: The binary prefixes โ€” decimal values computed from each factor

Key facts

  • A binary number's decimal value is the sum of the place values of its 1 bits, where the place values are 1, 2, 4, 8 and so on from the right.
  • Eight bits can hold 0 to 255, because 11111111 is 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255 = 2โธ โˆ’ 1.
  • The doubling method converts binary left to right with no table: double the running total and add each bit, so 1101 gives 1, 3, 6, 13.
Tips

Common binary to decimal mistakes

  • Numbering from the left. Place values start at 1 on the right-hand bit, whatever the length of the number.
  • Starting at 2. The rightmost bit is worth 2โฐ = 1. Starting at 2 doubles the whole answer.
  • Adding the 0 bits. Only places holding a 1 count; a 0 contributes nothing.
  • Ignoring the format. A computer's 8-bit 11111011 may be โˆ’5 in two's complement, not 251.

Binary to decimal conversion appears in England's GCSE computer science content (source: DfE subject content), so it is worth practising with the place values written out.

FAQ

Frequently Asked Questions

What is 1010 in decimal?

1010 in binary is 10 in decimal. Its 1 bits sit in the 8 and 2 places, and 8 + 2 = 10.

What is 11111111 in decimal?

11111111 is 255. Eight 1 bits add up to 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255, which is 2โธ โˆ’ 1 โ€” the largest number one byte can hold without a sign.

What is the fastest way to convert binary to decimal in your head?

Use doubling. Start at 0 and read the bits from left to right: for each bit, double your running total and add the bit. For 1101: 0 โ†’ 1 โ†’ 3 โ†’ 6 โ†’ 13. It never needs a table of powers of 2, which makes it quick for long numbers.

Why does binary use powers of 2?

Binary is base 2, and in any base each place is worth the base times the place to its right. In decimal the places are 1, 10, 100 and so on; in binary they are 1, 2, 4, 8 and so on. Each bit only says whether that power of 2 is included.

Do leading zeros change a binary number?

No. 00101101 and 101101 are both 45. Leading zeros only pad a number to a fixed width, such as 8 bits for a byte. They matter for storage and display, not for the value.

How do I convert a negative binary number to decimal?

If it is written with a minus sign, convert the digits and keep the sign: โˆ’101 is โˆ’5. If it is a fixed-width bit pattern from a computer, such as 11111011 in 8 bits, it is probably two's complement, and the leading 1 means negative: that pattern is โˆ’5, not 251.

Keep going

Notes & Assumptions

  • Binary input is read as a whole number. Binary points such as 101.11 are not accepted yet.
  • A minus sign is kept as a sign. A fixed-width two's complement pattern is read as a positive number here, so 11111011 converts to 251.
  • Working is shown for up to 64 bits; longer numbers still convert exactly.

This tool is for education and general calculation. Check results that feed into production code against your platform's documentation.