Binary Calculator
Add, subtract, multiply and divide binary numbers, or combine them with AND, OR and XOR, and see each answer in binary, decimal and hex.
A binary calculator does arithmetic in base 2, where each digit is 0 or 1 and each place is worth twice the one to its right. 1011 plus 110 is 10001 in binary, which is 17 in decimal (11 plus 6). Enter two binary numbers and choose an operation to get the answer in binary, decimal and hex.
Operands are whole numbers only; the calculator does not handle binary fractions or fixed-width two's complement. Division gives a whole-number quotient rounded toward zero, with the remainder shown separately.
Result (binary)
10001
- Decimal
- 17
- Hex
- 11
- Check in decimal
- 11 + 6 = 17
Embed this calculator on your site →
About the Binary Calculator
Binary arithmetic follows the same column rules as decimal, with a carry whenever a column reaches 2 instead of 10, so 1111 plus 1 ripples a carry all the way across to 10000, which is 15 plus 1 making 16. Multiplication is shifting and adding: 1101 times 101 is 1101 plus 1101 shifted two places, 1000001, or 13 times 5 equals 65. Division subtracts shifted copies of the divisor wherever they fit, writing a 1 in the quotient each time, and leaves a whole-number remainder, so 1101 divided by 11 is 100 with 1 left over, 13 divided by 3 being 4 remainder 1. Every answer is exact, with no rounding, and each number you enter may have up to 256 binary digits.
Frequently asked questions
How do you add binary numbers?+
Line them up on the right and add each column: 0 plus 0 is 0, 0 plus 1 is 1, and 1 plus 1 is 10, so you write 0 and carry 1 to the next column. 1010 plus 0110 gives 10000, because 10 plus 6 is 16.
What happens if I subtract a larger binary number?+
The answer is negative and shown with a minus sign: 1010 minus 1100 is -10 in binary, or 10 minus 12 equals -2. The calculator keeps sign and size separate instead of assuming a register width for two's complement.
What do AND, OR and XOR do?+
They compare matching bits. For 1100 and 1010, AND keeps a 1 only where both have one, 1000; OR keeps a 1 where either does, 1110; XOR keeps a 1 where exactly one does, 110. These work on non-negative numbers.
Can it handle large binary numbers?+
Yes, up to 256 digits for each number you enter, with every digit of the answer kept. 11111111 times 11111111 is 1111111000000001, which is 255 times 255 equals 65,025, or FE01 in hex.
Methods: Knuth DE, The Art of Computer Programming, Vol. 2, 3rd ed., sections 4.1 and 4.3.1; ECMA-262, 6.1.6.2 The BigInt Type.
Embed this calculator
Free to use on your own site. Paste this snippet where you want the binary calculator to appear — it resizes itself automatically.
<iframe
src="https://manytools.co/embed/binary-calculator"
title="Binary Calculator by ManyTools"
data-manytools="binary-calculator"
width="100%"
height="640"
loading="lazy"
style="border:0;width:100%;max-width:720px"></iframe>
<script>
(function () {
window.addEventListener("message", function (e) {
if (e.origin !== "https://manytools.co") return;
var d = e.data || {};
if (d.type !== "manytools:embed:height" || d.slug !== "binary-calculator") return;
var f = document.querySelector('iframe[data-manytools="binary-calculator"]');
if (f && d.height) f.style.height = d.height + "px";
});
})();
</script><a href="https://manytools.co/dev/binary-calculator">Binary Calculator by ManyTools</a>