1011 × 101 — binary arithmetic
coreshift and add
Answer
000000110111
Why this example is worth doing
Binary long multiplication, which is easier than decimal because every partial product is either the multiplicand or zero — there is no multiplication table. The whole operation is shift and add, and that is exactly how a hardware multiplier works. The page aligns the partial products with their shifts visible, and gives the decimal check: eleven times five is fifty-five.
Try your own input in the Binary arithmetic. Add, subtract, multiply and divide in binary with every carry and borrow shown.
How the answer is reached
001011 x 000101 (6-bit unsigned)
| operand | bits | hex | unsigned | signed |
|---|---|---|---|---|
| A | 001011 | 0x0B | 11 | 11 |
| B | 000101 | 0x05 | 5 | 5 |
Shift and add: one partial product per multiplier bit, each shifted left by its bit index. A 6 x 6 multiply needs 12 bits of product.
| bit index | multiplier bit | partial product | meaning |
|---|---|---|---|
| 0 | 1 | 000000001011 | |A| << 0 |
| 1 | 0 | 000000000000 | 0 (multiplier bit is 0) |
| 2 | 1 | 000000101100 | |A| << 2 |
| 3 | 0 | 000000000000 | 0 (multiplier bit is 0) |
| 4 | 0 | 000000000000 | 0 (multiplier bit is 0) |
| 5 | 0 | 000000000000 | 0 (multiplier bit is 0) |
sum of partial products000000110111
product000000110111 = 55