


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!



4 problems, 4 pages Exam Two Solutions 15 October 2004
Problem 1 (2 parts, 27 points) Representations and Arithmetic
Part A (15 points) For the 28 bit representations below, determine the most negative value, most positive value, and step size (difference between sequential values). All answers should be expressed in decimal notation. Fractions (e.g., 3/16ths) may be used. All signed representations are two’s complement.
representation most negative value most positive value step size signed integer (28 bits). (0 bits)
unsigned fixed-point (14 bits). (14 bits)
unsigned fixed-point (19 bits). (9 bits)
signed fixed-point (19 bits). (9 bits)
Part B (12 points) For each problem below, compute the operations using the rules of arithmetic, and indicate whether an overflow occurs assuming all numbers are expressed using a six bit unsigned fixed point representation and a six bit two’s complement fixed-point representation.
unsigned error?
no yes yes no
signed error?
yes no yes yes
4 problems, 4 pages Exam Two Solutions 15 October 2004
Problem 2 (3 parts, 30 points) Building Blocks
Part A (12 points) Consider the following circuit below. Assume the encoder has the following input priority: I 2 > I 0 > I 3 > I 1. Determine Out for the following Input patterns.
I 3 I 2 I 1 I 0
4 to 2 encoder
O 1 O 0
I 0 I 1 I 2 I 3
O
S 1 S 0
A B C D
W X Y Z
Out
oops
W X Y Z Out
0 0 1 0 C
1 0 1 0 D
0 0 1 1 A
1 1 1 1 B
Part B (10 points) Consider five possible definitions for the block below left. One block input is
the symbolic value A. The other input is a control value. The output behavior for each of the five
definitions is given. Give the logical (gate) name for each definition. Note that –A means not A.
Out
A 0 0 A A 1 Z (^) o
A 1 A -A 1 0 A
Part C (8 points) The blocks in part B are used to create a new module below. X, Y, and Z are symbolic inputs. Complete the truth table and give its functional name.
I N C
O
I N C
O
I N C
O
I N C
Z O
X
Y
C
C Out
0 X
1 Y It’s a:
2 to 1 MUX
4 problems, 4 pages Exam Two Solutions 15 October 2004
Problem 4 (2 part, 16 points) Arithmetic Unit
Part A (8 points) The adder below adds two four bit numbers A and B and produces a four bit result S. Add extra digital logic to support subtraction as well as addition. Label inputs X 3 , X 2 ,
X 1 , X 0 , Y 3 , Y 2 , Y 1 , Y 0 , ADD / SUB and outputs Z 3 , Z 2 , Z 1 , Z 0.
Cin
ADD/SUB
Part B (8 points) Now define the behavior for a two’s compliment overflow detection unit.
Assume the inputs are X 3 , Y 3 , Z 3 , and ADD / SUB. The output Error is 1 for overflow.
X 3 Y 3 Z 3 Error X 3 Y 3 Z 3 Error
0 0 0 0 0 0 0 0
1 0 0 0 1 0 0 1
0 1 0 0 0 1 0 0
1 1 0 1 1 1 0 0
0 0 1 1 0 0 1 0
1 0 1 0 1 0 1 0
0 1 1 0 0 1 1 1
1 1 1 0 1 1 1 0