Docsity

Control Input - Computer Engineering - Exam, Exams of Computer Science

Toggle sidebar
bg1
ECE 2030A 10:00am Computer Engineering Fall 2009
4 problems, 5 pages Exam Two 4 March 2009
1
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
24 28 24 24 100
pf3
pf4
pf5

Partial preview of the text

Download Control Input - Computer Engineering - Exam and more Exams Computer Science in PDF only on Docsity!

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.

A

B Out

I 0

I 1

I 2

I 3

O

S 1 S 0

O 3

O 2

O 1

O 0

I 1

I 0

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 IN

C

O

In C 1 2 3

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^3 Out

C

O

IN

C

IN O Out

C

O

IN

C

O

IN

C

IN

C

2 O

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.

A 3 A 2 A 1 A 0 B^3 B^2 B^1 B^0

S 3 S 2 S 1 S 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

WE φ 1 φ 2 RE

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.

WE

In

Out

In WE RE Clk Out

A 0 0 ↑↓

A 1 0 ↑↓

A 0 1 ↑↓

A 1 1 ↑↓