LinguaholicTools

Binary Calculator — Add, Subtract, Multiply & Divide Binary

Add, subtract, multiply, and divide binary numbers — plus bitwise AND, OR, XOR, and shifts — with the carries and working shown and the answer in binary, decimal, hex, and octal.

Enter numbers in

Binary
10001
Decimal
17
Hexadecimal
11
Octal
21

Show the working

  111     ← carries
  01011
+ 00110
  ─────
  10001

In decimal: 11 + 6 = 17

Binary addition rules: 0+0=0, 0+1=1, 1+1=10 (write 0, carry 1), 1+1+1=11 (write 1, carry 1).

How to use the binary calculator

  1. Choose whether you’re typing binary, decimal, or hex numbers.
  2. Enter two numbers and pick an operation: +, −, ×, ÷, AND, OR, XOR, or a shift.
  3. The answer appears in binary, decimal, hex, and octal, with the working shown — including the carries for binary addition.

Binary addition

Binary addition works like column addition in decimal, but you carry at 2 instead of 10:

SumResultWriteCarry
0 + 0000
0 + 1110
1 + 11001
1 + 1 + 11111

Example: 1011 (11) + 110 (6) = 10001 (17). The calculator draws the carry row so you can follow each column.

Binary subtraction

Subtract column by column from the right. 1 − 0 = 1, 1 − 1 = 0, 0 − 0 = 0, and 0 − 1 = 1 with a borrow from the next column (just like borrowing 10 in decimal, but you borrow 2). Computers usually subtract by adding the two’s complement instead — see the Binary Converter for how that works.

Binary multiplication and division

Multiplying in binary is easy because each digit is 0 or 1: for each 1 in the second number, write the first number shifted left, then add the rows. Division works like long division, and the calculator gives the quotient and the remainder: 1101 (13) ÷ 11 (3) = 100 (4) remainder 1.

Bitwise AND, OR, XOR and shifts

OperationRuleExample
AND1 only if both bits are 11100 AND 1010 = 1000
OR1 if either bit is 11100 OR 1010 = 1110
XOR1 if the bits are different1100 XOR 1010 = 0110
<< (shift left)moves bits left; each place doubles the number101 << 1 = 1010
>> (shift right)moves bits right; each place halves it1010 >> 1 = 101

Bitwise operations are used everywhere in programming — for flags, masks, colors, and permissions.

More binary tools

Convert between number systems with the Binary Converter, turn words into binary with the Binary Translator, and practice with the Binary Game. The calculator runs entirely in your browser and handles numbers of any size exactly.

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), and 1+1+1=11 (write 1, carry 1). Example: 1011 + 110 = 10001. The calculator draws the carries for you.
How do you subtract binary numbers?
Subtract column by column; when you need 0 − 1, borrow 2 from the next column. The calculator also handles negative results.
Can I enter decimal or hex numbers?
Yes. Switch the input to decimal or hex — the numbers you typed are converted automatically — and see every answer in all four bases.
What do AND, OR and XOR do?
They compare two numbers bit by bit: AND gives 1 where both bits are 1, OR where either is 1, and XOR where they differ. Shifts move all bits left (doubling) or right (halving).
Is anything uploaded?
No. Everything runs in your browser — nothing you type is uploaded or stored.