Free forever · No sign-up
Binary Calculator
Add, subtract, multiply and divide binary numbers — with every step shown.
Both entries must be binary — only 0s and 1s allowed.
Cannot divide by zero.
Your data stays in your browser.
How it was calculated
Also equals
- Binary
- Decimal
- Octal
- Hex
How binary arithmetic works
- Type two binary numbers — spaces and 0b prefixes are ignored.
- Pick an operation: add, subtract, multiply or divide.
- The calculator converts both numbers to decimal, performs the operation, and shows the result back in binary.
Background reading: the binary number system on Wikipedia.
Worked examples
Hand-checked examples — the decimal column lets you verify each binary result.
| Operation | Binary result | Decimal check |
|---|---|---|
| 1010 + 11 | 1101 | 10 + 3 = 13 |
| 1111 − 101 | 1010 | 15 − 5 = 10 |
| 101 × 11 | 1111 | 5 × 3 = 15 |
| 1010 ÷ 10 | 101 | 10 ÷ 2 = 5 |
| 1101 + 1011 | 11000 | 13 + 11 = 24 |
| 100 − 11 | 1 | 4 − 3 = 1 |
Powers of 2
| Power | Value |
|---|---|
| 20 | 1 |
| 21 | 2 |
| 22 | 4 |
| 23 | 8 |
| 24 | 16 |
| 25 | 32 |
| 26 | 64 |
| 27 | 128 |
| 28 | 256 |
| 29 | 512 |
| 210 | 1024 |
| 211 | 2048 |
| 212 | 4096 |
| 213 | 8192 |
| 214 | 16384 |
| 215 | 32768 |
| 216 | 65536 |
Binary arithmetic in code
Python
bin(int("1010", 2) + int("11", 2)) # → '0b1101' (10 + 3 = 13)
JavaScript
(parseInt("1010", 2) + parseInt("11", 2)).toString(2); // → '1101'
C
#include <stdio.h>
#include <stdlib.h>
int main(void) {
long a = strtol("1010", NULL, 2); /* → 10 */
long b = strtol("11", NULL, 2); /* → 3 */
long sum = a + b; /* → 13 */
for (int bit = 3; bit >= 0; bit--) /* 13 needs 4 bits */
putchar(((sum >> bit) & 1) ? '1' : '0');
putchar('\n'); /* → 1101 */
return 0;
}
Common values
1010+11=1101(10 + 3 = 13)1+1=10(carry!)101×11=1111(5 × 3 = 15)1010÷10=101(10 ÷ 2 = 5)100−11=1(4 − 3 = 1)
Key takeaways
- 1 + 1 = 10₂: binary addition carries just like decimal.
- Subtracting a larger number gives a negative result.
- Division drops the remainder — 101 ÷ 10 = 10₂.
- Multiplication is shift-and-add: ×10₂ doubles, ×100₂ quadruples.
- Check any result by converting both sides to decimal.
Frequently asked questions
How do you add binary numbers?
Add column by column from the right: 0+0=0, 0+1=1, 1+1=10 (write 0, carry 1), 1+1+1=11 (write 1, carry 1).
Can the result be negative?
Yes — subtracting a larger number gives a negative result, shown with a minus sign, e.g. 11 − 101 = −10.
What happens when I divide binary numbers?
Division gives the whole-number quotient — any remainder is dropped. For example, 101 ÷ 10 = 10 (5 ÷ 2 = 2).
What is 1010 + 11 in binary?
1010 (10) + 11 (3) = 1101 (13).
How does binary multiplication work?
Like decimal long multiplication but simpler: multiplying by 1 copies the row, multiplying by 0 gives zeros, then add the shifted rows.
Why is 1 + 1 = 10 in binary?
Binary has only 0 and 1, so 1 + 1 carries: write 0, carry 1 — giving 10₂ (= 2).
Can I use this for binary subtraction with borrowing?
Yes — borrowing works like decimal: 0 − 1 borrows, turning 10₂ − 1 into 1. Try 100 − 1 = 11 (4 − 1 = 3).