MATH & COMPUTER SCIENCE

Binary Calculator

Convert binary numbers to decimal, check binary input, and understand how base-2 place values work.

Example: enter 101101 to get 45.

What is a binary number?

A binary number uses only two digits: 0 and 1. This is called the base-2 number system. Computers and digital electronics use binary because electronic circuits can represent two distinct states, such as off and on. A sequence such as 101101 is therefore a number, not a decimal code that needs to be interpreted as ordinary decimal digits.

How binary to decimal conversion works

Each position in a binary number has a value based on a power of 2. The rightmost position is 2⁰ = 1, the next is 2¹ = 2, then 2² = 4, 2³ = 8, and so forth. Multiply each binary digit by its position value and add the results. Positions containing 0 contribute nothing; positions containing 1 contribute their corresponding power of 2.

Worked example: 101101₂

For 101101₂, the 1s occur at 2⁵, 2³, 2² and 2⁰. Therefore: 32 + 8 + 4 + 1 = 45₁₀. The calculator above performs the same conversion instantly and also rejects characters other than 0 and 1.

Decimal to binary

To convert a positive decimal integer to binary manually, divide the number by 2 and record the remainder. Continue dividing the quotient by 2 until it reaches zero. Read the remainders from bottom to top. For example, 45 divided repeatedly by 2 produces remainders that read as 101101, so 45₁₀ = 101101₂.

Reading binary place values

A quick way to check a conversion is to write the powers of two under the digits. For 11001₂, the positions are 16, 8, 4, 2 and 1. The 1s select 16, 8 and 1, giving 25. This place-value approach is useful when checking a result without relying on a calculator.

Binary and other number systems

Binary is useful for understanding how computers represent data, while hexadecimal and octal provide shorter ways to write groups of binary digits. Four binary bits correspond to one hexadecimal digit. For example, 1010₂ is A₁₆. Learning these relationships makes binary, hexadecimal, and bit-level calculations easier to follow in programming and computer science.

Binary, bits, and bytes

A single binary digit is a bit. Eight bits make a byte, although the meaning of those bits depends on the data format. Binary values are commonly used when explaining processor operations, memory, network addresses, bitwise operations, and digital circuits. A calculator that converts the number itself does not determine what a particular binary sequence means in a software protocol or file format.

Common uses of binary

Binary representation appears in digital logic, computer architecture, programming, networking, bit masks, permissions, and data encoding. A bit can hold either 0 or 1, while eight bits form one byte. Larger values can be represented by combining more bits, although the exact interpretation depends on whether the data is unsigned, signed, encoded text, an instruction, or another data type.

Binary calculator tips

How to use this binary calculator

  1. Enter a number containing only 0 and 1.
  2. Select Convert to Decimal.
  3. Check the decimal value shown below the input.

The tool also normalizes the binary representation by converting the value back to base 2. Leading zeros may therefore be removed from the displayed result.

FAQ

What digits are valid in binary?

Only 0 and 1 are valid digits in an ordinary base-2 number.

How do I convert binary to decimal?

Assign powers of 2 from right to left, multiply each digit by its position value, and add the results.

How do I convert decimal to binary?

For a positive integer, repeatedly divide by 2 and read the remainders in reverse order.

Why do computers use binary?

Digital hardware can reliably represent two states, making a two-symbol number system practical for electronic computation.

Related calculators

Base Calculator · Hex to Decimal Calculator · Scientific Calculator

Explore more tools in the Math Calculators hub or All Calculators.

Binary calculation checks

Binary values use only 0 and 1, so each position represents a power of two. When converting between binary and decimal, verify the place values rather than treating the digits as an ordinary base-10 number.

Worked check

For example, 1011₂ represents 8 + 2 + 1, giving 11₁₀. The same place-value method can be reversed to convert a decimal integer back to binary.

Common mistake

Keep the base explicit when comparing results. A value such as 101 can mean different numbers in different numeral systems.