Binary Calculator
Perform arithmetic operations in Binary number system. Enter two binary numbers and select an operation.
About Binary Calculator
The Binary Calculator allows you to perform addition, subtraction, multiplication, and division operations directly in the binary number system without converting to decimal first.
How the Binary Calculator Works
A binary calculator performs arithmetic operations — addition, subtraction, multiplication, and division — directly on base-2 numbers. Instead of carrying at 10 (as in decimal), binary arithmetic carries at 2. This is exactly how your computer's processor performs every calculation at the hardware level.
- Enter two binary numbers (using only 0s and 1s)
- Select an operation: +, −, ×, or ÷
- The calculator converts both to decimal, performs the operation, and converts the result back to binary
Binary Arithmetic Rules
Addition: 0+0=0, 0+1=1, 1+0=1, 1+1=10 (0 carry 1)
Subtraction: 0−0=0, 1−0=1, 1−1=0, 10−1=1 (borrow from next column)
Multiplication: 0×0=0, 0×1=0, 1×0=0, 1×1=1
Division: Same long division as decimal, but only with 0 and 1
Worked Example: 1010 + 1101
1010 (10 in decimal)
+ 1101 (13 in decimal)
------
Column 0 (rightmost): 0+1 = 1
Column 1: 1+0 = 1
Column 2: 0+1 = 1
Column 3: 1+1 = 10 → write 0, carry 1
Column 4: carry 1
Result: 10111₂ = 23₁₀
Verification: 10 + 13 = 23 ✓
Technical Details
Binary arithmetic is the foundation of all digital computation. CPUs use binary adders built from logic gates (AND, OR, XOR) to perform addition, and derive subtraction using two's complement representation. Multiplication is implemented as repeated addition with bit shifting, and division as repeated subtraction. This calculator performs integer arithmetic — the division operation returns the integer quotient (floor division). Results are limited by JavaScript's safe integer range (2⁵³ − 1).
Frequently Asked Questions
What is 1111 + 1 in binary?
1111 + 1 = 10000. In decimal, this is 15 + 1 = 16. The carry propagates through all four columns.
How does binary subtraction work?
Binary subtraction uses borrowing, just like decimal. When subtracting 1 from 0, you borrow from the next column (making it 10 − 1 = 1 in binary). Computers typically use two's complement to convert subtraction into addition.
Can binary numbers be negative?
In computing, negative binary numbers are represented using two's complement: invert all bits and add 1. For example, −5 in 8-bit two's complement is 11111011. This calculator works with unsigned (positive) integers.
What is binary multiplication?
Binary multiplication follows the same process as long multiplication in decimal, but simpler — each partial product is either 0 (multiply by 0) or a shifted copy of the multiplicand (multiply by 1). For example, 101 × 11 = 101 + 1010 = 1111 (5 × 3 = 15).