6.20用原码一位乘法、两位乘法和补码一位乘法(Booth算法)和两位乘法计算x+y。
原码一位乘法x?00.110111部分积00.000000?00.00000000.00000000.000000?00.11011100.11011100.011011?00.11011101.01001000.101001?00.11011101.10000000.110000?00.00000000.11000000.011000?00.11011101.00111100.100111高位积补码一位乘法y??0.101110乘数附加位101110?0010111右移一位?x101011右移一位?x010101右移一位?x001010右移一位?0000101右移一位?x100010右移一位低位积[?x]补?1.001001部分积00.000000?00.00000000.00000000.000000?11.00100111.00100111.100100?00.11011100.01101100.001101?00.00000000.00110100.000110?11.00100111.00111111.100111?00.11011100.01111000.001111?11.00100111.011000[y]补?1.010010乘数附加位1.0100100?001010010右移一位?[?x]补
10101001右移一位?[x]补11010100右移一位?011101010右移一位?[?x]补11110101右移一位?[x]补01111010右移一位?[?x]补原码两位乘法[?x]补?1.001001部分积000.000000?001.101110001.101110000.011011?111.001001111.100100111.111001?111.001001111.000010111.110000?000.110111000.100111100010001001000101100010110y??0.101110乘数Cj001011100?2x右移两位?[?x]补右移两位?[?x]补右移两位?[x]补补码两位乘法[x]补?000.110111[?x]补?111.001001[y]补?11.0100102[x]补?000.1011102[?x]补?110.010010
部分积乘数Yn?1000.00000011.0100100?110.010010110.010010111.100100?000.110111000.011011000.000110?000.110111000.111101000.001111?111.001001111.011000011110110111011010101101001?2[?x]补右移两位?[x]补右移两位?[x]补右移两位?[?x]补6.21用原码加减交替和补码加减交替计算x+y。
原码加减交替x?0.100111[?Y]补?1.010101y?0.101011补码加减交替[x]补?0.100111[?y]补?1.010101被除数(余数)00.100111?11.01010111.11110011.111000?00.10101100.10001100.000110?11.01010111.01101111.110110?00.10101100.10000100.000010?11.01010111.01011111.101110?00.10101100.01100100.110010?11.01010100.0001110.000010
被除数商0.1001110.000000?1.0101011.1111000.0000001.111000?0.1010110.1000110.000110?1.0101011.0110111.110110?0.1010110.1000010.000010?1.0101011.0101111.101110?0.1010110.0110010.110010?1.0101010.0001116.26 x?2?011[y]补?0.101011商0.0000000.0000000.0000000.0000010.0000100.0000100.0001000.0001010.0010100.0010100.0101000.0101010.1010100.1010110.0000010.0001010.0010100.0101010.101011?0.101100y?2?010?(?0.011100)
y?11.11011.100100
x?11.10100.1011001.对阶
?J?Jx?Jy?11.101?11.110?11.111?0
x?11.11000.0101100
2.尾数求和
?x?y?补?11.11000.010110011.111010?11.10010011.111010[x?y]补?11.11000.11001000.0101100?00.01110000.1100103.无舍入 4.规格化
[x?y]补?11.01111.010000[x-y]补?11.11000.110010