Due date: On or before Monday, March 25, 2024 Absolutely no copying others’ works |
Name: _____Professor Hu_____ |
Iteration | Multiplicand | Multiplier | Product | |
---|---|---|---|---|
0 | Initialize | 000000 111011 | 011101 | 000000 000000 |
1 | Multiplier[0]=1 ⇒ ADD | 000000 000000 + 000000 111011 000000 111011 |
||
SHL Multiplicand and SHR Multiplier | 000001 110110 | 001110 | ||
2 | Multiplier[0]=0 ⇒ Do nothing. | 000000 111011 | ||
SHL Multiplicand and SHR Multiplier | 000011 101100 | 000111 | ||
3 | Multiplier[0]=1 ⇒ ADD | 000000 111011 + 000011 101100 000100 100111 |
||
SHL Multiplicand and SHR Multiplier | 000111 011000 | 000011 | ||
4 | Multiplier[0]=1 ⇒ ADD | 000100 100111 + 000111 011000 001011 111111 |
||
SHL Multiplicand and SHR Multiplier | 001110 110000 | 000001 | ||
5 | Multiplier[0]=1 ⇒ ADD | 001011 111111 + 001110 110000 011010 101111 |
||
SHL Multiplicand and SHR Multiplier | 011101 100000 | 000000 | ||
6 | Multiplier[0]=0 ⇒ Do nothing. | 011010 101111 | ||
SHL Multiplicand and SHR Multiplier | 111011 000000 | 000000 |
Iteration | Remainder | Quotient | Divisor | Difference | |
---|---|---|---|---|---|
0 | Initialize | 000000 | 111101 | 001011 | |
1 | Shift left; Difference | 000001 | 111010 | 001011 | 000001 – 001011 110110 < 0 |
Difference < 0 ⇒ Do nothing. |
|||||
2 | Shift left; Difference | 000011 | 110100 | 001011 | 000011 – 001011 111000 < 0 |
Difference < 0 ⇒ Do nothing. |
|||||
3 | Shift left; Difference | 000111 | 101000 | 001011 | 000111 – 001011 111100 < 0 |
Difference < 0 ⇒ Do nothing. |
|||||
4 | Shift left; Difference | 001111 | 010000 | 001011 | 001111 – 001011 000100 ≥ 0 |
Rem = Diff; Set lsb of quotient. | 000100 | 010001 | |||
5 | Shift left; Difference | 001000 | 100010 | 001011 | 001000 – 001011 111101 < 0 |
Difference < 0 ⇒ Do nothing. |
|||||
6 | Shift left; Difference | 010001 | 000100 | 001011 | 010001 – 001011 000110 ≥ 0 |
Rem = Diff; Set lsb of quotient. | 000110 | 000101 |