Binary Calculator

Add, subtract, multiply or divide two binary numbers, or convert a number between binary and decimal.

Binary Calculation

Enter two binary numbers, made of 0s and 1s only, and pick an operation.

Binary to Decimal

Convert a binary number to a decimal number.

Decimal to Binary

Convert a whole decimal number to binary.

Common binary and decimal values

DecimalBinaryDecimalBinary
0081000
11101010
2101610000
3112010100
4100641000000
711125511111111

How binary works

The binary system counts in base 2. Where decimal uses ten digits, 0 to 9, and each place is worth ten times the one to its right, binary uses only 0 and 1, and each place is worth twice the one to its right. The binary number 1011 is 1 × 8, plus 0 × 4, plus 1 × 2, plus 1 × 1, which is 11 in decimal. Computers use binary because it is easy to build circuits that detect only two states, on and off.

Binary arithmetic

Addition, subtraction, multiplication and division follow the same rules as in decimal, except you carry or borrow when a column reaches 2 instead of 10. In addition, 1 + 1 is 10, which is a 0 with a carry of 1. This calculator does the sums exactly, for numbers of any length, and shows the matching decimal calculation so you can check the answer. Division gives a whole quotient and a remainder.

Converting between binary and decimal

To convert binary to decimal, add up the place value of every 1. To convert decimal to binary, divide the number by 2 again and again and write down the remainders from last to first. The calculators above do both directions for you. Negative numbers are shown with a minus sign, not in the two’s complement form that computer hardware uses.

This calculator works with whole numbers. Fractions and floating point values are stored differently inside computers, and are not covered here.

Common questions

How do you add binary numbers?

Add the bits column by column from the right. 0 + 0 is 0, 0 + 1 is 1, and 1 + 1 is 10, so write 0 and carry 1 to the next column.

How do you convert binary to decimal?

Multiply each bit by 2 raised to its position, counting from 0 at the right, and add the results. For 1011 that is 8 + 0 + 2 + 1, which is 11.

How do you convert decimal to binary?

Divide the number by 2 repeatedly and keep the remainders. Reading the remainders from the last to the first gives the binary number. For example, 11 gives 1011.

What happens when I divide binary numbers?

The calculator gives a whole number quotient and a remainder, both in binary and decimal. Division by zero is not possible.

Can I enter negative or fractional binary numbers?

You can use a minus sign for a negative whole number. Fractional binary numbers, with a binary point, are not supported.

More Math Calculators

Pick another tool to jump straight to it.