You are on page 1of 6

Chapter 2 Exercises and Answers

Answers are in blue.


For Exercises 1-5, match the following numbers with their definition. A. Number B. Natural number C. nteger number !. Negati"e number E. #ational number 1. 2. 3. ". (. A unit of an abstract mathematical system subject to the laws of arithmetic. A A natural number, a negative of a natural number, or zero. C The number zero and any number obtained by re eatedly adding one to it. ! An integer or the #uotient of two integers $division by zero e%cluded&. ' A value less than zero, with a sign o osite to its ositive counter art. )

For Exercises $-11, match the solution with the %roblem. A. 1&&&11&& B. 1&&1111& C. 11&1&1& !. 11&&&&& E. 1&1&&&1 F. 1111&&& *. -. .. /. 1+. 11. 111++11 , 11++1 $binary addition& A 1+1+1+1 , 1+1+1 $binary addition& C 1111111 , 11111 $binary addition& ! 1111111 0 111 $binary subtraction& 1 11++111 0 111 $binary subtraction& ) 1+1+11+ 0 1+1 $binary subtraction& '

For Exercises 1' -1(, mar) the answers true and false as follows* A. +rue B. False 12. 13. 1". !inary numbers are im ortant in com uting because a binary number can be converted into every other base. ! !inary numbers can be read off in he%adecimal but not in octal. ! 2tarting from left to right, every grou ing of four binary digits can be read as one he%adecimal digit.

3 2+13 4ones 5 !artlett 6earning 66C, an Ascend 6earning Com any www.jblearning.com

1(. 1*. 1-.

! A byte is made u of si% binary digits. ! Two he%adecimal digits can be stored in one byte. A 7eading octal digits off as binary roduces the same result whether read from right to left as left to right. A

Exercises 1,- -5 are %roblems or short answer .uestions. 1.. )istinguish between a natural number and a negative number. A natural number is + and any number that can be obtained by re eatedly adding 1 to it. A negative number is less than +, and o osite in sign to a natural number. Although we usually do not consider negative +. )istinguish between a natural number and a rational number. A rational number is an integer or the #uotient of integer numbers. $)ivision by + is e%cluded.& A natural number is + and the ositive integers. $2ee also definition in answer to '%ercise 1.& 6abel the following numbers natural, negative, or rational. A. 1.333333 rational !. 0 183 negative, rational C. 1+** natural ). 28( rational '. *.2 rational 1. $ i& not any listed 9f ./1 is a number in each of the following bases, how many 1s are there: A. base 1+ ./1 !. base . Can;t be a number in base ., C. base 12 12*1 ). base 13 1"-+ '. base 1* 21/3 '% ress ./1 as a olynomial in each of the bases in '%ercise 1. A. . < 1+2 , / < 1+ , 1 !. Can;t be shown as a olynomial in base .. C. . < 122 , / < 12 , 1 ). . < 132 , / < 13 , 1 '. . < 1*2 , / < 1* , 1 Convert the following numbers from the base shown to base 1+. A. 111 $base 2& !. --- $base .& (11 C. 1'C $base 1*& "+-*

1/. 2+.

21.

22.

23.

3 2+13 4ones 5 !artlett 6earning 66C, an Ascend 6earning Com any www.jblearning.com

2". 2(. 2*.

2-.

