Binary to Decimal Converter — Free, Exact & Easy | Floan
Small tools. Clear answers.

Binary to Decimal
Converter

Turn ones and zeros into a number that makes sense. Get an exact decimal result, with the math behind it.

Number conversion / 01Local processing · No signup
BASE 2

Enter 0s and 1s. Spaces and an optional 0b prefix are accepted.

Try an example
Decimal resultBASE 10
42
6 input bits · Unsigned integer

Exact integer arithmetic. Your input stays in this browser.

Behind the result32 + 8 + 2 = 42
Exact, not roundedBigInt arithmetic for large integers.
Made for learningSee the place values that add up.
Private by designNo conversion data is uploaded.

Binary to Decimal Converter: understand every bit

A binary to decimal converter translates a number written with only zeros and ones into the base-ten notation we use every day. Enter a binary integer in the tool above and the decimal result appears immediately. The converter also shows the active place values, so you can check the answer rather than simply trust a calculator. It is useful for homework, programming exercises, digital electronics, and any task that involves reading a sequence of bits.

The important idea is that conversion changes a number’s representation, not its value. Binary 101010 and decimal 42 describe the same quantity. One uses powers of two; the other uses powers of ten. Once you understand this difference, long strings of zeros and ones stop looking mysterious. This guide explains the method, walks through examples, and highlights the interpretation choices that matter when working with real computer data.

What is the binary number system?

Binary is a positional number system with a base, or radix, of two. Each digit can only be 0 or 1, and each position represents a power of two. Starting on the right, the place values are 1, 2, 4, 8, 16, 32, 64, and so on. Moving one position to the left doubles the place value. A digit of 1 includes that value in the total, while a digit of 0 contributes nothing.

A single binary digit is called a bit. Eight bits are commonly grouped into a byte, which can represent 256 different patterns. If interpreted as an unsigned integer, those patterns cover the values 0 through 255. Computers use bits because physical devices can reliably distinguish two states. However, a bit pattern does not explain its own meaning: software decides whether it represents an integer, a character, an instruction, or something else.

How decimal notation differs

Decimal uses ten digits, from 0 through 9, and place values based on powers of ten. In 425, the 4 contributes four hundreds, the 2 contributes two tens, and the 5 contributes five ones. Binary follows the same positional principle with a smaller base. The notation 101 in binary therefore means one four plus zero twos plus one one, giving decimal 5 rather than one hundred and one.

How to use this binary to decimal converter

Type or paste your binary number into the input field. Results update as you edit, and the Convert to decimal button lets you explicitly run the same calculation. You can try a preset example before entering your own value. Use Copy result to transfer the decimal digits into a document or another application. Clear removes the input and resets the output, making it easy to start a fresh calculation without reloading the page.

This tool accepts spaces and line breaks as visual separators. For example, 1111 0000 is interpreted as the single binary number 11110000, not as two separate numbers. An optional 0b prefix is also accepted, so 0b1010 becomes decimal 10. The input must otherwise contain only zeros and ones. Commas, decimal points, minus signs, underscores, and digits such as 2 are rejected rather than silently discarded.

The converter is intended for unsigned whole numbers. It does not automatically infer two’s complement, floating-point encoding, or binary fractions. Input length is limited to 4,096 binary digits to keep the interface responsive. Within that limit, calculations use JavaScript BigInt rather than ordinary floating-point arithmetic. All conversion processing happens in your browser; the tool does not send the number you enter to a conversion service.

Binary to decimal conversion formula

To convert manually, multiply each binary digit by the power of two associated with its position, then add the products. Count positions from zero at the rightmost digit. For a binary integer with n digits, the general rule is the sum of each digit multiplied by two raised to its position. Because every digit is either zero or one, you can usually skip the zero positions entirely.

Decimal = b₀ × 2⁰ + b₁ × 2¹ + … + bₙ₋₁ × 2ⁿ⁻¹

Example: convert binary 101010 to decimal

Write the six place values from left to right: 32, 16, 8, 4, 2, and 1. Now align them with the digits of 101010. The first, third, and fifth positions contain ones, so those positions contribute 32, 8, and 2. The other positions contribute zero. Adding the selected values gives 32 + 8 + 2 = 42. This is the example shown when the converter first opens.

Binary to decimal converter check: reverse the sum

A useful way to verify the result is to rebuild it from powers of two. The largest power of two that fits into 42 is 32, leaving 10. Next choose 8, leaving 2, and then choose 2, leaving zero. Mark those positions with ones and every other position with zeros. You recover 101010, confirming that the forward conversion and the place-value interpretation agree.

Example: convert binary 11111111 to decimal

In this eight-bit example, every position is active. Add 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 to get 255. There is also a shortcut: an unsigned binary number containing n consecutive ones equals 2ⁿ − 1. For eight ones, that becomes 256 − 1. This relationship is especially useful when checking the largest value available in a fixed-width field.

