Binary Calculator
Perform logic and arithmetic operations on binary numbers (base-2).
What is Binary?
Binary (Base-2) is the number system used by computers. It uses only two digits: 0 and 1. Each digit represents a power of 2.
Example: 1011 = (1ร8) + (0ร4) + (1ร2) + (1ร1) = 11 in Decimal.
Binary Arithmetic
- Addition: 1+0=1, 1+1=10 (0 carry 1).
- Subtraction: 1-0=1, 10-1=1.
- Multiplication: Same as decimal but easier (only 1s and 0s).
Bitwise Operations
- AND (&): 1 & 1 = 1. Any other combo = 0.
- OR (|): 0 | 0 = 0. Any other combo = 1.
- XOR (^): 1 ^ 0 = 1. Same bits = 0.
Frequently Asked Questions
Why do computers use binary?
It's easy to represent physically using transistors (On/Off switches).