Due date: On or before Monday, March 31, 2025 Absolutely no copying others’ works |
Name: Professor Hu |
Iteration | Multiplicand | Carry | Product = HI, LO | |
---|---|---|---|---|
0 | Initialize (LO=Multiplier, HI=0) | 101011 | 000000 110101 | |
1 | LO[0]=1 ⇒ Add. | 0 | 000000 110101 + 101011 000000 101011 110101 |
|
Shift product right by 1 bit. | 101011 | 010101 111010 | ||
2 | LO[0]=0 ⇒ Do nothing. | |||
Shift product right by 1 bit. | 101011 | 001010 111101 | ||
3 | LO[0]=1 ⇒ Add. | 0 | 001010 111101 + 101011 000000 110101 111101 |
|
Shift product right by 1 bit. | 101011 | 011010 111110 | ||
4 | LO[0]=0 ⇒ Do nothing. | |||
Shift product right by 1 bit. | 101011 | 001101 011111 | ||
5 | LO[0]=1 ⇒ Add. | 0 | 001101 011111 + 101011 000000 111000 011111 |
|
Shift product right by 1 bit. | 101011 | 011100 001111 | ||
6 | LO[0]=1 ⇒ Add. | 1 | 011100 001111 + 101011 000000 000111 001111 |
|
Shift product right by 1 bit. | 101011 | 100011 100111 |
538×658 =
1010112×1101012 =
43×53 = 2279 = 100011 1001112
Iteration | Remainder | Divisor | Difference | Quotient | |
---|---|---|---|---|---|
0 | Initialize | 000000 111110 | 001011 000000 | 000000 | |
1 | 1: SHR, SHL, Difference | 000000 111110 | 000101 100000 | 000000 111110 – 000101 100000 ⇓ 000000 111110 + 111010 100000 111011 011110 |
000000 |
2: Diff<0 ⇒ Do Nothing | |||||
2 | 1: SHR, SHL, Difference | 000000 111110 | 000010 110000 | 000000 111110 – 000010 110000 ⇓ 000000 111110 + 111101 010000 111110 001110 |
000000 |
2: Diff<0 ⇒ Do Nothing | |||||
3 | 1: SHR, SHL, Difference | 000000 111110 | 000001 011000 | 000000 111110 – 000001 011000 ⇓ 000000 111110 + 111110 101000 111111 100110 |
000000 |
2: Diff<0 ⇒ Do Nothing | |||||
4 | 1: SHR, SHL, Difference | 000000 111110 | 000000 101100 | 000000 111110 – 000000 101100 ⇓ 000000 111110 + 111111 010100 |
000000 |
2: Diff≥0 ⇒ Rem=Diff, set lsb Quotient | 000000 010010 | 000001 | |||
5 | 1: SHR, SHL, Difference | 000000 010010 | 000000 010110 | 000000 010010 – 000000 010110 ⇓ 000000 010010 + 111111 101010 111111 111100 |
000010 |
2: Diff<0 ⇒ Do Nothing | |||||
6 | 1: SHR, SHL, Difference | 000000 010010 | 000000 001011 | 000000 010010 - 000000 001011 ⇓ 000000 010010 + 111111 110101 |
000010 |
2: Diff≥0 ⇒ Rem=Diff, set lsb Quotient | 000000 000111 | 000101 |
768÷138 =
1111102÷0010112 =
62÷11 ⇒ Q: 5 = 0001012 and R: 7 = 000000 0001112