答案 0 :(得分:1)
示例乘法。注4位加法器产生5位和(最高位为进位)。加法器的输入是乘法器加上乘积寄存器的第3到6位,包括进位在内,总和到产品寄存器的第3到7位。
multiplicand 1100, multiplier 0101
7 6 5 4 3 2 1 0 product bit index
0 0 0 0 0 1 0 1 initial 8 bit register
0 0 0 0 0 0 1 0 1 shift right, 1 bit shifted out
1 1 0 0 add multiplicand
0 1 1 0 0 0 1 0
0 0 1 1 0 0 0 1 0 shift right, 0 bit shifted out
0 0 0 0 no add
0 0 1 1 0 0 0 1
0 0 0 1 1 0 0 0 1 shift right, 1 bit shifted out
1 1 0 0 add multiplicand
0 1 1 1 1 0 0 0
0 0 1 1 1 1 0 0 0 shift right, 0 bit shifted out
0 0 0 0 no add
0 0 1 1 1 1 0 0
multiplicand 1111, multiplier 1111
0 0 0 0 1 1 1 1 initial 8 bit register
0 0 0 0 0 1 1 1 1 shift right, 1 bit shifted out
1 1 1 1 add multiplicand
0 1 1 1 1 1 1 1
0 0 1 1 1 1 1 1 1 shift right, 1 bit shifted out
1 1 1 1 add multiplicand
1 0 1 1 0 1 1 1
0 1 0 1 1 0 1 1 1 shift right, 1 bit shifted out
1 1 1 1 add multiplicand
1 1 0 1 0 0 1 1
0 1 1 0 1 0 0 1 1 shift right, 1 bit shifted out
1 1 1 1 add multiplicand
1 1 1 0 0 0 0 1