Binary Calculator
Add, subtract, multiply, divide, and run bitwise AND, OR, and XOR on binary numbers in your browser. Type two binary values, pick an operation, and instantly see the result in binary, decimal, hexadecimal, and octal. A fast, accurate binary math calculator for students, programmers, and anyone learning how binary arithmetic and bitwise logic work — no sign-up and nothing leaves your device.
ToolsSoup's Binary Calculator performs arithmetic and bitwise math on binary numbers and shows the answer in binary, decimal, hexadecimal, and octal at the same time. Enter two binary values, choose to add, subtract, multiply, divide, or apply a bitwise AND, OR, or XOR, and the result updates instantly. It's a quick way to check homework, debug bit masks and flags, or simply understand how computers do math in base 2. Everything runs in your browser: no uploads, no sign-up, and your numbers never leave your device.
What is a binary calculator?
A binary calculator works with numbers written in base 2 — using only the digits 0 and 1 — instead of the base-10 numbers we use every day. It lets you add, subtract, multiply, and divide binary values, and it can also perform bitwise operations (AND, OR, XOR) that compare two numbers bit by bit. Because computers store everything in binary, these operations are the foundation of how processors do arithmetic and how programmers manipulate flags, masks, and individual bits. This calculator does the conversion and the math for you, so you can focus on the result instead of carrying ones by hand.
How to use the binary calculator
Calculating with binary numbers takes just a few steps, and the result updates as you type:
- Type your first binary number into value A using only 0s and 1s.
- Type your second binary number into value B.
- Choose an operation: add, subtract, multiply, divide, AND, OR, or XOR.
- Read the answer shown in binary, decimal, hexadecimal, and octal, then copy it if you need it.
Binary arithmetic vs bitwise operations
Arithmetic operations (+, −, ×, ÷) treat each binary value as a whole number and follow the same rules as decimal math, just in base 2 — so 1011 + 0011 equals 1110, the same as 11 + 3 = 14. Bitwise operations are different: AND, OR, and XOR line the two numbers up bit by bit and combine each pair of bits independently. AND returns 1 only where both bits are 1, OR returns 1 where either bit is 1, and XOR returns 1 where the bits differ. These bitwise tools are how programmers set, clear, and toggle individual flags inside a single value.
Reading the result in four number systems
Every answer is shown in four bases at once. Binary (base 2) is the raw result. Decimal (base 10) is the familiar value a person reads. Hexadecimal (base 16) is the compact form programmers use for memory addresses and color codes, where each hex digit packs four bits. Octal (base 8) groups bits in threes and still shows up in file permissions. Seeing all four side by side makes it easy to cross-check your work and to translate a binary result into whatever format your code or assignment expects.
Why use this binary calculator?
- Adds, subtracts, multiplies, and divides binary numbers accurately.
- Runs bitwise AND, OR, and XOR for working with flags and bit masks.
- Shows every result in binary, decimal, hexadecimal, and octal at once.
- Handles very large numbers exactly using arbitrary-precision math.
- Runs entirely in your browser — free, no ads, and your numbers never leave your device.
Frequently asked questions
How do you add two binary numbers?
You add binary numbers column by column from right to left, just like decimal addition, but you carry whenever a column reaches 2 (10 in binary). For example, 1011 + 0011 = 1110. This calculator does the carrying for you and shows the sum in binary, decimal, hexadecimal, and octal instantly — just enter both values and choose Add.
What's the difference between AND, OR, and XOR?
These are bitwise operations that compare two numbers one bit at a time. AND gives 1 only when both bits are 1, OR gives 1 when at least one bit is 1, and XOR gives 1 only when the two bits are different. They're used to set, check, and toggle individual flags inside a number. Pick the operation above and the result shows immediately.
Can this calculator subtract and divide binary numbers?
Yes. It supports addition, subtraction, multiplication, and division. Subtraction can produce a negative result, which is shown with a minus sign, and division returns the integer (whole-number) quotient. Dividing by zero is not allowed and the calculator will let you know.
Does it handle very large binary numbers?
Yes. The calculator uses arbitrary-precision integer math, so it stays exact even for binary numbers with many digits — there's no rounding or overflow the way there would be with ordinary floating-point numbers.
Why is the result shown in hexadecimal and octal too?
Binary numbers get long quickly, so programmers often write them in hexadecimal (base 16) or octal (base 8) as a shorter, easier-to-read form. Showing all four bases at once lets you copy the result in whatever format your code, homework, or tool expects without a separate conversion step.