EE 101 Quiz 2
Fall ’0
9
● Redekopp
Name: ________________________________________
Lecture 9:30 / 12:30 / 2:00
Closed Book / 75 minutes
Score: ________
Show all your work to get full credit.
You have 75 minutes
to complete this quiz.
1)
(46 pts.) Comparators.
You are given two 8bit unsigned inputs:
X[7:0] and Y[7:0] and
two 4bit unsigned inputs A[3:0] and B[3:0].
Produce a 4bit unsigned output value: Z[3:0]
according to the following description.
a)
Start by just implementing the comparison of 4*X[7:0] with Y[7:0].
Think about how
4*X can be calculated simply and then use
ONLY
the 2 comparators below plus a
MINIMAL
amount of other basic logic gates to complete the comparison design.
O
A<B
O
A=B
O
A>B
74LS85
A
0
A
1
A
2
A
3
B
0
B
1
B
2
B
3
I
A<B
I
A=B
I
A>B
X < Y
X = Y
X > Y
O
A<B
O
A=B
O
A>B
74LS85
A
0
A
1
A
2
A
3
B
0
B
1
B
2
B
3
I
A<B
I
A=B
I
A>B
X5
X4
X6
X7
X1
X0
X2
X3
Y6
Y7
Y5
Y4
Y2
Y3
0
0
0
Y1
Y0
Compare 4*X with Y
if (4*X > Y and A[3] = 0) or (4*X = Y and A[2] = 1)
then Z[3:0]
= A[3:0]
else
Z[3:0]
= B[3:0]
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
b)
Next, implement the
“if”
condition that will select the correct value for Z.
Hint:
The
“
if
”
condition is a function of how many bits??
This is the end of the preview.
Sign up
to
access the rest of the document.
 Fall '06
 Redekopp
 Zagreb, D1, British B class submarine, A3 4X=Y A2

Click to edit the document details