Principles of Computer Composition (Third Edition) Tang Shuofei - Chapter 6 Computer Operation Methods - After-school Exercises (1-16)

Table of contents

Chapter Six

1. At least how many binary digits can be used to represent any five-digit decimal positive integer?

Answer:
Among the five-digit decimal positive integers, the largest number 99999 satisfies the condition: 2 16 ( = 65536 ) < 99999 < 2 17 ( = 131072 ) 2^{16}(=65536)<99999<2^{17} (=131072)216(=65536)<99999<217(=131072 ) , so at least 17 binary digits can be used to represent any five-digit decimal positive integer.

2. Knowledge X = 0. a 1 a 2 a 3 a 4 a 5 a 6 ( ai to 0 or 1 ) X=0.a_1a_2a_3a_4a_5a_6(a_i to 0 or 1)X=0.a1a2a3a4a5a6(aiis 0 or 1 ) , when discussing the following situationsai a_iaiWhat is the value of each.

( 1 ) X > 1 2 ; ( 2 ) X ≥ 1 8 ; ( 3 ) 1 4 ≥ X > 1 16 (1)X>\frac{1}{2}; (2) X\geq \frac{1}{8}; (3)\frac{1}{4}\geq X>\frac{1}{16} (1)X>21;(2)X81;(3)41X>161
Answer:
( 1 ) If X > 1 / 2 , as long as a 1 = 1 and a 2 ∽ a 6 are not all 0 ( a 2 or a 3 or a 4 or a 5 or a 6 = 1 ) ; ( 2 ) If X ≥ 1 / 8, as long as a 1 ∽ a 3 is not all 0 ( a 1 or a 2 or a 3 = 1 ), a 4 ∽ a 6 can be either 0 or 1; ( 3 ) if 1 / 4 ≥ X > 1 / 16 , as long as a 1 = 0 , a 2 can be 0 or 1; when a 2 = 0, if a 3 = 0, then a 4 = 1, and a 5 , a 6 is not all 0 ( a 5 or a 6 = 1 ); if a 3 = 1 , then a 4 ∽ a 6 can be 0 or 1; when a 2 = 1, a 3 ∽ a 6 can be 0. (1) If X>1/2, as long as a_1=1, a_2\backsim a_6 is not all 0 (a_2 \ or \ a_3 \ or \ a_4 \ or \ a_5 \ or \ a_6=1);\\ ( 2) If you want X\geq 1/8, as long as a_1\backsim a_3 is not all 0 (a_1 \ or \ a_2 \ or \ a_3=1), a_4\backsim a_6 can be 0 or 1;\\ (3 ) If 1/4\geq X>1/16, as long as a_1=0, a_2 can be 0 or 1;\\ When a_2=0, if a_3=0, then a_4=1, and a_5, a_6 Not all 0 (a_5\ or\ a_6=1); if a_3=1, then a_4\backsim a_6 can take 0 or 1;\\ When a_2=1, a_3\backsim a_6 takes 0.( 1 ) To X>1/2 , as long as a1=1a2a6Not all 0 ( a2 or a 3 or a 4 or a 5 or a 6=1);( 2 ) To X1/8 , as long as a1a3Not all 0 ( a1 or a 2 or a 3=1)a4a6Can be 0 or 1 ;( 3 ) To 1/4X>1/16 , as long as a1=0a2Can be 0 or 1 ;this a2=0 , if a3=0 , then a4=1 , and a5a6Not all 0 ( a5 or a 6=1);if a3=1 , then a4a6Can be 0 or 1 ;this a2=1 o'clock, a3a6Take 0 .

3. Let x be an integer, [ x ] complement = 1, x ₁ x ₂ x 3 x 4 x 5 [x]_complement = 1, x_₁x_₂x_3x_4x_5[x]Supplement=1xxx3x4x5, if x < − 16 x<-16 is requiredx<16 , askx 1 ∽ x 5 x_1\backsim x_5x1x5What value should be taken?

Answer:
If x < − 16 , x 1 = 0 is required, and x 2 ∽ x 5 is arbitrary. If x<-16, x_1=0 is required, x_2\backsim x_5 is arbitrary.if x<16 , need x1=0x2x5arbitrary.
(Note: The larger the absolute value of the negative number, the smaller it is.)

4. Assuming that the length of the machine number is 8 bits (including 1 sign bit), write out the original code, complement code and inverse code corresponding to the following truth values.

