Booth's multiplication algorithm: Difference between revisions

Content deleted Content added
m Reverting possible vandalism by 2409:4072:E9A:FF1B:34B1:8664:6F21:8505 to version by 2A00:23C5:D184:500:42A:D4DD:4A2F:828C. Report False Positive? Thanks, ClueBot NG. (4061950) (Bot)
Line 45:
* The product is 1111 0100, which is −12.
 
The above-mentioned technique is inadequate when the multiplicand is the [[two's complement#Most negative number|most negative number]] that can be represented (e.g. if the multiplicand has 4 bits then this value is −8). One possible correction to this problem is to add one more bit to the left of A, S, and P. This then follows the implementation described above, with modifications in determining the bits of A and S; e.g., the value of '''m''', originally assigned to the first ''x'' bits of A, will be assigned to the first ''x''+1 bits of A. Below, the improved technique is demonstrated by multiplying −8 by 2 using 4 bits for the multiplicand and the multiplier:
* A = 1 1000 0000 0
* S = 0 1000 0000 0