ECE190 Spring 2009 HW1: Bit Req., 2's Comp. Conv., and Overflow Proof, Assignments of Electrical and Electronics Engineering

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

Pre 2010

Uploaded on 03/11/2009

koofers-user-wfx-1
koofers-user-wfx-1 🇺🇸

4

(1)

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ECE190 – Spring 2009
Homework 1
(Due: 01/27/2009)
Textbook Problems: 2.2, 2.8, 2.10, 2.17, 2.18, 2.34, 2.46, 2.50
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.

Partial preview of the text

Download ECE190 Spring 2009 HW1: Bit Req., 2's Comp. Conv., and Overflow Proof and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

ECE190 – Spring 2009

Homework 1

(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.