



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
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
1 / 5
This page cannot be seen from the preview
Don't miss anything!




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 0 0 A A A Zo A 1 A A 0 1 A
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
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 = (^) A ⋅ B C ⋅ D E
Part B: Derive the proper mixed logic expression for the following design. Determine # of switches needed.
Out = (^) A B C ⋅ D
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)
unsigned fixed-point ( 15 bits). ( 5 bits) 32K^ 1/ signed fixed-point ( 10 bits). ( 10 bits)
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.
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