First let analyse the base 10 multiplication of the numbers: N110 = 702 and N210 = 36.
We calculate the numbers by two steps as follow:
| Step - 1 |
|
Step - 2 |
|
|
7 |
0 |
2 |
|
|
7 |
0 |
2 |
|
| × |
|
|
6 |
|
× |
|
|
3 |
|
| | |
| 4 |
2 |
1 |
2 |
|
2 |
1 |
0 |
6 |
|
Adding the two steps results as described at the next step:
| N110 = |
|
|
7 |
0 |
2 |
|
| N210 = |
× |
|
|
3 |
6 |
|
| | |
|
|
4 |
2 |
1 |
2 |
|
|
2 |
1 |
0 |
6 |
|
|
| | |
| N110 × N210 = |
2 |
5 |
2 |
7 |
2 |
|
The same calculation process is performed on the multiplication of other numbers in any base, for example find the multiplication of the two base 4 numbers where N14 = 1301 and N24 = 203.
| STEP 1 |
|
| 1 × 3 = 3 |
| 0 × 3 = 0 |
| 3 × 3 = 9 / 4 → remain = 1, carry = 2 |
| 1 × 3 = 3 + carry = 5 / 4 = remain 1 carry 1 |
|
| STEP 2 |
|
| 1 × 0 = 0 |
| 0 × 0 = 0 |
| 3 × 0 = 0 |
| 1 × 0 = 0 |
|
| STEP 3 |
|
| 1 × 2 = 2 |
| 0 × 2 = 0 |
| 3 × 2 = 6 / 4 → remain = 2, carry = 1 |
| 1 × 2 = 2 + carry = 3 |
|
And the multiplication is equal to:
| N14 = |
|
|
1 |
3 |
0 |
1 |
| N24 = |
|
|
|
2 |
0 |
3 |
| | |
|
|
1 |
1 |
1 |
0 |
3 |
|
|
0 |
0 |
0 |
0 |
|
|
3 |
2 |
0 |
2 |
|
|
| |
| N14 × N24 = |
3 |
3 |
1 |
3 |
0 |
3 |
Now we will examine the multiplication of two binary numbers, N12 = 11001 and N22 = 101.
The multiplication rules can be found in the table
| STEP 1 |
|
| 1 × 1 = 1 |
| 0 × 1 = 0 |
| 0 × 1 = 0 |
| 1 × 1 = 1 |
| 1 × 1 = 1 |
|
| STEP 2 |
|
| 1 × 0 = 0 |
| 0 × 0 = 0 |
| 0 × 0 = 0 |
| 1 × 0 = 0 |
| 1 × 0 = 0 |
|
And the multiplication is equal to:
| N12 = |
|
|
1 |
1 |
0 |
0 |
1 |
| N22 = |
|
|
|
|
1 |
0 |
1 |
| |
|
|
|
1 |
1 |
0 |
0 |
1 |
|
|
0 |
0 |
0 |
0 |
0 |
|
|
1 |
1 |
0 |
0 |
1 |
|
|
| |
| N12 × N22 = |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
Notice: that a left shift of bits is equivalent to multiplying the number by 2, each time a left shift is performed, see the following table:
| Decimal |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
Value |
| |
|
0 |
0 |
0 |
0 |
0 |
1 |
1 |
3 |
| |
|
0 |
0 |
0 |
0 |
1 |
1 |
0 |
6 |
| |
|
0 |
0 |
0 |
1 |
1 |
0 |
0 |
12 |
| |
|
0 |
0 |
1 |
1 |
0 |
0 |
0 |
24 |
| |
|
0 |
1 |
1 |
0 |
0 |
0 |
0 |
48 |
| |
|
1 |
1 |
0 |
0 |
0 |
0 |
0 |
96 |
The same way a right shift is equivalent to dividing the number by 2.