Binary Multiplication Calculator

Multiply two binary numbers using the same partial‑product method as decimal. Perfect for computer arithmetic and digital logic design.

Binary Multiplication Rules: 0 × 0 = 0, 0 × 1 = 0, 1 × 0 = 0, 1 × 1 = 1. Partial products are shifted and added (just like decimal).

First factor.
Second factor.
1010 × 1101 (10×13)
111 × 101 (7×5)
1100 × 1011 (12×11)
1001 × 11 (9×3)
1111 × 111 (15×7)
101101 × 101 (45×5)
Calculating...

Understanding Binary Multiplication

Binary multiplication is simpler than decimal because you only multiply by 0 or 1. It follows the same partial product method used in elementary school, but in base‑2.

? Manual Method (Long Multiplication)

Let’s multiply 1010₂ (10) by 1101₂ (13). We multiply each digit of the multiplier by the multiplicand, shift left accordingly, and then add all partial products.

         1 0 1 0   (10)
       × 1 1 0 1   (13)
       ---------
         1 0 1 0   (1010 × 1, shift 0)   →   1010
       0 0 0 0     (1010 × 0, shift 1)   →  00000  (shown as 00000)
       1 0 1 0     (1010 × 1, shift 2)   → 101000
       1 0 1 0     (1010 × 1, shift 3)   →1010000
       -------------------  (binary addition)
       1 0 0 0 0 0 1 0   (130)
                        

Each partial product is shifted left (appended zeros) according to the multiplier bit position. Then all partial products are added using binary addition, which may generate carries.

? Another Detailed Example: 111 × 101

Compute 111₂ (7) × 101₂ (5):

         1 1 1   (7)
       × 1 0 1   (5)
       ---------
         1 1 1   (111 × 1, shift 0)   →    111
       0 0 0     (111 × 0, shift 1)   →   0000  (written as 0000 for alignment)
       1 1 1     (111 × 1, shift 2)   →  11100
       -----------------  addition
       1 0 0 0 1 1   (35)   ← verification: 7×5=35
                        

Detailed addition: from rightmost column to leftmost: 1+0+0=1; next: 1+0+0=1; next: 1+0+1=0 carry 1; then carry 1+0+1=0 carry 1; finally carry 1+0+0=1 → 100011₂ = 35.

⚙️ Algorithm Steps

  1. Start from the least significant bit (rightmost) of the multiplier.
  2. If the current bit is 1, write down the multiplicand (shifted left by the bit position).
  3. If the current bit is 0, write a row of zeros (or simply skip, but alignment is important).
  4. Add all the partial products using binary addition (carry propagation).

?️ Hardware Implementation

In digital circuits, multiplication is often performed by a shift‑and‑add algorithm. A simple multiplier examines each bit of the multiplier; if the bit is 1, the shifted multiplicand is added to an accumulator. This process is the foundation of arithmetic logic units (ALUs) in CPUs.

Calculator Features:

  • ✅ Input validation (only digits 0 and 1 allowed).
  • ✅ Handles binary numbers up to 52 bits (JavaScript safe integer range).
  • ✅ Displays binary product and decimal equivalent for easy verification.
  • ✅ Example buttons provide quick tests of common multiplications.

❓ Frequently Asked Questions

Since JavaScript integers are safe up to 2⁵³‑1, the decimal product must not exceed that. For binary inputs, the product length should stay below about 52 bits. This is sufficient for most educational examples.

Shifting reflects the place value (weight) of each multiplier bit. The bit at position n (from the right) represents 2ⁿ, so the corresponding partial product must be multiplied by 2ⁿ, which is a left shift by n bits. This is analogous to how we shift in decimal multiplication (e.g., multiplying by the tens digit shifts left one place).

In theory, yes, because adding zero does not change the sum. However, for clarity and to maintain column alignment, it is common to write them as rows of zeros. Our calculator performs direct numeric multiplication and does not display intermediate rows, but you can imagine them during manual calculation.