.. . .
..
1. 1 1 1 0 1 ——余数为负,商为0 1. 1 1 0 1 0 ——余数和商左移一位(00) +[b]补 0. 1 1 0 0 1
0. 1 0 0 1 1 ——商为1 1. 0 0 1 1 0 ——(001) +[-b]补 1. 0 0 1 1 1 0. 0 1 1 0 1 ——商为1 0. 1 1 0 1 0 ——(0011) +[-b]补 1. 0 0 1 1 1
0. 0 0 0 0 1 ——商为1 0. 0 0 0 1 0 ——(00111) +[-b]补 1. 0 0 1 1 1
1. 0 1 0 0 1 ——商为0——(001110) 即:a÷b的商为0.01110;
余数为1.01001?2-5,因为1.01001为负数,加b处理为正数,
1.01001+b=1.01001+0.11001=0.00010,所以a÷b的余数为0.00010?2-5 所以,(x÷y)的商=-0.01110,原码为:1.01110;余数为0.00010 9、
(1)x=2-011?0.100101,y=2-010?(-0.011110)
EX=-011,Ey=-010,所以 [EX]补=1101,[Ey]补=1110
MX=0.100101,My=-0.011110,所以[MX]补=0.100101,[My]补=1.100010
. 学习参考 .
.. . .
..
[x]浮=1101 0.100101,[y]浮=1110 1.100010 EX 对阶后[x]浮=1110 0.010010(1),[y]浮=1110 1.100010 对阶后的尾数相加:MX+My=0.010010(1)+1.100010 0. 0 1 0 0 1 0 (1) + 1. 1 0 0 0 1 0 1. 1 1 0 1 0 0 (1) x+y=1.110100(1)?21110,化为规格化数(左移2位)为:x+y=1.010010?21100,即: x+y=-0.101110?2-4 对阶后的位数相减:MX-My=MX+(-My)=0.010010(1)+0.011110 0. 0 1 0 0 1 0 (1) + 0. 0 1 1 1 1 0 0. 1 1 0 0 0 0 (1) x-y=0.110000(1)?21110,已经是规格化数,采用0舍1入法进行舍入处理:x-y=0.110001?21110,即: x-y=0.110001?2-2 (2)x=2-101?(-0.010110),y=2-100?(0.010110) EX=-101,Ey=-100,所以 [EX]补=1011,[Ey]补=1100 MX=-0.010110,My=0.010110,所以[MX]补=1.101010,[My]补=0.010110 [x]浮=1011 1.101010,[y]浮=1100 0.010110 . 学习参考 . .. . . .. EX 对阶后[x]浮=1100 1.110101(0),[y]浮=1100 0.010110 对阶后的尾数相加:MX+My=1.110101+0.010110 1. 1 1 0 1 0 1 + 0. 0 1 0 1 1 0 0. 0 0 1 0 1 1 x+y=0.001011?21100,化为规格化数(左移2位)为:x+y=0.101100?21010,即: x+y=0.101100?2-6 对阶后的位数相减:MX-My=MX+(-My)=1.110101+1.101010 1. 1 1 0 1 0 1 + 1. 1 0 1 0 1 0 1. 0 1 1 1 1 1 x-y=1.011111?21100,已经是规格化数,所以 x-y=-0.100001?2-4 10、 13????9??(1) ?23????24????? 16????16??13?1101?2?4?0.110100,Ex=0011 169My=???1001?2?4??0.100100,Ey=0100 16Mx= Ex+Ey=0011+0100=0111 [x?y]符=0?1=1,乘积的数值=|Mx|?|My|: 0. 1 1 0 1 . 学习参考 . .. . . .. ? 0. 1 0 0 1 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 1 1 1 0 1 0 1 所以,x?y =-0.01110101?20111,规格化处理(左移一位),并采用0舍1入法进行舍入: x?y =-0.111011?20110 13????9??即:?23????24?????=-0.111011?26 16????16?? 13??15??(2) ?2?2????23?? 32??16??将x、y化为规格化数: 13?1101?2?5?0.011010,Ex=1110 3215My=?1111?2?4?0.111100,Ey=0011 16Mx= Ex-Ey=Ex+(-Ey)=1110+1101=1011 [x?y]符=0?0=0,下面用加减交替法计算尾数Mx?My: [Mx]补=0.011010,[My]补=0.111100,[-My]补=1.000100 0. 0 1 1 0 1 0 . 学习参考 .