Solutions of the exercises of

of 155
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Share
Description
Solutions of the exercises of
Transcript
  󰁓󰁯󰁬󰁵󰁴󰁩󰁯󰁮󰁳 󰁯󰁦 󰁴󰁨󰁥 󰁥󰁸󰁥󰁲󰁣󰁩󰁳󰁥󰁳 󰁯󰁦 󰀺    Chapter 1 Number Systems and Error 1.  Convert the following binary numbers to decimal form(1010) 2 ,  (100101) 2 ,  ( . 1100011) 2 Solution: (1010) 2  = (0 × 2 0 ) + (1 × 2 1 ) + (0 × 2 2 ) + (1 × 2 3 )= 0 + 2 + 0 + 8 = (10) 10 (100101) 2  = (1 × 2 0 ) + (0 × 2 1 ) + (1 × 2 2 ) + (0 × 2 3 )= (0 × 2 4 ) + (1 × 2 5 )= 1 + 0 + 4 + 0 + 0 + 32 = (37) 10 ( . 1100011) 2  = (1 × 2 − 7 ) + (1 × 2 − 6 ) + (0 × 2 − 5 ) + (0 × 2 − 4 )= (0 × 2 − 3 ) + (1 × 2 − 2 ) + (1 × 2 − 1 )= 1 / 2 7 + 1 / 2 6 + 0 + 0 + 0 + 1 / 2 2 + 1 / 2 = (99 / 128) 10 2.  Convert the following binary numbers to decimal form.(101101) 2 ,  (10110) 2 ,  (100111) 2 ,  (10000001) 2 Solution: (101101) 2  = (1 × 2 0 ) + (0 × 2 1 ) + (1 × 2 2 ) + (1 × 2 3 )= (0 × 2 4 ) + (1 × 2 5 )= 1 + 0 + 4 + 8 + 0 + 32 = (45) 10 (101111) 2  = (1 × 2 0 ) + (1 × 2 1 ) + (1 × 2 2 ) + (1 × 2 3 )= (0 × 2 4 ) + (1 × 2 5 )= 1 + 2 + 4 + 8 + 0 + 32 = (47) 10 (100111) 2  = (1 × 2 0 ) + (1 × 2 1 ) + (1 × 2 2 ) + (0 × 2 3 )= (0 × 2 4 ) + (1 × 2 5 )= 1 + 2 + 4 + 0 + 0 + 32 = (39) 10 (10000001) 2  = (1 × 2 0 ) + (0 × 2 1 ) + (0 × 2 2 ) + (0 × 2 3 )= (0 × 2 4 ) + (0 × 2 5 ) + (0 × 2 6 ) + (1 × 2 7 )= 1 + 0 + 0 + 0 + 0 + 0 + 0 + 128 = (129) 10 1  3.  Find the first five binary digits of (0 . 1) 10 . Obtain values for the absolute andrelative errors in yours results. Solution:  Apply the conversion procedure as follows:0 . 1 × 20 . 2 + integer part 0 ( d − 1 ) × 20 . 4 + integer part 0 ( d − 2 ) × 20 . 8 + integer part 0 ( d − 3 ) × 20 . 6 + integer part 1 ( d − 4 ) × 20 . 2 + integer part 1 ( d − 5 )Thus(0 . 1) 10  = ( . 00011) 2 4.  Convert the following: (a)  decimal numbers to binary numbers form.165 ,  3433 ,  111 ,  2345 ,  278 . 5 ,  347 . 45 (b)  decimal numbers to hexadecimal decimal numbers.1025 ,  278 . 5 ,  14 . 09375 ,  1445 ,  347 . 45 (c)  hexadecimal numbers to both decimal and binary.1 F.C, FFF. 118 ,  1 A 4 .C,  1023 ,  11 . 1 Solution: (a) 165 = 2 × 82 + 1 , b 0  = 182 = 2 × 41 + 0 , b 1  = 041 = 2 × 20 + 1 , b 2  = 120 = 2 × 10 + 0 , b 3  = 010 = 2 × 5 + 0 , b 4  = 05 = 2 × 2 + 1 , b 5  = 12 = 2 × 1 + 0 , b 6  = 01 = 2 × 0 + 1 , b 7  = 12  Thus the binary representation for 165 is165 = ( b 7 b 6 b 5 b 4 b 3 b 2 b 1 b 0 ) 2  = (10100101) 2 111 = 2 × 55 + 1 , b 0  = 155 = 2 × 27 + 1 , b 1  = 127 = 2 × 13 + 1 , b 2  = 113 = 2 × 6 + 1 , b 3  = 16 = 2 × 3 + 0 , b 4  = 03 = 2 × 1 + 1 , b 5  = 11 = 2 × 0 + 1 , b 6  = 1Thus the binary representation for 111 is111 = ( b 6 b 5 b 4 b 3 b 2 b 1 b 0 ) 2  = (1001111) 2 278 = 2 × 139 + 0 , b 0  = 0139 = 2 × 69 + 1 , b 1  = 169 = 2 × 34 + 1 , b 2  = 134 = 2 × 17 + 0 , b 3  = 017 = 2 × 8 + 1 , b 4  = 18 = 2 × 4 + 0 , b 5  = 04 = 2 × 2 + 0 , b 6  = 02 = 2 × 1 + 0 , b 7  = 01 = 2 × 0 + 1 , b 8  = 1Also0 . 5 × 20 . 0 + integer part 1 ( d − 1 )Thus the binary representation for 278 . 5 is278 . 5 = (100010110 . 1) 2 (c) (1 F.C  ) 16  =  C  (16) − 1 + F  (16) 0 + 1(16) 1 = 12 / 16 + 15 + 16 = (31 . 75) 10 Thus the decimal and binary representation for (1 F.C  ) 16  is(1 F.C  ) 16  = (31 . 75) 10  = (11111 . 11) 2 (1 A 4 .C  ) 16  =  C  (16) − 1 + 4(16) 0 +  A (16) 1 + 1(16) 2 = 12 / 16 + 4 + 160 + 256 = (420 . 75) 10 Thus the decimal and binary representation for (1 A 4 .C  ) 16  is(1 A 4 .C  ) 16  = (420 . 75) 10  = (110100100 . 11) 2 3  (11 . 1) 16  = 1(16) − 1 + 1(16) 0 + 1(16) 1 = 1 / 16 + 1 + 16 = (17 . 0625) 10 Thus the decimal and binary representation for (11 . 1) 16  is(11 . 1) 16  = (17 . 0625) 10  = (10001 . 0001) 2 5.  What is the absolute error in approximating 1 / 3 by 0 . 3333 ? What is the corre-sponding relative error ? Solution:  Let  x  = 1 / 3 = 0 . 33333 and ˆ x  = 0 . 3333, then the absolute error is Abs. Error  = | 0 . 33333 − 0 . 3333 | = 3 × 10 − 5 and the relative error is Rel. Error  = 3 × 10 − 5 0 . 33333 = 9 . 0001 × 10 − 5 Since 9 . 0001 × 10 − 5 <  12 × 10 − 4 , therefore, ˆ x  approximates  x  to 4 significant digits. 6.  Evaluate the absolute error in each of the following calculations and hence givethe answer to a suitable degree of accuracy.( a ) 9 . 01 + 9 . 96 ,  ( b ) 4 . 65 − 3 . 429 ,  ( c ) 0 . 7425 × 0 . 7199 ,  ( d ) 0 . 7078 ÷ 0 . 87 Solution: (a)  Let  x 1  = 9 . 01 ,x 2  = 9 . 96, and  S   =  x 1  + x 2  = 18 . 97. Also, let  e 1  and e 2  be the errors in  x 1  and  x 2  respectively. Then the respective absolute errors areas follows: | e 1 |≤  12  × 10 − 2 ,  | e 2 |≤  12  × 10 − 2 and Abs. Error ≤| e 1 | + | e 2 | = 1 × 10 − 2 The relative error is Rel. Error  =  Abs. ErrorS   = (1 × 10 − 2 )18 . 97 = 5 . 2715 × 10 − 4 Thus, the result lies in the range  S  ± Abs. Error 18 . 97 ± 1 × 10 − 2 ,  or 18 . 96 ≤ S   ≤ 18 . 98The answer may be rounded meaningfully to 18 . 9 which is correct to 3 significantdigits (sd)(1 decimal place (dp)). (c)  Let  x 1  = 0 . 7425 ,x 2  = 0 . 7199, and  P   =  x 1 x 2  = 0 . 5345. Let  e 1  and  e 2  be theerrors in  x 1  and  x 2  respectively and | e 1 |≤  12  × 10 − 4 ,  | e 2 |≤  12  × 10 − 4 4
Related Documents
View more...
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks