



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, 5 pages Exam Two 4 March 2009
Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate the pages of the exam. For maximum credit, show your work. Good Luck!
Your Name ( please print ) ________________________________________________
1 2 3 4 total
4 problems, 5 pages Exam Two 4 March 2009
Problem 1 (3 parts, 24 points) Building Blocks
Part A (8 points) Consider the circuit below. Complete the truth table. Then state what logical function this circuit implements.
B Out
En
A B Out
0 0
1 0
0 1
1 1
This wacky circuit is a
Part B (8 points) Consider four different building block definitions below. The symbolic value A is presented at its input. The control input and resulting out are shown in the truth table. Name the logical gate or gates that implement each definition.
A 0 0 A A¯ Z (^) o
A 1 A A¯ 0 A
Part C (8 points) Blocks from part B are used to create a new module below. The symbolic value
A is presented at its input. Complete the truth table and give its functional name.
IN O Out
C
IN C Out
A 0
A 1 It’s a:
4 problems, 5 pages Exam Two 4 March 2009
Problem 3 (3 parts, 24 points) “Math is easy”
Part A (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 and six bit two’s complement fixed-point representations.
result unsigned error? signed error?
Part B (6 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.
Cout Cin
Part C (6 points) Write two Boolean expressions indicating signed two’s complement addition and subtraction overflow using inputs X 3 , Y 3 , Z 3. These SOP expressions should be true when overflow occurs.
addition overflow =
subtraction overflow =
4 problems, 5 pages Exam Two 4 March 2009
Problem 4 (3 parts, 24 points) “Register your knowledge”
Part A (8 points) Implement a 2 to 1 multiplexer using only pass gates and inverters. Label all inputs (IN 0 , IN 1 , S) and output (Out).
Part B (10 points) Implement a register below using needed muxes, latches, pass gates, and inverters (all in icon form). Complete the behavior table at right. Recall that the CLK signal indicates a full Φ 1 Φ 2 cycle; so the output should be the value at the end of a cycle (with the given inputs).
In Out
Part C (6 points) Assume the following signals are applied to your register. Draw the output signal Out. Draw a vertical line where In is sampled. Draw crosshatch where Out is unknown.
In WE RE Clk Out