Booth Algorithm

来源:互联网 发布:mdn javascript 编辑:程序博客网 时间:2024/05/02 01:57

Booth Algorithm

<---
 00   no opration
 10   Prod = Prod - Mcand
 11   no opration
 01   Prod = Prod + Mcand

take 2 x 7 for example

     Opration      Multiplicand      Produced
0  initial value      0010          0000 0111 0

1   P = P - M         1110          1110 0111 0
      shift           0010          1111 0011 1
2   no opration       0010          1111 0011 1
      shift           0010          1111 1001 1
3   no opration       0010          1111 1001 1
      shift           0010          1111 1100 1
4   P = P + M         0010          0001 1100 1
      shift           0010          0000 1110 0

 

原创粉丝点击