Home / Math

Doing arithmetic in base 2

Binary uses only 0 and 1, with each position worth twice the one to its right. It is how every computer actually stores and manipulates numbers. This binary calculator adds, subtracts, multiplies and divides binary strings directly, and shows the decimal equivalent alongside so you can check the result at a glance.

How to use the Binary Calculator

  1. Enter Binary Value A using only 0s and 1s.
  2. Enter Binary Value B.
  3. Choose the Operation.
  4. Read the answer in binary and in decimal.

Formula and a worked example

Place values from the right: 1, 2, 4, 8, 16, 32, 64, 128 …
Binary addition: 0+0=0, 0+1=1, 1+1=10 (carry 1)

To convert binary to decimal, add the place values wherever a 1 appears. To go the other way, divide repeatedly by 2 and read the remainders bottom to top.

Worked example

1011 is 8 + 0 + 2 + 1 = 11, and 1101 is 8 + 4 + 0 + 1 = 13. Adding them gives 11000, which is 16 + 8 = 24 — exactly 11 + 13.

Frequently asked questions

How do I convert decimal to binary?

Divide by 2 repeatedly and record each remainder, then read the remainders from bottom to top. 13 gives 1, 0, 1, 1 upward — that is 1101.

Why do computers use binary?

Because a circuit reliably distinguishes two states — on and off — far more cheaply than ten. Two states means base 2.

How does binary subtraction work?

Just like decimal, but you borrow 2 instead of 10. Computers normally use two's complement and add the negative instead.

What is the largest number in 8 bits?

11111111, which is 255. With n bits you can represent 0 to 2ⁿ − 1.

Related calculators

Other tools people use alongside the binary calculator.

Browse all 50 calculators