Circuit Below - Computer Engineering - Solved Exam, Exams of Computer Science

Main points of this exam paper are: Circuit Below, Transparent Latch, Describe Its Behavior, Design Fun, Logic Expression, Proper Mixed, Switches Needed, Following Design, Express Its Behavior, Memory and Maps

Typology: Exams

2012/2013

Uploaded on 04/08/2013

seema_852
seema_852 🇮🇳

3.6

(7)

87 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ECE 2030 A 11:00pm Computer Engineering Spring 2011
5 problems, 5 pages Final Exam Solution 6 May 2011
Problem 1 (3 parts, 21 points) “A chip off the old block”
Part A (15 points) Consider the five definitions for the block drawn below. One block input is the
logical value A. The other input is the control value C. The output behavior for each of the five
definitions is given in the table. Complete the full truth table and state the logical (gate) names
for each definition. (hint: the first block one appears to mask A when its control input is low.)
IN
A
C
Out
In C i
A 0 0 A A A Zo
A 1 A A 0 1 A
In C i
0 0 0 0 1 0 Zo
1 0 0 1 0 1 Zo
0 1 0 1 0 1 0
1 1 1 0 0 1 1
iAND XOR NOR
OR Pass Gate
Part B (6 points) The circuit below is built using these blocks. Describe its behavior. Also give
the circuits common name.
X
Y
i
Out
I
N
C
O
I
N
C
O
I
N
C
O
I
N
C
OI
N
C
O
i
X Y Out
0 0 Q0
1 0 Q0
0 1 0
1 1 1
It's a transparent latch
1
pf3
pf4
pf5

Partial preview of the text

Download Circuit Below - Computer Engineering - Solved Exam and more Exams Computer Science in PDF only on Docsity!

5 problems, 5 pages Final Exam Solution 6 May 2011

Problem 1 (3 parts, 21 points) “A chip off the old block”

Part A ( 15 points) Consider the five definitions for the block drawn below. One block input is the

logical value A. The other input is the control value C. The output behavior for each of the five

definitions is given in the table. Complete the full truth table and state the logical (gate) names

for each definition. (hint: the first block one appears to mask A when its control input is low.)

A IN

C

Out In^ C^ i^ ^ ^ ^ 

A 0 0 A A A Zo A 1 A A 0 1 A

In C i    

0 0 0 0 1 0 Zo

1 0 0 1 0 1 Zo

0 1 0 1 0 1 0

1 1 1 0 0 1 1

i

AND

XOR

NOR

OR

Pass Gate

Part B ( 6 points) The circuit below is built using these blocks. Describe its behavior. Also give the circuits common name.

X

Y

i

IN Out

C O

I N C

I N O C

O

I N C

O (^) IN

C O

i

X Y Out

0 0 Q 0

1 0 Q 0

0 1 0

1 1 1

It's a transparent latch

5 problems, 5 pages Final Exam Solution 6 May 2011

Problem 2 (4 parts, 3 2 points) Design Fun

Complete each design below. Be sure to label all signals.

Part A: Complete the following CMOS design. Also express its behavior.

Out = (^) ABCDE

Part B: Derive the proper mixed logic expression for the following design. Determine # of switches needed.

Out = (^) ABCD

switches = (^) 3 x 4 + 2 x 2 = 12 + 4 = 16T

Part C: Implement a toggle cell using required latches and basics gates (including XORs). Also complete the behavior table.

TE CLR CLK Out

X 0 ↑↓ 0

0 1 ↑↓ Qo

1 1 ↑↓ Qo

Part D: Draw the state table for the following state diagram.

00 01

10

/ /

/

A/

A/ A/B 11

/

A/

A S 1 S 0 NS 1 NS 0 B

0 0 0 0 0 0

1 0 0 0 1 0

0 0 1 0 1 0

1 0 1 1 0 1

0 1 0 1 0 0

1 1 0 1 1 0

0 1 1 1 1 0

1 1 1 0 0 0

5 problems, 5 pages Final Exam Solution 6 May 2011

Problem 4 (4 parts, 38 points) Number Systems

Part A ( 8 points) Convert the following notations:

binary notation decimal notation 1010 1011. (^1010 171). 625

10 1001.1110 41.8 75 binary notation hexadecimal notation 11 1100 0011.1100 0011 11 (^) 3C3.C3C

11 1111.0010 0011 3F.

Part B (9 points) For the representations below, determine the most positive value and the step

size (difference between sequential values). All answers should be expressed in decimal notation. Fractions (e.g., 3/16ths) may be used. Signed representations are two’s complement.

representation most positive value step size

signed integer ( 20 bits). (0 bits)

512K 1

unsigned fixed-point ( 15 bits). ( 5 bits) 32K^ 1/ signed fixed-point ( 10 bits). ( 10 bits)

512 1/1K

Part C ( 9 points) A 20 bit floating point representation has a 13 bit mantissa field, a 6 bit

exponent field, and one sign bit. Express all answers in decimal.

What is the largest value that can be represented (closest to infinity)? 231 = 2B

What is the smallest value that can be represented (closest to zero)? 2 -32^ = 1/4B

How many decimal significant figures are supported? (^) ~

Part D (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 five bit unsigned fixed-point and five bit two’s complement fixed-point representations.

  • 11

result 0000.1 100.00 1110 1.

unsigned error? □ no ■ yes ■ no □ yes ■ no □ yes ■ no □ yes

signed error? ■ no □ yes □ no ■ yes □ no ■ yes ■ no □ yes

5 problems, 5 pages Final Exam Solution 6 May 2011

Problem 5 (1 part, 30 points) Assembly Programming

Part A ( 30 points) Complete an assembly language routine that computes the average of

positives integers in a 200 element array. The array begins at array 5000. Ignore integers in the array that negative (less than zero). Remember that memory is byte addressed and each word in memory is four bytes long (the first word starts at 5000, the second word starts at 5004, etc.)

Each time a positive integer is encountered, the number of positive integers ($ 5 ) is incremented. Later $ 5 is used to compute the average. Use the following register assignments: $1= array pointer, $2= end address, $3= current element, $ 4 = current sum, $ 5 = num positive integers, $ 6 =

branch predicate. The result (positive integer average) should be stored in $4.

label instruction comment PosAvg: addi $ 1 , $0, 5000 # init array ptr

addi $2, $ 1 , 800 # compute end address

addi $ 4 , $0, 0 # clear current sum

addi $ 5 , $0, 0 # clear number pos ints

Loop: lw $3, 0($1) # load current element

slt $6, $3, $0 # if element < 0

bne $6, $0, Skip # then skip

add $4, $4, $3 # else add to sum

addi $5, $5, 1 # increment num pos ints

Skip: addi $1, $1, 4 # move to next element

bne $1, $2, Loop # if not done, loop

div $4, $5 # sum / num pos ints

mflo $4 # move avg to $ jr $31 # return to caller