download.fan

Binary Calculator

Do binary arithmetic: add, subtract, multiply, divide, AND, OR, XOR and bit shifts. Also works in hex, octal and decimal, with the result in every base.

Result (base 2)
111010
Binary
111010
Decimal
58
Hexadecimal
3A
Octal
72
Inputs in decimal
45 + 13

Arithmetic in base 2

Binary numbers use only 0 and 1, and every place is worth twice the one to its right. Adding works like decimal, but 1 + 1 = 10, so you carry 1. 101101 (45) + 1101 (13) = 111010 (58). This calculator also does bitwise AND, OR and XOR, which compare bits one by one, and left or right shifts, which multiply or divide by powers of 2. Switch the base to work in hexadecimal or octal, and every result is shown in binary, decimal, hex and octal.

How to use it

  1. 1

    Enter two numbers

    In binary, or pick hex, octal or decimal.

  2. 2

    Choose the operation

    +, −, ×, ÷, AND, OR, XOR or shifts.

  3. 3

    Read the result

    In the chosen base, plus binary, decimal, hex and octal.

Frequently asked questions

How do you add binary numbers?

Add column by column from the right: 0 + 0 = 0, 0 + 1 = 1, 1 + 1 = 0 carry 1, 1 + 1 + 1 = 1 carry 1.

How does binary division work here?

It's whole-number division: you get the quotient and the remainder, both in the chosen base.

Is there a size limit?

No. Numbers of any length are calculated exactly.

Is anything stored?

No. The calculation runs in your browser.

Math calculators

Related tools