资源描述:
《计算机组成原理与系统结构课后作业答案(包健_冯建文版).pdf》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、《运算器》P1013.3写出下列各数的原码、反码和补码,机器数长度为8位:真值二进制真值原码反码补码0,00000000,0000000(1)000000000,00000001,00000001,1111111(2)-127-11111111,11111111,00000001,0000001(3)-0.5-0.10000001.10000001.01111111.1000000(4)-19/128-0.00100111.00100111.11011001.1101101(5)10011001000,11001
2、000,11001000,1100100(6)23/640.0101110.01011100.01011100.0101110P1013.4写出下列各机器数的二进制真值X:(1)[X]补=0,1001X=1001(2)[X]补=1,1001X=-111(3)[X]原=0,1101X=1101(4)[X]原=1,1101X=-1101(5)[X]反=0,1011X=1011(6)[X]反=1,1011X=-100(7)[X]移=0,1001X=-111(8)[X]移=1,1001X=+1001(9)[X]补=1,0
3、000000X=-10000000B,X=-128(10)[X]反=1,0000000X=-1111111B,X=-127(11)[X]原=1,0000000X=-0(12)[X]移=1,0000000X=0P1564.1X=0.1101Y=-0.0110(设机器数长度为8位)[X]补=0.1101000[-X]补=1.0011000[2X]补=溢出[-2X]补=溢出[X/2]补=0.0110100[-X/2]补=1.1001100[Y]补=1.1010000[-Y]补=0.0110000[2Y]补=1.0100
4、000[-2Y]补=0.1100000[Y/2]补=1.1101000[-Y/2]补=0.0011000[-Y/4]补=0.0001100P102:3.8、阶码(6位移码)尾数(6位原码)(1)X=-25/64=-0.011001B,Y=2.875=10.111B[X]浮=0,111111.11001=7F9H[Y]浮=1,000100.10111=897H(2)[Z]浮=9F4H=1,001111.10100=-80P102:9、机器数字长16位16(1)无符号整数:0~2−11515(2)原码表示的定点整数:
5、1,111…11~0,111…11即−(2−1)~2−11515(3)补码表示的定点整数:1,00…000~0,111…11即−2~2−1−15(4)补码表示的定点小数:1.00…000~0.111…11即−1~1−2E(5)非规格化浮点数:N=M×R阶码(8位移码)尾数(8位补码)−727−1最大数=(1−2)×2阶码=1,1111111尾数=0.111111127−1最小数=−1×2阶码=1,1111111尾数=1.00000007−7−2最大负数=−2×2阶码=0,0000000尾数=1.1111111−7
6、−27最小正数=2×2阶码=0,0000000尾数=0.0000001(6)规格化浮点数:7−72−1最大数=(1−2)×2阶码=1,1111111尾数=0.111111172−1最小数=−1×2阶码=1,1111111尾数=1.0000000−1−7−27最大负数=−(2+2)×2阶码=0,0000000尾数=1.0111111−1−27最小正数=2×2阶码=0,0000000尾数=0.1000000P156:2、(1)(2)P156:4-14-2P156:55-1补码BOOTH算法5-2补码BOOTH算法P1
7、56:6、6-1原码恢复余数算法6-1原码加减交替算法6-2原码恢复余数算法6-2原码加减交替算法P1567-1补码加减交替算法7-2补码加减交替算法P156:4.8阶码(5位补码)尾数(6位补码)(1)X=-1.625=-1.101BY=5.25=101.01BX+YX-Y:1、对阶同上2、尾数相减:11.1100110+11.01011[EX-Y]补=11.00100103、结果不需规格化4、舍入处理:[EX-Y]补=1.00101[X-Y]=0,00111,00101P108:8-2X=0.2344=0.0
8、0111Y=-0.1133=-0.00011X-Y:1、对阶同上2、尾数相减:00.11100+00.01100[EX-Y]补=01.01000发生正溢尾数右移,阶码加1[EX-Y]补=0.10100[Mx-y]=1.11113、结果不需规格化4、舍入处理:[EX-Y]补=0.10100[X-Y]=1,11110,10100P108:9-1阶码(5位移码)尾数(6位补码)