欢迎来到天天文库
浏览记录
ID:56400544
大小:109.50 KB
页数:21页
时间:2020-06-16
《计算机组成原理课后题.ppt》由会员上传分享,免费在线阅读,更多相关内容在PPT专区-天天文库。
1、20.用原码一位乘、两位乘和补码一位乘(Booth算法)、两位乘计算x·y。(1)x=0.110111,y=-0.101110;(2)x=-0.010111,y=-0.010101;(3)x=19,y=35;(4)x=0.11011,y=-0.11101。解:先将数据转换成所需的机器数,然后计算,最后结果转换成真值。(1)[x]原=x=0.110111,[y]原=1.101110x*=0.110111,y*=0.101110x0=0,y0=1,z0=x0y0=01=1x*×y*=0.100111100010[x×y]原=1.10
2、0111100010x·y=-0.100111100010原码一位乘:部分积乘数y*0.000000.101110——+010.0000000.10111——+x*+0.1101110.11011110.01101110.1011——+x*+0.1101111.01001010.101001010.101——+x*+0.1101111.10000010.1100000010.10——+010.01100000010.1——x*+0.1101111.00111110.1001111000102x*=01.101110,[
3、-x*]补=[-x]补=1.001001原码两位乘:部分积乘数Cj000.00000000.1011100+001.101110+2x*001.10111002000.0110111000.1011+111.001001+[-x*]补111.10010012111.111001001000.10+111.001001+[-x*]补111.00001012111.11000010001000.+000.110111+x*000.1001111000100结果同一位乘,x·y=-0.100111100010[x]补=x=0.110
4、111[y]补=1.010010[-x]补=1.001001[2x]补=01.101110[-2x]补=10.010010[x×y]补=1.0110000111100x·y=-0.1001111000100补码一位乘、两位乘运算过程如下:补码一位乘:部分积乘数[y]补yn+100.0000001.0100100——+0100.00000001.010010+11.001001+[-x]补11.001001111.100100101.01001+00.110111+[x]补00.011011100.0011011101.0100
5、——+0100.00011011101.010+11.001001+[-x]补11.001111111.100111111101.01+00.110111+[x]补00.011110100.0011110111101.0+11.001001+[-x]补11.0110000111100——清0补码两位乘:部分积乘数yn+1000.00000011.0100100+110.010010+[-2x]补110.0100102111.1001001011.01001+000.110111+[x]补000.0110112000.0001101
6、11011.010+000.110111+[x]补000.1111012000.00111101111011.0+111.001001+[-x]补111.01100001111000.结果同补码一位乘,x·y=-0.10011110001000(2)x=-0.010111,y=-0.010101[x]原=1.010111,[y]原=1.010101x*=0.010111,y*=0.010101[-x*]补=1.101001,2x*=0.101110[-2x*]补=1.010010x0=1,y0=1,z0=x0y0=11=0[x
7、]补=1.101001,[y]补=1.101011[-x]补=0.010111,[2x]补=1.010010[-2x]补=0.101110x*×y*=0.000111100011[x×y]原=0.000111100011[x×y]补=0.0001111000110x·y=0.000111100011运算过程如下:原码一位乘:部分积乘数y*0.000000.010101——+x*+0.0101110.01011110.0010111.01010——+010.00010111.0101——+x*+0.0101110.011100
8、10.001110011.010——+010.0001110011.01——+x*+0.0101110.01111010.00111100011.0——+010.0001
此文档下载收益归作者所有