x * y = z
Operation rules:
1. The original code and a multiplication of different, complement a multiplication sign bit is participating in operation , and the result of the operation and all operations are participating in several complement form.
2. Multiplier x we take involved in computing the sign bit, 0 initial value of partial products;
Multiplier take a single symbol bit y involved in computing.
3. The first multiplier y at the end to add an auxiliary bit 0, every discussion is finally taking y of two , but every move only move one .
4. Analyzing y are the last two rules are as follows:
- 00 or 11 , the direct right one;
- 01 , the first increase x tween, and right one;
- 10 , the first increase -x complement, then right one.
5. There is a special case, not the final step in the right.
For chestnut:
Setting x = -0.1101, y = 0.1011
Then [x] fill = 11.0011, [- x] = 00.1101 Complement
A start initial partial product values: 00.0000
Give a fill sub bit y 0, y = 0.10110 give
First, start with the last two y's, 0.101 10 , 10, corresponding to the rules "before adding [-x] up, and then right one":
Partial product 00.0000 + 00.1101 = 00.1101, 00.01101 right to give a
Subsequently, y a right again, 0.10 11 0 to 11, corresponding to the rule "a direct right":
Partial product 00.001101
Then, y and then a right again, 0.1 01 10 01, corresponding to the rule "first add [x] fill, and then a right" :
00.001101 partial product
+ 11.0011 [x] Complement
--------------------
= 11.011001 partial product
Partial product 00.001101 11.011001 + = 11.0011, a right to give 11. The 1011001 ( Note the sign bit after the movement, remains 11 )
Subsequently, y and then look at a right 0. 10 10, 10, the mapping rules "before adding [the -X-] fill, and then a right" :
Partial product 11.1011001 00.1000001 + = 00.1101, a right to give 00.01000001
Finally, y and then look at the right one, 0.1 0110, to 01, corresponding to the rules "before adding [x] up, and then right one" :
Partial product 00.01000001 + 11.0011 = 11.01110001, but this is the last step, do not have the right ,
So the final result is 1.01110001 (Note: This is x * y's complement )