No Login Data Private Local Save

Binary Calculator - Online Add Subtract Multiply Binary Numbers

17
0
0
0

Binary Calculator

Add, Subtract, Multiply & Bitwise Operations on Binary Numbers

Decimal: 0 0 bits
+ +
Decimal: 0 0 bits
|
Click an input field to set focus, then use quick buttons or type directly
Result
0
Decimal: 0 Hex: 0x0 Octal: 0o0
0₂ + 0₂ = 0₂
Frequently Asked Questions

Binary addition follows rules similar to decimal addition: 0+0=0, 0+1=1, 1+0=1, and 1+1=0 with a carry of 1 to the next higher bit. When 1+1+1 (including a carry), the result is 1 with a carry of 1. Always start from the least significant bit (rightmost) and work leftward, propagating carries as needed.

Binary subtraction uses borrowing similar to decimal: 0−0=0, 1−0=1, 1−1=0, and 0−1 requires borrowing 1 from the next higher bit (making it 10₂−1=1). If the minuend is smaller than the subtrahend, the result is negative and represented with a minus sign prefix (e.g., −101₂).

Binary multiplication follows the same shift-and-add method as decimal multiplication. Multiply each bit of the multiplier by the multiplicand, shifting left for each successive bit position, then sum all partial products. Since bits are only 0 or 1, each partial product is either all zeros or the multiplicand itself (shifted appropriately).

AND (&) returns 1 only if both corresponding bits are 1. OR (|) returns 1 if at least one bit is 1. XOR (^) returns 1 if the bits are different. These operations work bit-by-bit on aligned binary numbers and are fundamental in digital logic, cryptography, and low-level programming.

A dedicated binary calculator eliminates conversion errors, provides instant results in multiple bases (binary, decimal, hexadecimal, octal), and helps verify manual calculations. It's invaluable for students learning computer science, engineers debugging bit-level operations, and anyone working with binary data.

This calculator supports binary inputs up to 64 bits in length and uses JavaScript's BigInt for arbitrary-precision integer arithmetic. Results can exceed 64 bits, and negative results from subtraction are displayed with a minus sign prefix.