2..

). --- $base 1*& 1/11 '. 111 $base .& -3 '% lain how base 2 and base . are related. !ecause . is a ower of 2, base=. digits can be read off in binary and 3 base=2 digits can be read off in octal. '% lain how base . and base 1* are related. . and 1* are both owers of two. '% and Table 2.1 to include the numbers from 1+ through 1*. binary octal decimal +++ + + ++1 1 1 +1+ 2 2 +11 3 3 1++ " " 1+1 ( ( 11+ * * 111 1+++ 1+ . 1++1 11 / 1+1+ 12 1+ 1+11 13 11 11++ 1" 12 11+1 1( 13 111+ 1* 1" 1111 11( 1++++ 2+ 1* '% and the table in '%ercise 2* to include he%adecimal numbers. binary octal decimal hexadecimal +++ + + + ++1 1 1 1 +1+ 2 2 2 +11 3 3 3 1++ " " " 1+1 ( ( ( 11+ * * * 111 1+++ 1+ . . 1++1 11 / / 1+1+ 12 1+ A 1+11 13 11 ! 11++ 1" 12 C 11+1 1( 13 ) 111+ 1* 1" ' 1111 11( 1 1++++ 2+ 1* 2+ Convert the following binary numbers to octal. A. 11111+11+ -** !. 1+++++1 1+1 C. 1+++++1+ 2+2 ). 11+++1+

3 2+13 4ones 5 !artlett 6earning 66C, an Ascend 6earning Com any www.jblearning.com

1"2 Convert the following binary numbers to he%adecimal. A. 1+1+1++1 A/ !. 111++111 'C. +11+111+ *' ). +1121111 This is not a binary number 3+. Convert the following he%adecimal numbers to octal. A. A/ 2(1 !. '3"C. *' 1(* 31. Convert the following octal numbers to he%adecimal. A. --111 !. *+( 1.( C. ""3 123 ). (21 1(1 '. 1 1 32. Convert the following decimal numbers to octal. A. /+1 1*+( !. 321 (+1 C. 1"/2 2-2" ). 1+** 2+(2 '. 2++1 3-21 33. Convert the following decimal numbers to binary. A. "( 1+11+1 !. */ 1+++1+1 C. 1+** 1++++1+1+1+ ). // 11+++11 '. 1 1 3". Convert the following decimal numbers to he%adecimal. A. 1+** "2A !. 1/3/ -/3 C. 1 3 2+13 4ones 5 !artlett 6earning 66C, an Ascend 6earning Com any www.jblearning.com 2/.

1 ). //. 3'* '. "3 2! 3(. 9f you were going to re resent numbers in base 1., what symbols might you use to re resent the decimal numbers 1+ through 1- other than letters: Any s ecial characters would wor> or characters from another al habet. 6et;s use ? for 1* and @ for 1-. 3*. Convert the following decimal numbers to base 1. using the symbols you suggested in '%ercise 1(. A. 1+** 3(" !. //+// ?@1/ C. 1 1 3-. Aerform the following octal additions A. --+ , **( 1*(( !. 1+1 , -+1+1+ C. 2+2 , **1+-1 3.. Aerform the following he%adecimal additions A. 1/A!* , "3 1/A1/ !. A'/ , 1 A1. C. 1+** , A!C) !C33 3/. Aerform the following octal subtractions. A. 1+** 0 --* -+ !. 123" 0 -*( 2"C. --** 0 (("" 2222 "+. Aerform the following he%adecimal subtractions. A. A!C 0 111 /A! !. //.. 0 A! /.)) C. A/1. 0 1"/2 /(** "1. Bhy are binary numbers im ortant in com uting: )ata and instructions are re resented in binary inside the com uter. "2. A byte contains how many bits: . "3. Cow many bytes are there in a *"=bit machine: . "". Bhy do micro rocessors such as agers have only .=bit machines: Aagers are not general= ur ose com uters. The rograms in agers are small enough to be re resented in .=bit machines. "(. Bhy is im ortant to study how to mani ulate fi%ed=sized numbers: 9t is im ortant to understand how to mani ulate fi%ed=sized numbers because numbers are re resented in a com uter in fi%ed=sized format. 3 2+13 4ones 5 !artlett 6earning 66C, an Ascend 6earning Com any www.jblearning.com

"*. "-.

Cow many ones are there in the number A!/. in base 13: $$13<13<13<1+& , $13<13<11& , 13</& , .& D 23/(" )escribe how a bi=#uinary number re resentation wor>s. There are seven lights to re resent ten numbers. The first two determine the meaning of the ne%t five. 9f the first light is on, the ne%t five re resent +, 1, 2, 3, and " res ectively. 9f the second is on, the ne%t five re resent (, *, -, ., and / res ectively.

3 2+13 4ones 5 !artlett 6earning 66C, an Ascend 6earning Com any www.jblearning.com

You might also like