Midterm 2

ECEN 1400
Midterm 2
Name:
ECEN 1400, Midterm 2 1. (10 POINTS / 100)
Fill in the truth table.
A"
B"
C"
Y"
0"
0"
0"
0"
0"
0"
1"
0"
0"
1"
0"
1"
0"
1"
1"
0"
1"
0"
0"
0"
1"
0"
1"
0"
1"
1"
0"
0"
1"
1"
1"
0"
When B=0 or when C=1, the output of the final AND gate must be zero. That leaves only
two cases 010 and 110. The second case yields a 0 from the NAND so Y=0. Thus only
010 yields Y=1.
2. (15 POINTS / 100)
In the circuit shown below, the two NOR gates are in the form of an SR flip-flop. Using
this knowledge, fill in the truth table. Note that you do NOT need to trace the operation
the gates and show stability.
R"
S"
D"
E"
R"
S"
Q"
Qnext"
0"
0"
0"
0"
0"
0"
0"
1"
1"
0"
0"
0"
1"
0"
0"
0"
0"
0"
1"
1"
0"
1"
0"
1"
0"
0"
0"
0"
1"
1"
0"
1"
1"
0"
1"
0"
1"
0"
0"
0"
1"
1"
1"
1"
0"
1"
1"
1"
E is an “enable”, only letting R and S be nonzero when E is one. So all E=0 states give
R,S=0 which is hold so the output stays the same. If E=1, then R=~D, S=D. Thus the RS
is set (Qnext=1) when D=1 and reset (Qnext=0) when D=0.
3. (15 POINTS / 100)
Convert 101010102 to base 10: 128+32+8+2=17010
Convert 7310 to base 2: 73=64+8+1, so 10010012
Fall 2014
1
ECEN 1400
Midterm 2
In binary, what is the sum
10112 +
11012
110002
Name:
4. (15 POINTS / 100)
Simplify the Boolean logic expression to the minimum number of logical operations.
That is, if you were implementing this in a circuit, it would take the minimum number of
gates. Bar indicates inversion, + the OR operation and . is the AND operation. A,B,C,
and D are variables. Hint: Boolean algebra rules are generally like those of regular
algebra that uses the same symbols, but not universally.
f = Ai D+ Ai Bi D+ Ai D+ Ai Bi D
f = AiC + Ai BiC + AiC + Ai BiC
= AiC + AiC + Ai BiC + Ai BiC
= ( A + A ) i C + ( A + A) i B i C
= C + BiC
=C+B
First, factor the two terms that share symbols. Then use the rule that (A+NOT(A))=1
and the rule that 1 AND A = A. The final simplification is the last of the basic rules in
the notes and is one of the few that isn’t terribly obvious.
5. (15 POINTS / 100)
a) Show, via terms circled on the Karnaugh map, the minimum logical implementation.
“X” is a “don’t care” state.
b) Write the logical expression for this implementation using the notation of problem 4.
0
X
1
0
1
0
X
1
1
0
X
X
X
0
1
0
AB + BD
Fall 2014
2
ECEN 1400
Midterm 2
Name:
6. (15 POINTS / 100)
You desire to create a circuit which will detect whether a BCD number, known to be in
the range of 2-13 inclusive (that is, 2,3,.4….11,12,13) is prime. Write the truth table that
you would use to start your design. The function should be 1 if and only if the number is
a prime. In the table below, D is the most significant digit (8’s place) and A is the least
(1’s place).
D"
C"
B"
A"
Y"
0"
0"
0"
0"
X"
0"
0"
0"
1"
X"
0"
0"
1"
0"
1"
0"
0"
1"
1"
1"
0"
1"
0"
0"
0"
0"
1"
0"
1"
1"
0"
1"
1"
0"
0"
0"
1"
1"
1"
1"
1"
0"
0"
0"
0"
1"
0"
0"
1"
0"
1"
0"
1"
0"
0"
1"
0"
1"
1"
1"
1"
1"
0"
0"
0"
1"
1"
0"
1"
1"
1"
1"
1"
0"
X"
1"
1"
1"
1"
X"
Entries 0,1,14 and 15 should be don’t care (X) in preparation for minimization.
7. (15 POINTS / 100)
Write the output F of this set of logical gates as a Boolean logical function, e.g. of the
form F = (A OR B) AND NOT(C). To show your work, write the intermediate functions
on the diagram as indicated by each red arrow. Use parenthesis where needed to make
your expression unambiguous. You do not need to simplify your answer.
A'AND'B'
(A'AND'B)'OR'C'
F'='((A'AND'B)'OR'C)'AND'NOT(D)'
NOT(D)'
Fall 2014
3