− 13 64 , 29 128 , 100 , − 87 -\frac{13}{64},\frac{29}{128},100,-87 641312829100
Answer 87
: The corresponding relationship between the true value and different machine codes is as follows:

true value (decimal) truth value (binary) original code inverse code Complement
-13/64 -0.00 1101 1.001 1010 1.110 0101 1.110 0110
29/128 0.001 1101 0.001 1101 0.001 1101 0.001 1101
100 110 0100 0,110 0100 0,110 0100 0,110 0100
-87 -101 0111 1,101 0111 1,010 1000 1,010 1001

5. Known [ x ] Complement [x]_Complement[x]Supplement, find [x] original[x]_original[x]Originaland xxx

[ x ] complement = 1.1100; [ x ] complement = 1.1001; [ x ] complement = 0.1110; [ x ] complement = 1.0000; [x]_complement = 1.1100; [x]_complement = 1.1001; 0.1110; [x]_complement=1.0000;[x]Supplement=1.1100[x]Supplement=1.1001[x]Supplement=0.1110[x]Supplement=1.0000 ;
[x] complement = 1, 0101; [x] complement = 1, 1100; [x] complement = 0, 0111; [x] complement = 1, 0000. [x]_complement=1,0101; [x]_complement=1,1100; [x]_complement=0,0111; [x]_complement=1,0000.[x]Supplement=1,0101[x]Supplement=1,1100[x]Supplement=0,0111[x]Supplement=1,0000 .
Answer:
[ x ] make up [x]_ make up[x]Supplement, [ x ] original[x]_original[x]Originaland xxThe corresponding relationship of x is as follows:

[ x ] complement[x]_complement[x]Supplement [ x ] original[x]_original[x]Original x x x (binary) x xx (decimal)
1.1100 1.0100 -0.0100 -1/4
1.1001 1.0111 -0.0111 -7/16
0.1110 0.1110 +0.1110 +7/8
1.0000 none -1.0000 -1
1,0101 1,1011 -1011 -11
1,1100 1,0100 -0100 -4
0,0111 0,0111 +0111 +7
1,0000 none -10000 -16

6. Let the length of the machine number be 8 bits (including 1 sign bit), and discuss the value of the true value x in both integer and decimal cases, [ x ] Complement = [ x ] Original [x]_Complement = [ x]_original[x]Supplement=[x]Originalestablished.

Answer:
When x is a decimal, if x ≥ 0, then [ x ] complement = [ x ] is true; when x < 0, then when x = − 1 / 2, [ x ] complement = [ x ] is true . When x is an integer, if x ≥ 0 , then [ x ] complement = [ x ] is true; when x < 0 , then when x = − 64, [ x ] complement = [ x ] is true. When x is a decimal, \\ if x\geq is 0, then [x]_complement=[x]_original;\\ when x<0, then when x=-1/2, [x]_complement =[x]_Originally established. \\ When x is an integer, \\ If x\geq 0, then [x]_complement=[x]_original;\\ When x<0, then when x=-64, [x]_complement =[x]_Originally established.When x is a decimal,if x0 , then [ x ]Supplement=[x]Originalestablished;when x<0 , then when x=1/2 , [ x ]Supplement=[x]Originalestablished.When x is an integer,if x0 , then [ x ]Supplement=[x]Originalestablished;when x<0 , then when x=64 , [ x ]Supplement=[x]Originalestablished.

7. Set xxx is a true value,x ∗ x^*x is an absolute value, indicating that[ − x ∗ ] Complement = [ − x ] Complement [-x^*]_Complement=[-x]_Complement[x]Supplement=[x]SupplementCan it be established.

Answer:
When x is a true value and x ∗ is an absolute value, [ − x ∗ ] complement = [ − x ] complement cannot hold true. When x is a true value and x^* is an absolute value, [-x^*]_complement=[-x]_complement cannot be established.When x is true, xWhen is an absolute value, [x]Supplement=[x]Supplementcannot be established.
[ − x ∗ ] complement = [ − x ] complement is valid only when x > 0. The conclusion of [-x^*]_complement=[-x]_complement is only valid when x>0.[x]Supplement=[x]SupplementThe conclusion is only at x>Established at 0 o'clock.
When x < 0, because [ − x ∗ ] complement is a negative value, and [ − x ] complement is a positive value, so [ − x ∗ ] complement is not equal to [ − x ] complement. When x<0, since [-x^*]_complement is a negative value, and [-x]_complement is a positive value, so at this time [-x^*]_complement is not equal to [-x]_ repair.when x<0 , due to [ x]Supplementis a negative value, and [ x ]Supplementis a positive value, so at this time [ x]Supplementnot equal to [ x ]Supplement

