Binary Calculator

Add, subtract, multiply and divide binary numbers with decimal checks and steps. Free binary calculator.

A binary calculator adds, subtracts, multiplies and divides binary numbers. Type two binary numbers, choose the operation and get the result in binary, with the decimal values alongside as a check. Multiplication also shows the partial products, and division gives a quotient and a remainder.

To convert a binary result to decimal, or to hexadecimal or octal, use the binary to decimal converter.

This calculator needs JavaScript. Please enable it in your browser.

How binary arithmetic works

Binary addition

Binary uses only the digits 0 and 1. Add column by column from the right and carry when a column reaches 2.

SumResultCarry
0 + 000
0 + 110
1 + 010
1 + 101
1 + 1 + 1 (with a carry in)11

Binary subtraction

Subtract column by column from the right and borrow from the next column when you need to. If the second number is larger, the result is negative and the calculator shows it with a minus sign. It does not use two’s complement.

Binary multiplication

Multiplying by 1 copies the number and multiplying by 0 gives 0. For each 1 in the second number, shift the first number left by that digit’s position, then add the shifted copies. The calculator lists these partial products.

Binary division

Division works like long division in decimal. The calculator returns a whole-number quotient and a remainder in binary.

Worked examples

Example 1: 1011 + 110

Line the numbers up as 1011 and 0110 and add from the right.

  • Column 1: 1 + 0 = 1
  • Column 2: 1 + 1 = 10, write 0 and carry 1
  • Column 3: 0 + 1 + 1 (carry) = 10, write 0 and carry 1
  • Column 4: 1 + 0 + 1 (carry) = 10, write 0 and carry 1
  • Final carry: write 1

The result is 10001. Check in decimal: 11 + 6 = 17, and 10001 is 17.

Example 2: 11010 × 101

The second number, 101, has 1s in positions 0 and 2, so the partial products are 11010 and 11010 shifted two places, which is 1101000.

11010 + 1101000 = 10000010

Check in decimal: 26 × 5 = 130, and 10000010 is 130.

Example 3: 1001 − 1100

The first number is 9 and the second is 12, so the answer is negative: 9 − 12 = −3. In binary that is −11.

Example 4: 101101 ÷ 100

This is 45 ÷ 4 in decimal, which is a quotient of 11 with a remainder of 1. In binary the quotient is 1011 and the remainder is 1.

Frequently asked questions

How do you add binary numbers?

Add each column from the right, carrying 1 to the next column when the sum reaches 2. For example, 1 + 1 = 10 in binary, so you write 0 and carry 1.

What is 1 + 1 in binary?

It is 10, which is 2 in decimal. You write 0 and carry 1 into the next column.

How do you multiply binary numbers?

Write a shifted copy of the first number for each 1 in the second number, then add the copies. 11010 × 101 gives 11010 + 1101000 = 10000010.

How do I check a binary answer?

Convert both numbers and the result to decimal. The calculator shows the decimal check on every result.

How long can the binary numbers be?

Up to 128 binary digits each.