Binary Calculator
Perform binary arithmetic (add, subtract, multiply, divide) and convert between binary, decimal, hex, and octal.
Inputs
Results
Binary Number System
Binary is base-2, using only 0 and 1. Each position represents a power of 2. Binary is the foundation of all digital computing. Conversion: 1010₂ = 1×8 + 0×4 + 1×2 + 0×1 = 10₁₀.
| Decimal | Binary | Hex |
|---|---|---|
| 0 | 0000 | 0 |
| 10 | 1010 | A |
| 15 | 1111 | F |
| 255 | 11111111 | FF |
What is the Binary Calculator?
The Binary Calculator allows computer science students and network engineers to perform mathematical operations (+, -, *, /) directly on base-2 binary numbers (ones and zeros) without manually converting them to decimals first.
How It Works (Algorithm)
The calculator uses boolean logic gates (AND, OR, XOR) and carry-over algorithms to simulate the ALU (Arithmetic Logic Unit) of a CPU. For instance, in binary addition: 1 + 1 equals 10 (which represents "0, carry the 1").
$$ 1010_2 + 110_2 = 10000_2 $$
A standard base-2 arithmetic operation.
How to Use It
Input your first binary number, select the mathematical operator, and input your second binary number. Click calculate to instantly generate the binary result, as well as its decimal and hexadecimal equivalents.