Web hosting faq - 562 ANSWERSTOEXERCISES 4.1 SECTION 4.1 1. 1010, 1011,
562 ANSWERSTOEXERCISES 4.1 SECTION 4.1 1. 1010, 1011, 1000, . . . , 11000, 11001, 11110. 2. (a) -110001, -11.001001001001.. . , 11.0010010000111111.. . . (b) 11010011, 1101.001011001011.. . , 111.011001000100000.. . (c) iiiii, io.oiioiioiioii . . . . io.oiiiiiii… . (d) -9.4, -. . .7582417582413, . . .562951413. 3. (1010113.2)~,. 4. (a) Between rA and rX. (b) The remainder in rX has radix point between bytes 3 and 4; the quotient in rA has radix point one byte to the right of the least significant portion of the register. 5. It has been subtracted from 999. . .9 = lop -1, instead of from 1000. . . 0 = lop. 6. (a,c) 2p-1 -1, -(2p- -1); (b) 2p- -1, -2p-1. 7. A ten s complement representation for a negative number z can be obtained by considering 10n + z (where n is large enough for this to be positive) and extending it on the left with infinitely many nines. The nines complement representation can be obtained in the usual manner. (These two representations are equal for nonterminating decimals, otherwise the nines complement representation has the form . (a)99999. . . while the ten s complement representation has the form (a + 1)OOOO.. . .) The representations may be considered sensible if we regard the value of the infinite sum N = 9 + 90 + 900 + 9000 + . . as -1, since N -10N = 9. See also exercise 31, which considers padic number systems. The latter agree with the p s complement notations considered here, for numbers whose radix-p repre- sentation is terminating, but there is no simple relation between the field of padic numbers and the field of real numbers. 8. c, a,bj = ~,(ak,+kPlbk- +. . . + akj)bk3. 9. A BAD ADOBE FACADE FADED. [Note: Other possible number sentences would be DO A DEED A DECADE; A CAD FED A BABE BEEF, COCOA, COFFEE; BOB FACED A DEADDODO.] , a3,a2, al, a0; a-l, a-2, . . . 1 [ ,AB,Az,A~,Ao;A-1,A-z, . . if bs,bz,bl,bo; b-1, b-2 ,… = :::,BJ,B2,B1,Bo;B-1,B-2 ,… 1 akJ+l-lf ;:J+l-2j.. j ak, B3 = bk )+1-l .bk, , 3tl-2,…,bk3 1 where (kc) is any infinite sequence of integers with k,+l > k,. 11. (The following algorithm works both for addition or subtraction, depending on whether the plus or minus sign is chosen.) Start by setting k t an+1 + an+2 + bntl t b,+z + 0; then for m = 0, 1, , n + 2 do the following: Set cm t a, & b, + k; then if cm 2 2, set k + -1 and cm + cm -2; otherwise if cm < 0, set k + 1 and cm + cm + 2; otherwise (i.e., if 0 2 cm 2 l), set k e 0. 12. (a) Subtract *(. . . asOa10)-2 from *(. aJOazOao)-2 in the negabinary system. (See also exercise 7.1-18 for a trickier solution that uses full-word logical operations.) (b) Subtract (. . . b30b10)2 from (. . . b40bzObo)z in the binary system.