
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A university homework assignment from ece190, a spring 2009 course. The assignment includes several textbook problems related to digital logic and number systems, specifically focusing on the number of bits required to store colors, converting numbers to 2's complement form, and proving that overflow does not occur when adding 2's complement numbers. Students are expected to solve problems x1 and x3, which involve calculating the number of bits needed to store the color of a ball drawn from a bag and proving that no overflow occurs when adding two 2's complement numbers.
Typology: Assignments
1 / 1
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.