综述
记一次介绍Booth 算法思想的答疑.
正文
Here I give the idea and explanation of the algorithm.
First, let me introduce the idea:
Consider the multiplication of 1101(multiplicand) and 1110 (multiplier).

If a multiplier has many non-zero bits 10, then the number of operations will be more (we do not like this : | )
The Booth algorithm solves this problem well. Since addition will multiply so many times, why not use subtraction. Actually, the above 1110 can be written as 10000-10, then you can get the result by multiplying twice (note there are only two 1s) and then do subtracting, so this is the principle of Booth’s algorithm.
Then, let me explain how the algorithm is derived.
You can identify the number by identifying 0-1 and 1-0 transitions.
During this process, do not forget the shift to make sure when we perform operations, these bits are aligned.
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/224375.html原文链接:https://javaforall.net
