Binary Calculator — Add, Subtract, AND, OR, XOR, Shift
DeveloperA binary calculator is a developer tool that performs arithmetic (+, −, ×, ÷) and bitwise operations (AND, OR, XOR, NOT, shifts) on integers entered in binary.
What is it
Binary arithmetic follows the same rules as decimal with a place value of 2, while bitwise operations combine the matching bits of two numbers logically. This calculator uses arbitrary-precision integers (BigInt), so there is no length limit, and every result is shown in binary, decimal, and hex at once. Division returns both quotient and remainder, and NOT inverts within the bit width you typed. Everything runs in your browser.
How to use
- 1Enter binary number A.
- 2Pick an operation and, if needed, enter binary B (shifts take a decimal count).
- 3Press calculate to see the result in binary, decimal, and hex.
Reference
| Operation | Example (A=1010, B=0110) | Decimal |
|---|---|---|
| AND | 0010 | 2 |
| OR | 1110 | 14 |
| XOR | 1100 | 12 |
| A + B | 10000 | 16 |
| A << 1 | 10100 | 20 |
Sources & standards
- Base - Wolfram MathWorld
- MDN Web Docs: Client-side web APIs - MDN Web Docs
FAQ
How does the NOT operation decide the bit width?
It inverts each bit within the width of the binary number you typed — NOT 1010 is 0101 at 4 bits. Pad with leading zeros if you need a fixed 32-bit or 64-bit width.
How are negative results shown?
As binary with a minus sign, not as two's complement. If you need a two's-complement representation, convert it separately at your target bit width.
Is my input sent to a server?
No. Calculation runs in your browser with BigInt and the input is never transmitted.