我正在尝试学习二进制乘法,2 的补码负数。
-10
x 3
我知道有一种简单的方法可以做到这一点。像符号扩展和初始部分产品。
-10 0110 twos complement
x 3 x 0011
---- ------
000000 (initial partial product) with sign extension at the MSB
10110 (bit 0 of the 3 times 10, sign extended at MSB)
110110 (sign extended sum of initial partial product and
Multiplicand)
10110- (bit 1 of the 3 multiplied by the 10. sign extension at the MSB Note the
Multiplicand is shifted left by one bit)
我不知道如何继续。我什至不确定我是否完全正确。有人可以告诉我如何逐步做到这一点吗?我不想做任何其他方式。如果我这样做,大数字可能会很糟糕。谢谢