8. Discuss [ x ] complement > [ y ] complement [x]_complement > [y]_complement[x]Supplement>[y]Supplement, whether x > y x>yx>y

Answer:
If the complement of [ x ] > the complement of [ y ], x > y does not necessarily exist. If [x]_complement>[y]_complement, x>y does not necessarily exist.if [ x ]Supplement>[y]Supplement, not necessarily x>y .
When [ x ] complement > [ y ] complement, the conclusion of x > y is only valid when x > 0 , y > 0 , and x < 0 , y < 0 . [x]_complement>[y]_complement, the conclusion of x>y is only true when x>0, y>0, and x<0, y<0.[x]Supplement>[y]Supplementwhen x>The conclusion of y is only in x>0y>0 , and x<0y<Established at 0 o'clock.
At that time x > 0, y < 0, there is x > y, but because the sign bit of the negative number's complement is 1, then [ x ] complement < [ y ] complement. At that time, x>0, y<0, there is x>y, but since the sign bit of the negative complement is 1, then [x]_complement<[y]_complement.At that time x>0y<0 , with x>y , but since the sign bit of the negative complement is 1 , then [ x ]Supplement<[y]Supplement.
Likewise, when x < 0 , y > 0 , there is x < y , but [x] complement > [y] complement. Similarly, when x<0, y>0, there is x<y, but [x]_complement>[y]_complement.Similarly, when x<0y>0 , with x<y , but [ x ]Supplement>[y]Supplement.
Note:
(1) A negative number with a small absolute value has a large value instead, and the smaller the absolute value of a negative number, the larger its complement value. Therefore, when x<0, y<0, if[ x ] complement > [ y ] complement [x]_complement>[y]_complement[x]Supplement>[y]Supplement, there must be x>y.
(2) The sign bit and value bit of complement code are integrated and cannot be analyzed separately.
(3) The complete answer should be analyzed in four situations, but the correct answer can also be obtained by fully analyzing an untenable situation.
(4) Since the sign bit of 0's complement code is 0, x and y=0 can be summarized into a class of >0 for discussion.

9. When the hexadecimal numbers 9B and FF are expressed as original code, complement code, inverse code, shift code and unsigned number, what are the corresponding decimal numbers (assuming that the machine number uses a sign bit)?

Answer:
The corresponding relationship between the truth value and the machine number is as follows:

hexadecimal true value unsigned number original code inverse code Complement frame shift
9BH binary 1001 1011 1,001 1011 1,110 0100 1,110 0101 0,001 1011
9BH decimal 155 -27 -100 -101 27
FFH binary 1111 1111 1,111 1111 1,000 0000 1,000 0001 0,111 1111
FFH decimal 255 -127 -0 -1 127

Note:
(1) 9BH and FFH are machine numbers, which contain sign bits.
(2) The sign bit of the code shift is opposite to the original, complement and inverse code, and the value is the same as the complement code.

10. In the integer fixed-point machine, set the machine number to use a sign bit, write ± 0 \pm0The original code, complement code, inverse code and frame shift of ± 0 , what conclusions can be drawn?

Answer:
The machine number form of 0 is as follows:

true value original code Complement inverse code frame shift
+0 0,00…0 0,00…0 0,00…0 1,00…0
-0 1,00…0 0,00…0 1,11…1 1,00…0

Conclusion: the representation of complement and frame shift 0 is not unique, and the original and inverse code are not unique.

11. Knowing that the length of the machine number is 4 bits (one of which is the sign bit), write all the forms of the original code, complement code and inverse code in the integer fixed-point machine and the decimal fixed-point machine, and indicate the corresponding decimal true value.

Answer:
The machine number and the corresponding true form are as follows:

truth value (binary) true value (decimal) original code inverse code Complement
整数 +111 +7 0,111 0,111 0,111
整数 +110 +6 0,110 0,110 0,110
整数 +101 +5 0,101 0,101 0,101
整数 +100 +4 0,100 0,100 0,100
整数 +011 +3 0,011 0,011 0,011
整数 +010 +2 0,010 0,010 0,010
整数 +001 +1 0,001 0,001 0,001
整数 +000 +0 0,000 0,000 0,000
整数 -1000 -8 none none 1,000
整数 -111 -7 1,111 1,000 1,001
整数 -110 -6 1,110 1,001 1,010
整数 -101 -5 1,101 1,010 1,011
整数 -100 -4 1,100 1,011 1,100
整数 -011 -3 1,011 1,100 1,101
整数 -010 -2 1,010 1,101 1,110
整数 -001 -1 1,001 1,110 1,111
整数 -000 -0 1,000 1,111 0,000
decimal +0.111 +7/8 0.111 0.111 0.111
decimal +0.110 +6/8 0.110 0.110 0.110
decimal +0.101 +5/8 0.101 0.101 0.101
decimal +0.100 +4/8 0.100 0.100 0.100
decimal +0.011 +3/8 0.011 0.011 0.011
decimal +0.010 +2/8 0.010 0.010 0.010
decimal +0.001 +1/8 0.001 0.001 0.001
decimal +0.000 +0 0.000 0.000 0.000
decimal -1.000 -1 none none 1.000
decimal -0.111 -7/8 1.111 1.000 1.001
decimal -0.110 -6/8 1.110 1.001 1.010
decimal -0.101 -5/8 1.101 1.010 1.011
decimal -0.100 -4/8 1.100 1.011 1.100
decimal -0.011 -3/8 1.011 1.100 1.101
decimal -0.010 -2/8 1.010 1.101 1.110
decimal -0.001 -1/8 1.001 1.110 1.111
decimal -0.000 -0 1.000 1.111 0.000

12. Set the format of the floating point number as follows: exponent code 5 digits (including 1 digit character), mantissa 11 digits (including 1 digit character). Write down the machine numbers corresponding to 51/128, -27/1024, 7.375, and -86.5. Requirements are as follows:

(1)阶码和尾数均为原码;
(2)阶码和尾数均为补码;
(3)阶码为移码,尾数为补码。
答:
据题意画出该浮点数的格式:
在这里插入图片描述
注意:1)正数补码不“取反+1” 。 2)机器数末位为0的不能省。
将十进制数转换为二进制:
x 1 = 51 / 128 = ( 0.011   0011 ) 2 = 2 − 1 × ( 0.11   0011 ) 2 x 2 = − 27 / 1027 = ( − 0.00   0001   1011 ) 2 = 2 − 5 × ( − 0.1   1011 ) 2 x 3 = 7.375 = ( 111.011 ) 2 = 2 3 × ( 0.11   1011 ) 2 x 4 = − 86.5 = ( − 1010   110.1 ) 2 = 2 7 × ( − 0.1010   1101 ) 2 x_1=51/128=(0.011\ 0011)_2=2^{-1}\times(0.11\ 0011)_2 \\ x_2=-27/1027=(-0.00\ 0001\ 1011)_2=2^{-5}\times(-0.1\ 1011)_2 \\ x_3=7.375=(111.011)_2=2^3\times(0.11\ 1011)_2 \\ x_4=-86.5=(-1010\ 110.1)_2=2^7\times (-0.1010\ 1101)_2 x1=51/128=(0.011 0011)2=21×(0.11 0011)2x2=27/1027=(0.00 0001 1011)2=25×(0.1 1011)2x3=7.375=(111.011)2=23×(0.11 1011)2x4=86.5=(1010 110.1)2=27×(0.1010 1101)2
则以上各数的浮点规格化数为:
(1)
[ x 1 ] 浮 = 1 , 0001 ; 0.11   0011   0000 [x_1]_浮=1,0001;0.11\ 0 011\ 000 0 [x1]=1,00010.11 0011 0000
[ x 2 ] 浮 = 1 , 0101 ; 1.11   0110   0000 [x_2]_浮=1,0101;1.11\ 0 110\ 000 0 [x2]=1,01011.11 0110 0000
[ x 3 ] 浮 = 0 , 0011 ; 0.11   1011   0000 [x_3]_浮=0,0011;0.11\ 1 011\ 000 0 [x3]=0,00110.11 1011 0000
[ x 4 ] 浮 = 0 , 0111 ; 1.10   1011   0100 [x_4]_浮=0,0111;1.10\ 1 011\ 010 0 [x4]=0,01111.10 1011 0100
(2)
[ x 1 ] 浮 = 1 , 1111 ; 0.11   0011   0000 [x_1]_浮=1,1111;0.11\ 0 011\ 000 0 [x1]=1,11110.11 0011 0000
[ x 2 ] 浮 = 1 , 1011 ; 1.00   1010   0000 [x_2]_浮=1,1011;1.00\ 1 010\ 000 0 [x2]=1,10111.00 1010 0000
[ x 3 ] 浮 = 0 , 0011 ; 0.11   1011   0000 [x_3]_浮=0,0011;0.11\ 1 011\ 000 0 [x3]=0,00110.11 1011 0000
[ x 4 ] 浮 = 0 , 0111 ; 1.01   0100   1100 [x_4]_浮=0,0111;1.01\ 0 100\ 110 0 [x4]=0,01111.01 0100 1100
(3)
[ x 1 ] 浮 = 0 , 1111 ; 0.11   0011   0000 [x_1]_浮=0,1111;0.11\ 0 011\ 000 0 [x1]=0,11110.11 0011 0000
[ x 2 ] 浮 = 0 , 1011 ; 1.00   1010   0000 [x_2]_浮=0,1011;1.00\ 1 010\ 000 0 [x2]=0,10111.00 1010 0000
[ x 3 ] 浮 = 1 , 0011 ; 0.11   1011   0000 [x_3]_浮=1,0011;0.11\ 1 011\ 000 0 [x3]=1,00110.11 1011 0000
[ x 4 ] 浮 = 1 , 0111 ; 1.01   0100   1100 [x_4]_浮=1,0111;1.01\ 0 100\ 110 0 [x4]=1,01111.01 0100 1100

