Binary Calculator & Bitwise Operations
Perform arithmetic and bitwise logic on binary numbers. Real-time conversion to Hexadecimal, Decimal, and Octal with visual bit manipulation.
Result
About
Computers process information in binary (base-2). This calculator allows programmers and students to perform core arithmetic operations (Addition, Subtraction, Multiplication, Division) alongside low-level bitwise operations (AND, OR, XOR, NOT). It is essential for low-level programming, subnet masking, and understanding CPU architecture.
Unlike standard calculators, this tool processes inputs strictly as binary strings (0s and 1s) and provides simultaneous translations into Decimal (base-10), Hexadecimal (base-16), and Octal (base-8).
Formulas
For bitwise AND operation:
A = 10101
& B = 00101
-----------------
R = 00101
The value is calculated bit by bit. Decimal conversion uses the formula:
Value = ∑ (biti × 2i)
Reference Data
| Operator | Symbol | Logic | Example (4-bit) |
|---|---|---|---|
| AND | & | 1 if both bits are 1 | 1100 & 1010 = 1000 |
| OR | | | 1 if at least one bit is 1 | 1100 | 1010 = 1110 |
| XOR | ^ | 1 if bits are different | 1100 ^ 1010 = 0110 |
| NOT | ~ | Inverts all bits | ~1100 = 0011 |