资源描述
单击此处编辑母版标题样式,单击此处编辑母版文本样式,第二级,第三级,第四级,第五级,*,*,*,第二章课后习题答案,第,7,题,(,1,),x=0.11011,y=-0.11111,求,x,y,。,原码阵列乘法器,x=0.11011,y=-0.11111,符号位,:x,0,y,0,=01=1,x,原,=11011,y,原,=11111,部分积,乘数,最后结果:,x,y,原,=1.1101000101,0.0 0 0 0 0,y,f,1 1 1 1 1,z,0,=0,+,0.1 1 0 1 1,y,5,=1,+x,0.1 1 0 1 1,0.0 1 1 0 1 1,y,f,1 1 1 1,右移,得,z,1,+0.1 1 0 1 1,y,4,=1,+x,1.0 1 0 0 0,0.1 0 1 0 0 0 1,y,f,1 1 1,右移,得,z,2,+0.1 1 0 1 1,y,3,=1,+x,1.0 1 1 1 1,0.1 0 1 1 1 1 0 1,y,f,1 1,右移,得,z,3,+0.1 1 0 1 1,y,2,=1,+x,1.1 0 0 1 0,0.1 1 0 0 1 0 1 0 1,y,f,1,右移,得,z,4,+0.1 1 0 1 1 y,1,=1,+x,1.1 0 1 0 0,0.1 1 0 1 0 0 0 1 0 1,y,f,右移,得,z,5,=,x,y,补码阵列乘法器,x,补,=0.11011,y,补,=1.00001,符号位,:x,0,y,0,=01=1,算前求补输出:,|x|,=11011,|y|,=11111,部分积,乘数,|,x,y,|=0.1101000101,算后求补输出:,x,y,补,=1.0010111011,0.0 0 0 0 0,y,f,1 1 1 1 1,z,0,=0,+,0.1 1 0 1 1,y,5,=1,+x,0.1 1 0 1 1,0.0 1 1 0 1 1,y,f,1 1 1 1,右移,得,z,1,+0.1 1 0 1 1,y,4,=1,+x,1.0 1 0 0 0,0.1 0 1 0 0 0 1,y,f,1 1 1,右移,得,z,2,+0.1 1 0 1 1,y,3,=1,+x,1.0 1 1 1 1,0.1 0 1 1 1 1 0 1,y,f,1 1,右移,得,z,3,+0.1 1 0 1 1,y,2,=1,+x,1.1 0 0 1 0,0.1 1 0 0 1 0 1 0 1,y,f,1,右移,得,z,4,+0.1 1 0 1 1 y,1,=1,+x,1.1 0 1 0 0,0.1 1 0 1 0 0 0 1 0 1,y,f,右移,得,z,5,=,x,y,(,2,),x=-0.11111,y=-0.11011,求,x,y,。,原码阵列乘法器,x=1.11111,y=1.11011,符号位,:x,0,y,0,=11=0,x,原,=11111,y,原,=11011,部分积,乘数,最后结果:,x,y,原,=0.1101000101,0.0 0 0 0 0,y,f,1 1 0 1 1,z,0,=0,+,0.1 1 1 1 1,y,5,=1,+x,0.1 1 1 1 1,0.0 1 1 1 1 1,y,f,1 1 0 1,右移,得,z,1,+0.1 1 1 1 1,y,4,=1,+x,1.0 1 1 1 0,0.1 0 1 1 1 0 1,y,f,1 1 0,右移,得,z,2,+0.0 0 0 0 0,y,3,=0,+0,0.1 0 1 1 1,0.0 1 0 1 1 1 0 1,y,f,1 1,右移,得,z,3,+0.1 1 1 1 1,y,2,=1,+x,1.0 1 0 1 0,0.1 0 1 0 1 0 1 0 1,y,f,1,右移,得,z,4,+0.1 1 1 1 1 y,1,=1,+x,1.1 0 1 0 0,0.1 1 0 1 0 0 0 1 0 1,y,f,右移,得,z,5,=,x,y,补码阵列乘法器,x,补,=1.00001,y,补,=1.00101,符号位,:x,0,y,0,=11=0,算前求补输出:,|x|,=11111,|y|,=11011,部分积,乘数,0.0 0 0 0 0,y,f,1 1 0 1 1,z,0,=0,+,0.1 1 1 1 1,y,5,=1,+x,0.1 1 1 1 1,0.0 1 1 1 1 1,y,f,1 1 0 1,右移,得,z,1,+0.1 1 1 1 1,y,4,=1,+x,1.0 1 1 1 0,0.1 0 1 1 1 0 1,y,f,1 1 0,右移,得,z,2,+0.0 0 0 0 0,y,3,=0,+0,0.1 0 1 1 1,0.0 1 0 1 1 1 0 1,y,f,1 1,右移,得,z,3,+0.1 1 1 1 1,y,2,=1,+x,1.0 1 0 1 0,0.1 0 1 0 1 0 1 0 1,y,f,1,右移,得,z,4,+0.1 1 1 1 1 y,1,=1,+x,1.1 0 1 0 0,0.1 1 0 1 0 0 0 1 0 1,y,f,右移,得,z,5,=,x,y,|,x,y,|=0.1101000101,算后求补输出:,x,y,补,=,0.1101000101,第,8,题 原码除法:,(1),商取到和除数位数相同时结束;,(2),余数不用修正;,(3),由于运算过程中,部分余数多次左移,所以最后的余数要缩小相应的倍数(,2,-n,)。,第,8,题(,1,),解:,符号位,Sf,=01=1,去掉符号位后:,x,补,=00.11000,y,补,=00.11111,-y,补,=11.00001,0 0.1 1 0 0 0,+-y,补,1 1.0 0 0 0 1,1 1.1 1 0 0 1 0,1 1.1 0 0 1 0,+y,补,0 0.1 1 1 1 1,0 0.1 0 0 0 1 0.1,0 1.0 0 0 1 0,+-y,补,1 1.0 0 0 0 1,0 0.0 0 0 1 1 0.11,0 0.0 0 1 1 0,+-y,补,1 1.0 0 0 0 1,1 1.0 0 1 1 1,0.110,1 0.0 1 1 1 0,+y,补,0 0.1 1 1 1 1,1 1.0 1 1 0 1,0.1100,1 0.1 1 0 1 0,+y,补,0 0.1 1 1 1 1,1 1.1 1 0 0 1,0.11000,(,2,),解:,符号位,Sf,=10=1,去掉符号位后:,y,补,=00.11001,-y,补,=11.00111,x,补,=00.01011,0 0.0 1 0 1 1,+-y,补,1 1.0 0 1 1 1,1 1.1 0 0 1 0 0,1 1.0 0 1 0 0,+y,补,0 0.1 1 0 0 1,1 1.1 1 1 0 1 0.0,1 1.1 1 0 1 0,+y,补,0 0.1 1 0 0 1,0 0.1 0 0 1 1 0.01,0 1.0 0 1 1 0,+-y,补,1 1.0 0 1 1 1,0 0.0 1 1 0 1,0.011,0 0.1 1 0 1 0,+-y,补,1 1.0 0 1 1 1,0 0.0 0 0 0 1,0.0111,0 0.0 0 0 1 0,+-y,补,1 1.0 0 1 1 1,1 1.0 1 0 0 1,0.01110,第,9,题 浮点加,/,减运算,阶码是用双符号位的补码形式;,操作数是用单符号位的补码形式,故右移时,补上的值应和符号位相同;,x-y,补,应转化成,x,补,+-y,补,;,规格化时注意阶码应随着改变;,舍弃时注意舍入规则;,第,9,题(,1,),解:设两数均以补码表示,阶码采用双符号位,尾数采用单符号位,则它们的浮点表示分别为:,x,浮,=11 101,0.100101,y,浮,=11 110,1.100010,(1),求阶差并对阶,E=Ex-,Ey,=Ex,补,-,Ey,补,=Ex,补,+-,Ey,补,=11 101+00 010=11 111,(,补,),即,E,为,-1,,,x,阶码小,应使,Mx,右移,1,位,,Ex,加,1,x,浮,=11 110,0.010010(1),(2),尾数求和,0.010010(1),+1.100010,1.110100(1),(3),规格化,可见尾数运算结果的符号位与最高位相同,应执行左规格化处理,每左移尾数一次,相应阶码减,1,,所以结果尾数为,1.010010,,阶码为,11 100,(4),舍入处理,对本题不需要。,(5),判溢出,阶码两符号位为,11,,不溢出,故最后结果为,x,浮,+y,浮,=11 100,,,1.,010010,真值为,2,-100,*(-,0,.101110),尾数求差,0.010010(1),+0.011110,0.110000(1),无需规格化,故阶码保持对阶时的值,11 110,舍入处理:由于舍掉的为,1,,故在最低位加,1,综上,,最后结果为,x,浮,-y,浮,=11 110,,,0.,110001,真值为,2,-010,*(,0,.110001),(,2,),解:设两数均以补码表示,阶码采用双符号位,尾数采用单符号位,则它们的浮点表示分别为:,x,浮,=11 011,1.101010,y,浮,=11 100,0.010110,(1),求阶差并对阶,E=Ex-,Ey,=Ex,补,-,Ey,补,=Ex,补,+-,Ey,补,=11 011+00 100=11 111,(,补,),即,E,为,-1,,,x,阶码小,应使,Mx,右移,1,位,,Ex,加,1,x,浮,=11 100,1.110101(0),(2),尾数求和,1.110101(0),+0.010110,0.001011(0),(3),规格化,可见尾数运算结果的符号位与最高位相同,应执行左规格化处理,每左移尾数一次,相应阶码减,1,,所以结果尾数为,0.101100,,阶码为,11 010,(4),舍入处理,对本题不需要。,(5),判溢出,阶码两符号位为,11,,不溢出,故最后结果为,x,浮,+y,浮,=11 010,,,0.,101100,真值为,2,-110,*(,0,.101100),尾数求差,1.110101(0),+1.101110,1.100011(0),需要左规格化,故结果尾数为,1.000110,,阶码为,11 011,无需舍入处理,故最后结果为,x,浮,-y,浮,=11 011,,,1.,000110,真值为,2,-101,*(-,0,.111010),第,12,题,低四位运算后的进位:,C,4,=C,n+4,=G+,PC,n,=G+PC,0,其中,G,=Y,3,+Y,2,Y,3,+Y,1,X,2,X,3,+Y,0,X,1,X,2,X,3,P,=X,0,X,1,X,2,X,3,则,C,5,=Y,4,+X,4,C,4,C,6,=Y,5,+X,5,C,5,T,表示单级逻辑电路的单位门延迟,常用一个“与非”门或一个“或非”门的延迟时间来度量。,设标准门延迟为,T,,“与或非”门的延迟为,1.5T,,则进位信号,C0,通过一个反相器、两级“与或非,”,门传送到,C6,,延迟时间为,T+2*1.5T=4T,
展开阅读全文