13.浮点数格式同上题,当阶码基值分别取2和16时,

(1)说明2和16在浮点数中如何表示。
(2)基值不同对浮点数什么有影响?
(3)当阶码和尾数均用补码表示,且尾数采用规格化形式,给出两种情况下所能表示的最大正数和非零最小正数真值。
答:
(1)阶码基值不论取何值,在浮点数中均为隐含表示,即:2和16不出现在浮点格式中,仅为人为的约定。

(2)当基值不同时,对数的表示范围和精度都有影响。即:在浮点格式不变的情况下,基越大,可表示的浮点数范围越大,但精度越下降。

(3)r=2时,最大正数的浮点格式为:0,1111;0.111 111 111 1
其真值为: N + m a x = 2 15 × ( 1 − 2 − 10 ) N_{+max}=2^{15}\times(1-2^{-10}) N+max=215×(1210)
非零最小规格化正数浮点格式为:1,0000;0.100 000 000 0
其真值为: N + m i n = 2 − 16 × 2 − 1 = 2 − 17 N_{+min}=2^{-16}\times 2^{-1}=2^{-17} N+min=216×21=217
r=16时,最大正数的浮点格式为:0,1111;0.1111 1111 11
其真值为: N + m a x = 1 6 15 × ( 1 − 2 − 10 ) N_{+max}=16^{15}\times(1-2^{-10}) N+max=1615×(1210)
非零最小规格化正数浮点格式为:1,0000;0.0001 0000 00
其真值为: N + m i n = 1 6 − 16 × 1 6 − 1 = 1 6 − 17 N_{+min}=16^{-16}\times 16^{-1}=16^{-17} N+min=1616×161=1617

14.设浮点数字长为32位,欲表示 ± 6 \pm 6 ±6万间的十进制数,在保证数的最大精度条件下,除阶符、数符各取一位外,阶码和尾数各取几位?按这样分配,该浮点数溢出的条件是什么?

答:
若要保证数的最大精度,应取阶的基=2。
若要表示 ± 6 \pm 6 ±6万间的十进制数,由于 32768 ( 2 15 ) < 6 万 < 65536 ( 2 16 ) 32768(2^{15})<6万<65536(2^{16}) 32768(215)<6<65536(216),则:阶码除阶符外还应取5位(向上取2的幂)。
故:尾数位数=32-1-1-5=25位
按此格式,该浮点数上溢的条件为:阶码 ≥ 32 \geq 32 32该浮点数格式如下:
在这里插入图片描述

15.什么是机器零?若要求全0表示机器零,浮点数的阶码和尾数应采取什么机器数形式?

答:
机器零指机器数所表示的零的形式,它与真值零的区别是:机器零在数轴上表示为“0”点及其附近的一段区域,即在计算机中小到机器数的精度达不到的数均视为“机器零”,而真零对应数轴上的一点(0点)。若要求用“全0”表示浮点机器零,则浮点数的阶码应用移码、尾数用补码表示(此时阶码为最小阶、尾数为零,而移码的最小码值正好为“0”,补码的零的形式也为“0”,拼起来正好为一串0的形式)。

16.设机器数字长为16位,写出下列各种情况下它能表示的数的范围。设机器数采用一位符号位,答案均用十进制表示。

