Binary Calculator
Do arithmetic and bitwise math on binary, decimal, hex and octal numbers — add, subtract, multiply, divide, AND, OR, XOR and shifts, with results in all bases.
Result in all bases
What is the Binary Calculator?
The ByteTools Binary Calculator performs arithmetic (+, −, ×, ÷) and bitwise operations (AND, OR, XOR, left and right shift) on two numbers that can each be entered in binary, decimal, hexadecimal or octal.
- Independent base selection for each operand
- Arithmetic and bitwise operations including shifts
- Result shown in binary, decimal, hex and octal at once
- Per-base input validation with clear error messages
- Exact big-integer math — no rounding errors
- 100% private, free, works offline
How to use the Binary Calculator
- 1
Choose the base (binary, decimal, hex or octal) for each operand and type the numbers.
- 2
Select the operation: add, subtract, multiply, divide, AND, OR, XOR, left shift or right shift.
- 3
Read the result instantly in binary, decimal, hexadecimal and octal.
- 4
Copy any representation with one click.
About the Binary Calculator
The ByteTools Binary Calculator performs arithmetic (+, −, ×, ÷) and bitwise operations (AND, OR, XOR, left and right shift) on two numbers that can each be entered in binary, decimal, hexadecimal or octal. The result is displayed simultaneously in all four bases, so you never need a separate converter.
It is built for computer science students learning Boolean logic, embedded developers working with registers and bit masks, and network engineers computing subnet values. Inputs are validated against the selected base, so a stray digit is flagged immediately instead of producing a wrong answer.
Arbitrary-precision integer math (BigInt) keeps large values exact — no floating-point rounding — and everything runs locally in your browser with nothing uploaded.
Frequently asked questions
How do you add two binary numbers?
Binary addition works column by column like decimal, but carries at 2 instead of 10: 1 + 1 = 10 (write 0, carry 1). For example 1011 + 0110 = 10001, which is 11 + 6 = 17 in decimal. The calculator shows the sum in all bases.
What is the difference between AND, OR and XOR?
They compare numbers bit by bit. AND outputs 1 only when both bits are 1, OR when at least one bit is 1, and XOR when exactly one bit is 1. For example 1100 AND 1010 = 1000, OR = 1110, XOR = 0110.
What does a left or right bit shift do?
Shifting left by n multiplies an integer by 2ⁿ, and shifting right divides by 2ⁿ with the remainder discarded. So 5 << 2 = 20 and 20 >> 2 = 5. Shifts are widely used for fast multiplication and building bit masks.
How does binary division handle remainders?
This calculator performs integer division — the quotient is truncated toward zero and any remainder is shown separately. Dividing 1010 (10) by 11 (3) gives a quotient of 11 (3) and a remainder of 1.
How do I convert between binary, decimal, hex and octal?
Each hex digit maps to exactly 4 binary bits and each octal digit to 3 bits, which is why programmers use them as binary shorthand. Enter a number in any base here and the other three representations appear automatically.
Guides for Binary Calculator
Related tools
Scientific Calculator
Free online scientific calculator with sin, cos, tan in degrees or radians, log, ln, powers, roots, π, e, parentheses, memory keys and keyboard support.
Unit Converter
Convert between units of length, weight, temperature, area, volume, speed, time and data storage instantly, with a swap button and common conversion tables.
Base64 Encoder
Encode text or files to Base64 instantly in your browser. UTF-8 safe, with a URL-safe Base64 option, copy and download. Free online Base64 encoder.
Percentage Calculator
Calculate what X% of a number is, what percent one number is of another, and percentage increase or decrease between two values — instantly and free.