
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

(Due: 01/27/2009)
Textbook Problems: 2.2, 2.8, 2.10, 2.17, 2.18, 2.34, 2.46, 2.
X1. A bag contains three balls: one red, one yellow, and one blue. For a certain game, you pull a ball at random from the bag, record its color, return the ball to the bag, and repeat the process.
a) How many bits are necessary to store the color of the first ball drawn in such a game? b) The first two balls (including the order)? c) The first three balls (including the order)?
X2. Given a number in N-bit 2's complement form, explain how you can easily find the number's representation in (N+2)-bit 2's complement form. Hint: look at the 3-bit, 4-bit, and 5-bit representations of numbers that can be represented with 3 bits.
X3. Prove that overflow cannot occur when a negative N-bit 2's complement number is added to a non-negative N-bit 2's complement number. Hint: use a range argument based on the number of bits N in the numbers.