An alternative: the multiply-and-add method

You can also read the digits from left to right without writing a power-of-two table. Begin at zero, double the running total, and add the next binary digit. For 1101, the totals become 1, then 3, then 6, then 13. Each doubling shifts the accumulated value one binary position to the left. This method is convenient for hand calculations and explains a common algorithm for parsing numbers in different bases.

Quick binary to decimal reference

These common values are helpful when learning place values or checking short inputs. Notice how adding a new leading one followed entirely by zeros produces the next power of two. Also notice that the value immediately before each power of two consists entirely of ones. Recognizing these patterns can help you spot a misplaced digit before it becomes a debugging problem.

Common unsigned binary values
BinaryDecimalPattern
00Zero
11One bit set
1010108 + 2
10000162⁴
111111112552⁸ − 1
1000000000010242¹⁰

Accuracy, leading zeros, and signed numbers

Leading zeros do not change an unsigned integer’s value. Binary 00001010, 1010, and 0b1010 all represent decimal 10. The extra zeros may still carry contextual information, such as the width of a register or network field. The converter counts the input bits after removing the optional prefix and whitespace, including leading zeros. That count describes your representation; it does not imply a signed format or a specific storage type.

Why large integer precision matters

JavaScript’s standard Number type cannot represent every integer above 9,007,199,254,740,991 exactly. A converter that relies only on that type can therefore produce rounded answers for long binary strings. This tool uses BigInt to preserve the integer value and displays the result as a decimal string. For more technical background, see the MDN documentation for BigInt, including its differences from ordinary JavaScript numbers.

Unsigned versus two’s complement

The same bits can produce different results under different interpretation rules. For example, 11111111 is 255 as an unsigned eight-bit integer, but −1 as an eight-bit two’s complement integer. To interpret a two’s complement value manually, first identify the fixed width. If the most significant bit is one, subtract 2 raised to that width from the unsigned result. This converter always reports the unsigned result, so signed interpretation must be handled separately.

Common mistakes to avoid

Do not treat the leftmost digit as the ones position; place values start on the right. Avoid assuming that a string of decimal-looking digits is valid binary simply because it contains mostly ones and zeros. Check the original source before removing punctuation, since a dot may indicate a fractional value rather than a separator. Finally, remember that grouping bits into bytes improves readability but does not automatically tell you the byte order of a multi-byte data structure.

Where binary conversion is useful

Students use binary conversion to understand positional notation and practice powers of two. Programmers use it to inspect bit masks, feature flags, and low-level values. Someone studying networking may convert an individual IPv4 octet between binary and decimal to understand subnet boundaries. Electronics learners can connect a row of switches or logic states to a numeric output. In each setting, the converter makes arithmetic easier while leaving the underlying interpretation visible.

For technical learning, the Khan Academy computer science resources provide broader context for digital information and algorithms. You can return to Floan’s homepage whenever you need this converter, or read about Floan to learn about the site. If you find an unexpected result, use our contact page and include a reproducible example without sharing sensitive data.

Binary to Decimal Converter FAQ

How do I convert binary to decimal by hand?

Start at the rightmost digit and assign powers of two: 1, 2, 4, 8, and onward. Add only the values beneath digits that contain a one. For example, 1001 selects 8 and 1, giving decimal 9. Writing the place values above the digits helps prevent alignment mistakes when the binary number is long.

What is binary 1010 in decimal?

Binary 1010 equals decimal 10. Its four positions represent 8, 4, 2, and 1. Only the 8 and 2 positions contain ones, so the sum is 8 + 2. If you enter 00001010 instead, the answer remains 10 because the leading zeros contribute nothing to the numeric value.

Can I convert negative numbers or binary fractions?

Not with this unsigned integer tool. A minus sign or binary point triggers a validation message. Fractions require negative powers of two after the point, while signed machine integers require an agreed encoding and bit width. These are different operations, so the converter avoids guessing which interpretation you intended.

Does this converter work on a phone?

Yes. The input and result stack vertically on smaller screens, and the numeric keyboard hint makes entering bits easier on supported mobile browsers. You can paste longer numbers, tap an example, and copy the result. The calculation itself needs no server response after the page has loaded in a modern browser.

Why does the copy button sometimes fail?

Browsers may restrict clipboard access because of security settings, permissions, or the page’s connection context. If copying fails, the tool displays a message instead of claiming success. You can still select the visible decimal result and use your device’s normal copy command. The underlying conversion is unaffected by clipboard permissions.

Are my binary numbers saved or uploaded?

The converter code neither uploads your input nor stores it in cookies or browser storage. It keeps the current value only in the page while you use it. This page does request its typography from Google Fonts, and normal website hosting may process request information; local number conversion should not be confused with a claim that the entire website makes no network requests.

From bits to answers.

Try a number. Check the steps. Keep learning.

Back to converter
Scroll to Top