Binary to Decimal Converter (and Decimal to Binary), With Steps
Convert binary to decimal or decimal to binary, with the powers of 2 or the division by 2 shown, plus hex.
Inputs
- Working
- 1×2³ + 0×2² + 1×2¹ + 0×2⁰ = 8 + 2 = 10
- Hexadecimal
- A
- Bits
- 4
Use this calculator on your own site
Free embed
- Two lines of HTML, unlimited views
- Shows a small CalculateEveryday bar, with a credit link under the calculator
What each Binary to Decimal input means
- Convert
- Binary → decimal reads a string of 0s and 1s; decimal → binary takes an ordinary whole number. Both directions also give the hexadecimal form and the number of bits.
- Binary number
- Up to 53 binary digits, 0 and 1 only. Spaces are ignored, so a byte can be pasted as 1100 1000. Leading zeros are allowed and change nothing.
- Decimal number
- A whole number from 0 up to about 9 quadrillion (2⁵³ − 1), the largest a browser holds exactly. No commas, decimal points or minus signs.
Binary to Decimal conversion formula
binary → decimal: Σ digit × 2^position · decimal → binary: divide by 2 repeatedly, read the remainders from the last to the first
Binary is base 2: each place is worth twice the one to its right — 1, 2, 4, 8, 16 and so on. To turn binary into decimal, add the place values where there is a 1: 1011 is 8 + 2 + 1 = 11. To go the other way, OpenStax Contemporary Mathematics divides by 2 over and over, writing down each remainder, until the quotient is 0; the remainders read from the last to the first are the binary digits. The page shows both methods step by step and gives the hexadecimal form, which groups binary digits in fours.
Binary to Decimal conversion worked example
1010 in binary is 1 × 8 + 0 × 4 + 1 × 2 + 0 × 1 = 10. Going the other way, OpenStax converts 100 by dividing by 2 seven times — remainders 0, 0, 1, 0, 0, 1, 1 — and reads them backwards: 1100100.
More Binary to Decimal examples
2026 to binary: halve it and keep each remainder — 1,013 r 0, 506 r 1, 253 r 0, 126 r 1, 63 r 0, 31 r 1, 15 r 1, 7 r 1, 3 r 1, 1 r 1, 0 r 1. Reading from the last remainder back to the first gives 11111101010, eleven bits. Check: 1024 + 512 + 256 + 128 + 64 + 32 + 8 + 2 = 2026. In hexadecimal it is 7EA.
A byte pasted with a space, 1100 1000. The 1s sit in the 128, 64 and 8 places, so the value is 128 + 64 + 8 = 200. Split into four-bit groups, 1100 is C and 1000 is 8, which is why 200 is C8 in hexadecimal.
Where the Binary to Decimal converter can give the wrong answer
- Binary digits are 0 and 1 only; spaces between groups are ignored, so 1111 0000 is read as 11110000.
- Whole numbers only. Fractions such as 0.1 have endless binary expansions.
- Numbers above 2⁵³ − 1 (about 9 × 10¹⁵) cannot be represented exactly and are rejected.
- Leading zeros don't change the value: 00101 is 5.
Spotted a mistake? Tell us
Binary to Decimal conversion reference table
| Place (from the right, starting at 0) | Power | Value | Largest number that fits in the places up to here |
|---|---|---|---|
| 0 | 2⁰ | 1 | 1 (1 bit) |
| 1 | 2¹ | 2 | 3 (2 bits) |
| 2 | 2² | 4 | 7 |
| 3 | 2³ | 8 | 15 (4 bits, one hex digit) |
| 4 | 2⁴ | 16 | 31 |
| 5 | 2⁵ | 32 | 63 |
| 6 | 2⁶ | 64 | 127 |
| 7 | 2⁷ | 128 | 255 (8 bits, one byte) |
| 8 | 2⁸ | 256 | 511 |
| 9 | 2⁹ | 512 | 1,023 |
| 10 | 2¹⁰ | 1,024 | 2,047 |
| 15 | 2¹⁵ | 32,768 | 65,535 (16 bits) |
| 31 | 2³¹ | 2,147,483,648 | 4,294,967,295 (32 bits) |
Binary to Decimal conversion FAQ
- Write the powers of 2 under the digits from the right — 1, 2, 4, 8 … — and add those under a 1. 1101 = 8 + 4 + 1 = 13.
- Divide by 2 and note the remainder, repeat with the quotient until it reaches 0, then read the remainders from last to first. 13 → 6 r 1, 3 r 0, 1 r 1, 0 r 1 → 1101.
- 11111111 — eight 1s, the largest number a byte holds. In hexadecimal it is FF.
- The number of binary digits: 100 needs 7 (1100100). In general, a number below 2ⁿ fits in n bits.
- Group the bits in fours from the right and swap each group for its hex digit: 0000 to 1001 are 0 to 9, and 1010 to 1111 are A to F. 11111101010 becomes 0111 1110 1010, which is 7EA. The page gives the hexadecimal form for every conversion.
- Computers usually use two's complement within a fixed width: flip every bit of the positive number and add 1. In 8 bits, 5 is 00000101 and −5 is 11111011. This page converts non-negative whole numbers only, because the answer for a negative depends on the width chosen.
Related calculators
- Data Storage Converter: GB vs GiB, MB, TB, Bits
- Exponent Calculator (Powers, Negative and Fractional Exponents, Solve for x)
- Scientific Notation Calculator (Convert Both Ways, with Steps)
- Rounding Calculator: Decimals, Significant Figures, Nearest 10 or Fraction
- Permutations and Combinations Calculator (nPr, nCr, With Working)
- Gematria Calculator: English Ordinal, Sumerian and Other Ciphers