计算机组成原理 第五版 习题答案
1 1 1 1
1
1 1 0 1
0 0 0
1
0 1
[x×y]补=0 1101000101
.(1) [x]原=[x]补=0 11000
[-∣y∣]补=1 00001
被除数 X 0 11000 +[-|y|]补 1 00001
----------------------------------------------------
余数为负 1 11001 →q0=0
左移 1 10010 +[|y|]补 0 11111 ---------------------------------------------------- 余数为正 0 10001 →q1=1
左移 1 00010 +[-|y|]补 1 00001 ----------------------------------------------------
余数为正 0 00011 →q2=1
左移 0 00110 +[-|y|]补 1 00001 ----------------------------------------------------
余数为负 1 00111 →q3=0
左移 0 01110 +[|y|]补 0 11111 ---------------------------------------------------- 余数为负 1 01101 →q4=0
左移 0 11010 +[|y|]补 0 11111 ---------------------------------------------------- 余数为负 1 11001 →q5=0 +[|y|]补 0 11111 ----------------------------------------------------
余数 0 11000
故 [x÷y]原=1.11000 即 x÷y= ?0.11000 余数为 0 11000
(2)
[∣x∣]补=0 01011 [-∣y∣]补=1 00111
被除数 X 0 01011 +[-|y|]补 1 00111
----------------------------------------------------
余数为负 1 10010 →q0=0
8
8
计算机组成原理 第五版 习题答案
左移 1 00100 +[|y|]补 0 11001
---------------------------------------------------- 余数为负 1 11101 →q1=0
左移 1 11010 +[|y|]补 0 11001 ---------------------------------------------------- 余数为正 0 10011 →q2=1
左移 1 00110 +[-|y|]补 1 00111 ----------------------------------------------------
余数为正 0 01101 →q3=1
左移 0 11010 +[-|y|]补 1 00111 ----------------------------------------------------
余数为正 0 00001 →q4=1
左移 0 00010 +[-|y|]补 1 00111 ----------------------------------------------------
余数为负 1 01001 →q5=0 +[|y|]补 0 11001 ----------------------------------------------------
余数 0 00010
x÷y= ?0.01110 余数为 0 00010
9.(1) x = 2-011*0.100101, y = 2-010*(-0.011110)
[x]浮 = 11101,0.100101 [y]浮 = 11110,-0.011110 Ex-Ey = 11101+00010=11111 [x]浮 = 11110,0.010010(1) x+y 0 0. 0 1 0 0 1 0 (1) + 1 1. 1 0 0 0 1 0 1 1. 1 1 0 1 0 0 (1) 规格化处理: 1.010010 阶码 11100 x+y= 1.010010*2-4 = 2-4*-0.101110 x-y 0 0. 0 1 0 0 1 0 (1)
+ 0 0. 0 1 1 1 1 0
0 0 1 1 0 0 0 0 (1)
规格化处理: 0.110000 阶码 11110 x-y=2-2*0.110001
(2) x = 2-101*(-0.010110), y = 2-100*0.010110 [x]浮
= 11011,-0.010110 [y]浮= 11100,0.010110
9
计算机组成原理 第五版 习题答案
Ex-Ey = 11011+00100 = 11111 [x]浮= 11100,1.110101(0) x+y 1 1. 1 1 0 1 0 1
+ 0 0. 0 1 0 1 1 0
0 0. 0 0 1 0 1 1
规格化处理: 0.101100 阶码
11010 x+y= 0.101100*2-6 x-y 1 1.1 1 0 1 0 1
+ 1 1.1 0 1 0 1 0
1 1.0 1 1 1 1 1
规格化处理: 1.011111 阶码 11100
x-y=-0.100001*2-4
10.(1) Ex = 0011, Mx = 0.110100
Ey = 0100, My = 0.100100 Ez = Ex+Ey = 0111 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 规格化: 26*0.111011 (2) Ex = 1110, Mx = 0.011010
Ey = 0011, My = 0.111100
Ez = Ex-Ey = 1110+1101 = 1011 [Mx]补 = 00.011010
[My]补 = 00.111100, [-My]补 = 11.000100
10
计算机组成原理 第五版 习题答案
0 0 0 1 1 0 1 0 +[-My] 1 1 0 0 0 1 0 0 1 1 0 1 1 1 1 0 0 1 0 1 1 1 1 0 0 +[My] 0 0 1 1 1 1 0 0 1 1 1 1 1 0 0 0 0.0 1 1 1 1 0 0 0 0 +[My] 0 0 1 1 1 1 0 0 0 0 1 0 1 1 0 0 0.01 0 1 0 1 1 0 0 0 +[-My] 1 1 0 0 0 1 0 0 0 0 0 1 1 1 0 0 0.011 0 0 1 1 1 0 0 0 +[-My] 1 1 0 0 0 1 0 0 1 1 1 1 1 1 0 0 0.0110 1 1 1 1 1 0 0 0 +[My] 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 0 0.01101 0 1 1 0 1 0 0 0 +[-My] 1 1 0 00 1 0 0 0 0 1 0 1 10 0 0.01101
商 = 0.110110*2-6, 余数=0.101100*2-6
11.
4 位加法器如上图,
Ci ??Ai Bi ??Ai Ci?1 ??Bi Ci?1 ??Ai Bi ??( Ai ??Bi )Ci?1 ??Ai Bi ??( Ai ??Bi )Ci?1
(1)串行进位方式 C1 = G1+P1C0 其中:G1 = A1B1
P1 = A1⊕B1(A1+B1 也对)
C2 = G2+P2C1 G2 = A2B2 P2 = A2⊕B2 C3 = G3+P3C2 G3 = A3B3 P3 = A3⊕B3
C4 = G4+P4C3 G4 = A4B4
P4 = A4⊕B4
(2) 并行进位方式
C1 = G1+P1C0
C2 = G2+P2G1+P2P1C0
C3 = G3+P3G2+P3P2G1+P3P2P1C0
C4 = G4+P4G3+P4P3G2+P4P3P2G1+P4P3P2P1C0
11