|
Due date: On or before Wednesday, April 01, 2026 Absolutely no copying others’ works |
Name: _____Professor Hu_____ |
| Iteration | Multiplicand | Multiplier | Product | |
|---|---|---|---|---|
| 0 | Initialize | 000000 101011 | 111101 | 000000 000000 |
| 1 | Multiplier[0]=1 ⇒ ADD | 000000 000000 + 000000 101011 000000 101011 |
||
| SHL Multiplicand and SHR Multiplier | 000001 010110 | 011110 | ||
| 2 | Multiplier[0]=0 ⇒ Do nothing. | 000000 101011 | ||
| SHL Multiplicand and SHR Multiplier | 000010 101100 | 001111 | ||
| 3 | Multiplier[0]=1 ⇒ ADD | 000000 101011 + 000010 101100 000011 010111 |
||
| SHL Multiplicand and SHR Multiplier | 000101 011000 | 000111 | ||
| 4 | Multiplier[0]=1 ⇒ ADD | 000011 010111 + 000101 011000 001000 101111 |
||
| SHL Multiplicand and SHR Multiplier | 001010 110000 | 000011 | ||
| 5 | Multiplier[0]=1 ⇒ ADD | 001000 101111 + 001010 110000 010011 011111 |
||
| SHL Multiplicand and SHR Multiplier | 010101 100000 | 000001 | ||
| 6 | Multiplier[0]=1 ⇒ ADD | 010011 011111 + 010101 100000 101000 111111 |
||
| SHL Multiplicand and SHR Multiplier | 101011 000000 | 000000 | ||
538×758 =
1010112×1111012 =
43×61 = 2623 = 101000 1111112
| Iteration | Remainder | Quotient | Divisor | Difference | |
|---|---|---|---|---|---|
| 0 | Initialize | 000000 | 111011 | 001001 | |
| 1 | Shift left; Difference | 000001 | 110110 | 001001 | 000001 – 001001 ⇓ 000001 + 110111 111000 < 0 |
Difference < 0 ⇒ Do nothing. |
|||||
| 2 | Shift left; Difference | 000011 | 101100 | 001001 | 000011 – 001001 ⇓ 000011 + 110111 111010 < 0 |
Difference < 0 ⇒ Do nothing. |
|||||
| 3 | Shift left; Difference | 000111 | 011000 | 001001 | 000111 – 001001 ⇓ 000111 + 110111 111110 < 0 |
Difference < 0 ⇒ Do nothing. |
|||||
| 4 | Shift left; Difference | 001110 | 110000 | 001001 | 001110 – 001001 ⇓ 001110 + 110111 |
| Rem = Diff; Set lsb of quotient. | 000101 | 110001 | |||
| 5 | Shift left; Difference | 001011 | 100010 | 001001 | 001011 – 001001 ⇓ 001011 + 110111 |
| Rem = Diff; Set lsb of quotient. | 000010 | 100011 | |||
| 6 | Shift left; Difference | 000101 | 000110 | 001001 | 000101 – 001001 ⇓ 000101 + 110111 111100 < 0 |
Difference < 0 ⇒ Do nothing. |
|||||
738÷118 =
1110112÷0010012 =
59÷9 ⇒ Q: 6 = 0001102 and R: 5 = 0001012