1. Home
  2. Developer tools
  3. Binary to Decimal

Binary to Decimal

Paste one or many binary numbers and get the decimal value, plus the sum of powers of two that produces it. It handles fractions such as 101.011, negative numbers and values far beyond 64 bits.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use Binary to Decimal

  1. Type or paste binary numbers, one per line (0b prefixes and spaces are accepted).
  2. Read the decimal value and the step-by-step working.
  3. Copy the result, or look at the same number in hexadecimal and octal.

Features

  • Exact big-number arithmetic: no rounding at 2^53 or 2^64
  • Binary fractions such as 0.101 convert exactly
  • Shows each bit with its place value
  • Accepts 0b prefixes, spaces and underscores as separators
  • Converts a whole list at once
  • Names the first character that is not a valid binary digit

Supported formats

Input

  • Binary numbers
  • Typed or pasted numbers

You get

  • Decimal
  • Working steps

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Binary to Decimal is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Numbers are read in the base named by the tool, so a digit outside that base is reported instead of guessed.
  • Fractions that do not end in the target base are cut after 24 digits and marked with an ellipsis.

Guide

Reading binary numbers as decimal, bit by bit

Binary is the way a computer stores every number, and decimal is the way people read them. Turning one into the other is a matter of knowing what each position is worth. This page does the sum for you, shows each term of it, and keeps working however long the string of bits becomes.

How the conversion works

Every bit sits in a position that is worth a power of two. Counting from the right and starting at zero, the positions are worth 1, 2, 4, 8, 16, 32 and so on. A bit that is 1 contributes its position’s value, and a bit that is 0 contributes nothing. Adding the contributions gives the decimal number. The binary number 1101 is 8 + 4 + 0 + 1, which is 13.

After a binary point the positions are worth halves: the first place is 1/2, the next 1/4, then 1/8. That is why a fraction such as 101.011 is read as 5 plus 0.25 plus 0.125, or 5.375. Only fractions whose denominators are powers of two can be written exactly this way, which is also the reason that going the other direction can produce endless digits.

Reading the working

When “Show the working” is on, each line is one term of the sum, such as 1 × 2⁷ = 128, with a line for every bit and a total at the bottom. If you paste several numbers, one per line, the working explains the first line and the others are converted in the result box. The panel below the result gives the same value in octal, hexadecimal and base 36, which is handy for checking a homework answer against two other bases at the same time.

Options

“Group digits” inserts thin separators into long results so they can be read in threes. It changes how the answer is displayed, never its value. Separators in your own input are ignored, so a bit pattern copied from a datasheet with spaces between bytes is read as one number, and underscores such as 1010_1010 work the same way. A 0b prefix is removed before reading, and a leading minus sign is carried through to the answer.

Edge cases

A character other than 0 or 1 stops the conversion for that line, and the message names the character and its position, which is the quickest way to find a stray 2 in a long string. Leading zeros are allowed and have no effect. An empty line is skipped. Because the arithmetic uses big integers and not floating-point numbers, a string of 80 ones gives exactly 1,208,925,819,614,629,174,706,175, whereas a spreadsheet or a plain JavaScript number would round it.

Plain binary is unsigned. The pattern 11111111 is 255 here, not −1. When a bit pattern comes from a register or a variable that holds signed values, use the two’s complement calculator, which lets you choose the width and shows the invert-and-add-one steps.

A worked example

The Sample button loads 11010110.101. The integer part has bits for 128, 64, 16, 4 and 2, which add to 214. The fraction .101 adds 0.5 and 0.125, which is 0.625. The result is 214.625. In the other bases the same number is 326.5 in octal and D6.A in hexadecimal, and you can check the octal figure by hand: 3 × 64 + 2 × 8 + 6 = 214, with the half written as .5.

Limits

The page converts numbers; it does not guess what they mean. It cannot tell a count from an address, a signed value or a bit mask, so interpretation is up to you. A fraction that does not end in the target base is cut after 24 digits and marked, but that only applies in the other direction. For text instead of numbers, such as turning letters into bytes, use the text-to-binary page.

Checked against the current version of the Binary to Decimal on .

Frequently asked questions

What is the largest decimal number a byte of binary can hold?

Eight bits set to 1 give 11111111, which is 255. In general n bits reach 2 to the power n, minus one, so 16 bits reach 65,535 and 32 bits reach 4,294,967,295.

Why does 0.1 in binary equal 0.5 and not one tenth?

Because the digit after the binary point stands for halves, not tenths. Binary 0.1 means one half, 0.01 means one quarter, and 0.11 means three quarters.

How do I convert binary to decimal by hand?

Number the bits from the right starting at 0, multiply each 1 by 2 raised to its position, and add the results. For 1101 that is 8 + 4 + 0 + 1 = 13.

Does it read two’s complement?

No. A number is read as plain binary, so 11111111 is 255. To read a bit pattern as a signed integer, use the Two’s Complement Calculator.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.