Multiply two binary numbers exactly, at any length. Binary long multiplication only ever multiplies by 0 or 1, making it shift-and-add – which is exactly how simple ALUs do it.
Show calculation steps
Processed privately in your browser — nothing you paste is uploaded, logged or stored.
Shift and add
Binary long multiplication is degenerate in the best way: each multiplier bit is 0 or 1, so every partial product is either zero or the multiplicand shifted left. Multiplication reduces to shifts and additions — which is literally how simple ALUs and your compiler’s strength-reduction perform it.
The result length is bounded by the sum of operand lengths, the fact behind 32×32→64-bit hardware multiply instructions.
Worked example
1011 × 101 bit 0 of 101 is 1: partial 1011 bit 1 is 0: partial 0 bit 2 is 1: partial 1011 << 2 = 101100 1011 + 101100 = 110111 (11 × 5 = 55 ✓)
The compiler connection
x × 10 becomes (x<<3)+(x<<1); x × 7 becomes (x<<3)−x. Recognising products as shift-sums is a two-way street: it explains generated assembly, and it lets you hand-optimise where it still matters (embedded ISRs, shader inner loops).
Exactness at scale
Two 100-bit operands multiply to an exact ≤200-bit product — BigInt, no float anywhere. Fixed-width truncation of a product is a deliberate act, available via the Bit Width Converter when you want to model register behaviour.
Privacy
Products are computed in your browser only.
Shift and add
Binary multiplication is the school method with the easiest possible times table: each partial product is either the whole first operand or zero, shifted left by the position of the current bit. Multiplying 101 by 11 produces the partial products 101 and 1010, which add to 1111 — five times three is fifteen. Multiplying by two is just a left shift, and in general an n-bit number times an m-bit number needs at most n + m bits, which is why 32-bit multipliers produce 64-bit results in hardware. This calculator’s exact arithmetic means no length limit and no overflow.
How to use the Binary Multiplication Calculator
- Enter the two binary factors.
- Click "Multiply".
- The steps explain shift-and-add: each 1 bit of the multiplier contributes a shifted copy of the multiplicand.
- The decimal line cross-checks the product.
Frequently asked questions
Why is binary long multiplication so simple?
Each multiplier digit is 0 or 1, so every partial product is either zero or the multiplicand shifted left – no times-tables at all. 1011 × 101 = 1011 + 1011<<2 = 110111 (11 × 5 = 55).
How does this relate to bit shifts?
Multiplying by 2ⁿ IS shifting left n places, so multiplication decomposes into shifts and adds. Compilers exploit exactly this: ×10 becomes (x<<3)+(x<<1).
How long can the product be?
At most the sum of the factor lengths: an m-bit times n-bit product fits in m+n bits. That bound is why 32×32-bit hardware multiplies produce 64-bit results.
Does the calculator overflow?
No – unbounded BigInt precision. Fixed-width truncation (what a CPU register does) is a separate concern you can explore by narrowing the result with the Bit Width Converter.
Can I multiply negative binary numbers?
Signed magnitudes work: -101 × 11 gives -1111 (−5×3=−15). Hardware's two's-complement multiplication is equivalent arithmetic at fixed width.
What is the fastest hand method?
Write shifted copies of the multiplicand for each 1 bit, then add them in pairs – fewer, wider additions beat many narrow ones for accuracy. The steps list exactly which shifts your multiplier demands.
Where is the multiplication executed?
In your browser – factors and product stay on the page.