Free forever · No sign-up

Binary Calculator

Add, subtract, multiply and divide binary numbers — with every step shown.

Last updated: October 2026

Your data stays in your browser.

Result (binary) —

How binary arithmetic works

  1. Type two binary numbers — spaces and 0b prefixes are ignored.
  2. Pick an operation: add, subtract, multiply or divide.
  3. 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.

OperationBinary resultDecimal check
1010 + 11110110 + 3 = 13
1111 − 101101015 − 5 = 10
101 × 1111115 × 3 = 15
1010 ÷ 1010110 ÷ 2 = 5
1101 + 10111100013 + 11 = 24
100 − 1114 − 3 = 1

Powers of 2

PowerValue
201
212
224
238
2416
2532
2664
27128
28256
29512
2101024
2112048
2124096
2138192
21416384
21532768
21665536

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).

More converters