Binary Calculator

Add, subtract, multiply, and divide base-2 numbers, with results in binary and decimal.

    Binary arithmetic works exactly like decimal arithmetic, except you carry at two instead of ten. Adding 101 and 11 column by column gives 1000, which is 8 in decimal, the same as 5 + 3. The calculator above shows both forms for every operation.

    How binary addition works

    There are only four single-digit facts to know: 0 + 0 is 0, 0 + 1 is 1, 1 + 0 is 1, and 1 + 1 is 10, meaning write 0 and carry 1. That last fact is the whole personality of binary addition. You carry constantly, because the digits run out after 1 the way decimal digits run out after 9.

    Walk through 101 + 11, which is 5 + 3 in decimal. Line the numbers up on the right, like any addition. The ones column has 1 + 1: write 0, carry 1. The twos column has 0 + 1 plus the carried 1, which is 10 again: write 0, carry 1. The fours column has 1 plus the carry: write 0, carry 1 once more. The carry has nowhere to sit, so it opens a new column. Result: 1000, which is 8. Every carry landed somewhere sensible, and the answer agrees with decimal arithmetic, as it always must.

    Subtraction borrows at two the same way addition carries at two, and when the second number is bigger the result simply goes negative: 11 minus 101 is -10. Multiplication is easier than its decimal cousin, since multiplying by a digit means multiplying by 0 or 1; long multiplication in binary is just shifting and adding. Try 101 times 11 and you get 1111, which is 15. Division gives a whole-number quotient with the remainder reported separately, so 1101 divided by 10 shows 110 plus a remainder note rather than a fraction.

    If you want to see any operand as a plain number first, run it through the binary to decimal converter, and for the place-value theory behind all of this, the binary number system guide covers it from the ground up.

    FAQ

    How do you add two binary numbers?

    Column by column from the right, exactly like decimal addition but carrying at two instead of ten. The digit facts are 0 + 0 = 0, 0 + 1 = 1, and 1 + 1 = 0 carry 1. Adding 101 and 11 this way gives 1000, which checks out as 5 + 3 = 8.

    What does division show when it does not divide evenly?

    The calculator gives the whole-number quotient plus a remainder note. Dividing 1101 by 10 returns 110 with the note "remainder 1 (binary 1)", meaning 13 divided by 2 is 6 remainder 1. Dividing by zero shows an error instead of a result.

    Can the result be negative?

    Yes. Subtracting a larger number from a smaller one gives a negative result with a leading minus sign, the same convention you use in decimal. For example, 11 minus 101 is -10, which is -2 in decimal. Inputs can carry a leading minus sign too.