Search tools

Search for a command to run...

Binary & Hex Arithmetic Calculator

Add, subtract, multiply and divide numbers in binary, octal or hexadecimal, and do bitwise AND, OR, XOR and shifts — exact for large numbers.

How to use

  1. 1Choose the number base and enter two numbers in that base.
  2. 2Pick the operation; results are shown in binary, decimal and hex.

How it's calculated

Numbers are converted to exact integers, the operation is applied, and the result is converted back. Division is integer division with a remainder.

Frequently asked questions

How do I add binary numbers by hand?

Add column by column from the right: 0+0=0, 0+1=1, 1+1=10 (write 0, carry 1), 1+1+1=11.

What does XOR do?

Each output bit is 1 when exactly one of the input bits is 1 — useful for checksums, toggling flags and simple ciphers.

How are negative results shown?

With a minus sign, rather than as two's complement.