(1)无符号数;
(2)原码表示的定点小数;
(3)补码表示的定点小数;
(4)补码表示的定点整数;
(5)原码表示的定点整数;
(6)浮点数的格式为:阶码6位(含1位阶符),尾数10位(含1位数符)。分别写出正数和负数的表示范围;
(注:加条件:阶原尾原非规格化数。)
(7)浮点数格式同(6),机器数采用补码规格化形式,分别写出其对应的正数和负数的真值范围。
答:
各种表示方法数据范围如下:
(1)无符号整数: 0 ∽ 2 16 − 1 0\backsim 2^{16}- 1 02161,即: 0 ∽ 65535 0\backsim 65535 065535;

(2)原码定点小数: − ( 1 − 2 − 15 ) ∽ 1 − 2 − 15 -(1-2^{-15})\backsim 1-2^{-15} (1215)1215

(3)补码定点小数: − 1 ∽ 1 − 2 − 15 -1\backsim 1-2^{-15} 11215

(4)补码定点整数: − 2 15 ∽ 2 15 − 1 -2^{15}\backsim 2^{15}-1 2152151,即: − 32767 ∽ 32768 -32767\backsim 32768 3276732768;

(5)原码定点整数: − ( 2 15 − 1 ) ∽ 2 15 − 1 -(2^{15}-1)\backsim 2^{15}-1 (2151)2151,即: − 32767 ∽ 32767 -32767\backsim 32767 3276732767;

(6)据题意画出该浮点数格式:
在这里插入图片描述
由于题意中未指定该浮点数所采用的码制,则不同的假设前提会导致不同的答案,示意如下:
1)当采用阶原尾原非规格化数时,最大正数=0,11 111;0.111 111 111最小正数=1,11 111;0.000 000 001
则正数表示范围为: 2 31 × ( 1 − 2 − 9 ) ∽ 2 − 31 × 2 − 9 2^{31}\times (1-2^{-9})\backsim 2^{-31}\times 2^{-9} 231×(129)231×29
最大负数=1,11 111;1.000 000 001
最小负数=0,11 111; 1.111 111 111
则负数表示范围为: 2 − 31 × ( − 2 − 9 ) ∽ − 2 31 × ( 1 − 2 − 9 ) 2^{-31}\times (-2^{-9})\backsim -2^{31}\times(1-2^{-9}) 231×(29)231×(129)
2)当采用阶移尾原非规格化数时,
正数表示范围为:
2 31 × ( 1 − 2 − 9 ) ∽ 2 − 32 × 2 − 9 2^{31}\times(1-2^{-9})\backsim 2^{-32}\times 2^{-9} 231×(129)232×29
负数表示范围为:
2 − 32 × ( − 2 − 9 ) ∽ − 2 31 × ( 1 − 2 − 9 ) 2^{-32}\times (-2^{-9})\backsim -2^{31}\times(1-2^{-9}) 232×(29)231×(129)
注:零视为中性数,不在此范围内。

(7)当机器数采用补码规格化形式时,若不考虑隐藏位,则
最大正数=0,11 111;0.111 111 111
最小正数=1,00 000;0.100 000 000
其对应的正数真值范围为: 2 31 × ( 1 − 2 − 9 ) ∽ 2 − 32 × 2 − 1 2^{31}\times(1-2^{-9}) \backsim 2^{-32}\times 2^{-1} 231×(129)232×21
最大负数=1,00 000;1.011 111 111
最小负数=0,11 111;1.000 000 000
其对应的负数真值范围为: − 2 − 32 × ( 2 − 1 + 2 − 9 ) ∽ 2 31 × ( − 1 ) -2^{-32}\times(2^{-1}+2^{-9})\backsim 2^{31}\times (-1) 232×(21+29)231×(1)
注意:
1)应写出可表示范围的上、下限精确值(用 ≥ 或 ≤ \geq 或\leq ,不要用>或<)。
2)应用十进制2的幂形式分阶、尾两部分表示,这样可反映出浮点数的格式特点。括号不要乘开,不要用十进制小数表示,不直观、不精确且无意义。
3)原码正、负域对称,补码正、负域不对称,浮点数阶、尾也如此。特别要注意浮点负数补码规格化范围。(满足条件: 数符 ⊕ M S B 位 = 1 数符\oplus MSB位=1 数符MSB=1)

Guess you like

Origin blog.csdn.net/weixin_45735391/article/details/127178676