relationship, established equivalent relationship 14, and subject: application problem (4)--scores and percentage application problem review content overview answers scores, and percentage application preliminary knowleoblem of key is: according to meaniphing, (1) determine standard volume (units \n in-line solution. Category fraction multiplication word problem score Division applications engineering problem problem XV, a subject: review of the measurement of the amount of capacity, measurement and units of measurement of comnt and their significance in rate 1, currency, length, area, volume, unit size, volume, weight and rate. (Omitted) 2, commonly used time units and their relationships. (Slightly) with a measurement units Zhijian of of poly 1, and of method 2, and poly method 3, and of method and poly method of relationship measurement distance of method 1, and tool measurement 2, and estimates 16, and subject: geometry preliminary knowledge (1)--line and angle review content line, and segment, and Ray, and vertical, and parallel, and angle angle of classification (slightly) 17, and subject: geometry prdge (2)--plane gracs review content triangle, and edges shaped, and round, and fan axisymmetric graphics perimeter and arehea combination graphics of area subject : Preliminary knowledge (3)-review of solid content category 1-d shapes are divided into: cylinder and cone 2, column is divided into: cuboid, square 3, cone cone of the features of cuboids and cubes relatimon units of measuremeonship between characteristics of circular cone is slightly solid surface area and volume 1, size 2, table ...和第2章 参考答案
2写出下列十进制数的原码、反码、补码和移码表示(用8位二进制数)。如果是小数,则用定点小数表示;若为整数,则用定点整数表示。其中MSB是最高位(符号位),LSB是最低位。 (1)-1 (2) -38/64 解:
(1)-1=(-)2 原码:
反码: 补码: 移码:
(2)-38/64=-0.59375=(-0.)2
或-38/64=-(32+4+2)*2-6=-()*2-6=(-0.)2 原码: 1
反码: 1
补码: 1
移码: 0
....
注:-1如果看成小数,那么只有补码和移码能表示得到,定点小数-1的补码为:1.
此例类似于8位定点整数的最小值-128补码为
3 有一字长为32位的浮点数,符号位1位;阶码8位,用移码表示;尾数23位,用补码表示;基数为2.请写出:(1)最大数的二进制表示,(2)最小数的二进制表示,(3)规格化数所能表示的数的范围。
解:(题目没有指定格式的情况下,用一般表示法做) (1)最大数的二进制表示:0 1 (2)最小数的二进制表示:1 0
(1?2)*2(1)
(3)规格化最大正数:0 1
?2327?1 (2)
(?1)*227?127?1
(1?2)*2?23
relationship, established equivalent relationship 14, and subject: application problem (4)--scores and percentage application problem review content overview answers scores, and percentage application preliminary knowleoblem of key is: according to meaniphing, (1) determine standard volume (units \1\n in-line solution. Category fraction multiplication word problem score Division applications engineering problem problem XV, a subject: review of the measurement of the amount of capacity, measurement and units of measurement of comnt and their significance in rate 1, currency, length, area, vume 1, size 2, table ...olume, unit size, volume, weight and rate. (Omitted) 2, commonly used time units and their relationships. (Slightly) with a measurement units Zhijian of of poly 1, and of method 2, and poly method 3, and of method and poly method of relationship measurement distance of method 1, and tool measurement 2, and estimates 16, and subject: geometry preliminary knowledge (1)--line and angle review content line, and segment, and Ray, and vertical, and parallel, and angle angle of classification (slightly) 17, and subject: geometry prdge (2)--plane gracs review content triangle, and edges shaped, and round, and fan axisymmetric graphics perimeter and arehea combination graphics of area subject : Preliminary knowledge (3)-review of solid content category 1-d shapes are divided into: cylinder and cone 2, column is divided into: cuboid, square 3, cone cone of the features of cuboids and cubes relatimon units of measuremeonship between characteristics of circular cone is slightly solid surface area and vol和规格化最小正数:0 0
2*2规格化最大负数:1 1
?1?1?27
?(2?2)*2规格化最小负数:1 0
?23?27
(?1)*2规格化数的表示的数的范围为:
27?1
([?1)*2
27?1,?(2?2)*2?1?23?27][2*2(,1?2)*2?1?27?2327?1]下面补充IEEE 754的规格化浮点数表示范围:
IEEE 754的尾数采用1.M的形式,原码表示;阶e=E-127 (相对于一般表示法的e=E-128,人为的加了1);并且最大的阶()和最小的阶()用去作为特殊用途。
规格化最大正数:0 1
(2?2)*2规格化最小正数:0 0
?2327?1
1.0*2规格化最大负数:1 0
?27?2
?1.0*2规格化最小负数:1 1
?27?2
(?2?2)*2规格化数的表示的数的范围为:
?2327?1
([?2?2)*2
?2327?1,?1.0*2?27?2][1.0*2?27?2(,2?2?23)*227?1]relationship, established equivalent relationship 14, and subject: application problem (4)--scores and percentage application problem review content overview answers scores, and percentage application preliminary knowleoblem of key is: according to meaniphing, (1) determine standard volume (units \n in-line solution. Category fraction multiplication word problem score Division applications engineering problem problem XV, a subject: review of the measurement of the amount of capacity, measurement and units of measurement of comnt and their significance in rate 1, currency, length, area, volume, unit size, volume, weight and rate. (Omitted) 2, commonly used time units and their relationships. (Slightly) with a measurement units Zhijian of of poly 1, and of method 2, and poly method 3, and of method and poly method of relationship measurement distance of method 1, and tool measurement 2, and estimates 16, and subject: geometry preliminary knowledge (1)--line and angle review content line, and segment, and Ray, and vertical, and parallel, and angle angle of classification (slightly) 17, and subject: geometry prdge (2)--plane gracs review content triangle, and edges shaped, and round, and fan axisymmetric graphics perimeter and arehea combination graphics of area subject : Preliminary knowledge (3)-review of solid content category 1-d shapes are divided into: cylinder and cone 2, column is divided into: cuboid, square 3, cone cone of the features of cuboids and cubes relatimon units of measuremeonship between characteristics of circular cone is slightly solid surface area and volume 1, size 2, table ...和4. 将下列十进制数表示成IEEE754标准的32位浮点规格化数。 (1) 25/128 (2) -25/128
(1)X=(25/128)10=(11001.×2 )2 =(0.)2 =1.1001×2 S=0 E=-3+127=124= M=1001
IEEE754标准的32位浮点规格化数为:0 0
(2)X=(-25/128)10=(-11001.×2 )2 =(-0.)2 =-(1.1001×2 ) S=1 E=-3+127=124= M=1001
IEEE754标准的32位浮点规格化数为:1 0
5. 已知X和Y, 用变形补码计算X+Y, 同时指出运算结果是否溢出。
(1) x=11011 y=00011
解: [X]补=, [Y]补= [X+Y]补=[X]补+ [Y]补 [X]补 + [Y]补
------------------------ [X+Y]补 符号位为00,结果无溢出 X+Y=11110
_7
-3
_7
-3
6. 已知X和Y, 用变形补码计算X-Y, 同时指出运算结果是否溢出。
(1) x=11011 y=-11111
解:[X]补=, [Y]补=,[-Y]补= [X+Y]补=[X]补+ [-Y]补 [X]补 + [-Y]补 ------------------------ [X-Y]补
relationship, established equivalent relationship 14, and subject: application problem (4)--scores and percentage application problem review content overview answers scores, and percentage application preliminary knowleoblem of key is: according to meaniphing, (1) determine standard volume (units \1\n in-line solution. Category fraction multiplication word problem score Division applications engineering problem problem XV, a subject: review of the measurement of the amount of capacity, measurement and units of measurement of comnt and their significance in rate 1, currency, length, area, vume 1, size 2, table ...olume, unit size, volume, weight and rate. (Omitted) 2, commonly used time units and their relationships. (Slightly) with a measurement units Zhijian of of poly 1, and of method 2, and poly method 3, and of method and poly method of relationship measurement distance of method 1, and tool measurement 2, and estimates 16, and subject: geometry preliminary knowledge (1)--line and angle review content line, and segment, and Ray, and vertical, and parallel, and angle angle of classification (slightly) 17, and subject: geometry prdge (2)--plane gracs review content triangle, and edges shaped, and round, and fan axisymmetric graphics perimeter and arehea combination graphics of area subject : Preliminary knowledge (3)-review of solid content category 1-d shapes are divided into: cylinder and cone 2, column is divided into: cuboid, square 3, cone cone of the features of cuboids and cubes relatimon units of measuremeonship between characteristics of circular cone is slightly solid surface area and vol和符号位为01,结果溢出 X-Y=11010
7. 用带求补器的阵列乘法器计算X×Y。 (1)X=11011 Y= -11111 解:[x]补=0 11011 [y]补=
符号位单独运算: 0?1=1
尾数部分算前求补器输出为 |x|=11011, |y|=11111 1 1 0 1 1 ×) 1 1 1 1 1
---------------------------------- 1 1 0 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 1 1
----------------------------------------- 1 1 0 1 0 0 0 1 0 1
乘积符号位1,算后求补器输出为,最后补码乘积值为: (算后求补器输出不带符号位,详见课本36页图2.7;该图中符号位输入到算后求补器是为了作为控制信号,详见课本35页图2.6中的控制性号线E)
【x×y】补=
8. 用原码阵列除法器计算 X÷Y。 (1)X=11000 Y= -11111
解:X和Y先都乘以一个比例因子2-101
X=0.11000 ,Y= -0.11111
[∣x∣]补=0.11000,[∣y∣]补=0.11111,[-∣y∣]补=1.00001 符号位单独运算: 0?1=1
1)余数左移的解法(恢复余数法): 被除数 X 0011000 +[-|y|]补11.00001
----------------------
余数为负 11.11001 →q0=0
+[|y|]补 00.11111 恢复余数 ----------------------
00.11000 左移 01.10000
+[-|y|]补11.00001
---------------------- 余数为正 00.10001 →q1=1 左移 01.00010
.
relationship, established equivalent relationship 14, and subject: application problem (4)--scores and percentage application problem review content overview answers scores, and percentage application preliminary knowleoblem of key is: according to meaniphing, (1) determine standard volume (units \n in-line solution. Category fraction multiplication word problem score Division applications engineering problem problem XV, a subject: review of the measurement of the amount of capacity, measurement and units of measurement of comnt and their significance in rate 1, currency, length, area, volume, unit size, volume, weight and rate. (Omitted) 2, commonly used time units and their relationships. (Slightly) with a measurement units Zhijian of of poly 1, and of method 2, and poly method 3, and of method and poly method of relationship measurement distance of method 1, and tool measurement 2, and estimates 16, and subject: geometry preliminary knowledge (1)--line and angle review content line, and segment, and Ray, and vertical, and parallel, and angle angle of classification (slightly) 17, and subject: geometry prdge (2)--plane gracs review content triangle, and edges shaped, and round, and fan axisymmetric graphics perimeter and arehea combination graphics of area subject : Preliminary knowledge (3)-review of solid content category 1-d shapes are divided into: cylinder and cone 2, column is divided into: cuboid, square 3, cone cone of the features of cuboids and cubes relatimon units of measuremeonship between characteristics of circular cone is slightly solid surface area and volume 1, size 2, table ...和 +[-|y|]补 11.00001
----------------------
余数为正 00.00011 →q2=1 左移 00.00110 +[-|y|]补 11.00001 ---------------------- 余数为负 11.00111 →q3=0 左移 10.01110 +[|y|]补 00.11111 ---------------------- 余数为负 11.01101 →q4=0 左移 10.11010 +[|y|]补 00.11111 ---------------------- 余数为负 11.11001 →q5=0 +[|y|]补 00.11111 ---------------------- 余数 00.11000
故 [x÷y]原=1.11000 即 x÷y= -0.11000,余数为 0.11000
2)余数左移的解法(加减交替法): 被除数 X 0011000 +[-|y|]补11.00001
----------------------
余数为负 11.11001 →q0=0
左移 11.10010
+[|y|]补 00.11111
----------------------
余数为正 00.10001 →q1=1 左移 11.00010 +[-|y|]补 11.00001 ----------------------
余数为正 00.00011 →q2=1 左移 00.00110 +[-|y|]补 11.00001 ---------------------- 余数为负 11.00111 →q3=0 左移 10.01110 +[|y|]补 00.11111 ---------------------- 余数为负 11.01101 →q4=0 左移 10.11010 +[|y|]补 00.11111 ---------------------- 余数为负 11.11001 →q5=0 +[|y|]补 00.11111 ---------------------- 余数 00.11000
.
故 [x÷y]原=1.11000 即 x÷y= -0.11000,余数为 0.11000 3)除数右移的解法(课本例23的解法): 被除数 X 0.
+[-∣y∣]补 1.00001
-------------------------
计算机组成原理第二章参考答案



