Example 2. Please x =0.65625 expresses as a binary numberSolutionFirst,xexpressed asx =1×2-1 +0×2-2 +1×2-3 +0×2-4+1×2-5Sothebinarynumber styleofx is:x = (0.10101)
First, x expressed as So the binary number style of x is: 1 2 3 4 5 x 1 2 0 2 1 2 0 2 1 2 − − − − − = + + + + 2 x = (0.10101) Example 2. Please expresses as a binary number x = 0.65625 Solution
To the general real numberx ,x expressed asx =±(bj-1 ×2J-1 +...+b, ×2' +b。 ×2° +b-, ×2-1 + b_ ×2-2+...+b.,x2-n +...So the binary number style ofx is:x = ±(b,--...b,bo.b.,b-,...b-n ...),.Where b, is equal to 1 or O
1 1 0 1 2 1 1 0 1 2 ( 2 2 2 2 2 J J x b b b b b − − − = + + + + + − − − 2 ) n n b − + + + − 1 1 0 1 2 2 ( . ) J n x b b b b b b = − − − − To the general real number x , x expressed as So the binary number style of x is: Where is equal to 1 or 0. j b
To expressed as decimal number of floating point arithmetichomologousX =±0.bj--...b,b,b_,b_2...b-,...×2"Thedecimal part+o.bj--...b,b,b_,b-, .b-n...is called mantissa, 2's index of J is called exponent,isinteger.If set bj- =1 , the expression is only one
1 1 0 1 2 0. 2J J n x b b b b b b = − − − − 1 1 0 1 2 0. J n b b b b b b − − − − To expressed as decimal number of floating point arithmetic homologous The decimal part is called mantissa , 2’s index of J is called exponent , 1 1 J b If set − = , the expression is only one。 is integer
In a computer, a nonzero is usually expressed as:±0.b,b, ...b, ×2mWhereb,(j = 2,..,t) is equal to 1 or 0 .tis referred toas the word length ofthe computerOrdercodemhasthecertainupper-lowerlimitL≤m≤UL、 U andtwith the computer is different.The numbers are called machinenumberThe all machine number are noted as F(2,t, L,U)is called asmachine number system
1 2 0. 2m t b b b In a computer, a nonzero is usually expressed as: ( 2, , ) j Where b j t = is equal to 1 or 0 . t is referred to as the word length of the computer; L U 、 and t with the computer is different. L m U The numbers are called machine number. Order code m has the certain upper - lower limit The all machine number are noted as ,is called as machine number system F(2,t, L,U)
2.Data representation and floating point arithmeticMost real number inputting computer need to convert to thelimit length of binary machine number, the number need to giveup or take in something to replace by similar machine number.The real number x corresponding to the machine numbernotes fl (x) 。If x = ±0.b,b, ...b, ...×2m2-1 x2(1-2-)then fl(x) = sgn(x)a × 2mWhereif b+=0[0.b,b,...b,,a=0.b,b2 b, +2-t,if b1=1
2. Data representation and floating point arithmetic Most real number inputting computer need to convert to the limit length of binary machine number, the number need to give up or take in something to replace by similar machine number. The real number x corresponding to the machine number notes fl (x) 。 If 1 2 0. 2m t x b b b = 1 2 | | 2 (1 2 ) L U t x − − − then ( ) sgn( ) 2m fl x x a = Where + = − 0. 2 , 0. , 1 2 1 2 t t t b b b b b b a bt+1 = 0 1 bt+1 = if if