Binary Calculator

Enter two binary numbers and an operation to get the result in binary, decimal and hexadecimal. The calculator validates that the inputs contain only 0s and 1s.

Enter two binary numbers and press Calculate.

How binary arithmetic works

Binary (base 2) uses only the digits 0 and 1. Each position is a power of two — from the right, 1, 2, 4, 8, 16, and so on:

10112 = 1·8 + 0·4 + 1·2 + 1·1 = 1110

To compute reliably, this tool converts each binary string to a decimal integer, performs the operation, then converts the result back to binary. The same carry-and-borrow rules you use in base 10 apply in base 2 — you just carry at 2 instead of 10.

Worked example

1011 + 110:

Decimal values: 1011₂ = 11, 110₂ = 6.
Add: 11 + 6 = 17.
Back to binary: 17 = 10001₂ (hex 0x11).

Binary, decimal and hexadecimal

Computers store everything in binary, but long binary strings are hard to read, so programmers often use hexadecimal (base 16), where each hex digit packs exactly four bits. This calculator shows all three bases so you can move between how a machine stores a value and how humans read it.

Tip: to convert a single number between bases without arithmetic, use the hex to decimal converter.

Frequently asked questions

How do I add two binary numbers?

Either add bit by bit, carrying at 2 instead of 10, or convert each to decimal, add, and convert back. 1011₂ (11) + 110₂ (6) = 17, which is 10001₂.

What is binary?

Binary is base 2 — it uses only 0 and 1. Each position is a power of two, so 1011 means 8 + 0 + 2 + 1 = 11. Computers use binary because circuits have two stable states: on and off.

Can this calculator subtract and divide binary?

Yes. It supports addition, subtraction, multiplication and division. Subtraction can give a negative result; division here returns the integer quotient of the two binary values.

Why also show hexadecimal?

Long binary strings are hard to read, so each group of four bits is written as one hex digit. Showing decimal and hex alongside binary makes the value easy for both humans and machines.

MB
Mustafa Bilgic · Editor, Calcool
Positional binary notation is a standard of computer arithmetic. For a primer on number bases see binary numbers. All conversion runs in your browser using exact integer math.

Related calculators