CPSC 330 - Spring 2008
Homework 2
Due - Wednesday, February 20
Each student must turn in a separate set of homework solutions, but you may
work together in study groups with other students from the class. Include
their names in parentheses under your name on the solution set you submit.
Purposes:
(1) work with combinational logic;
(2) work with sequential logic.
Example:
Consider A*( (~A) + B ) = A*B. Show by truth table that this is true.
A B | ~A | ~A + B | A*(~A+B) | A*B
-----+----+--------+----------+-----
0 0 | 1 | 1 | 0 | 0
0 1 | 1 | 1 | 0 | 0
1 0 | 0 | 0 | 0 | 0 true because the last
1 1 | 0 | 1 | 1 | 1 two columns are the same
Show by algebraic manipulation that this is true.
A*( (~A) + B )
= A*(~A) + A*B by distributive postulate
= 0 + A*B by inverse postulate
= A*B by identity postulate
1. Problem A.2(b) on page 724 of your text.
Example:
Determine the simplest logic expression for the values in this Kmap:
\BC
A\ 00 01 11 10
+----+----+----+----+ _ _ _ _ _ _ _ _
0 | 1 | 1 | 0 | 0 | sum of products = A*B*C + A*B*C + A*B*C + A*B*C
+----+----+----+----+ _
1 | 1 | d | d | 1 | don't cares = A*B*C + A*B*C
+----+----+----+----+
_
simplified expression = A + B (treat both don't cares as true)
2. Problem A.3 on page 725 of your text -- use Karnaugh maps.
Example
Design a 2-input circuit that gives an output of 1 only when the two
inputs are equal. First, show the truth table; and, second, show the
gate implementation. (This is the equality function or inverse-xor.)
A B | F in SOP form, A----*-----.
----+-- _ _ | AND-.
0 0 | 1 F = A*B + A*B B-*--------' | _ _
0 1 | 0 | | OR = A*B + A*B
1 0 | 0 | `-NOT-. |
1 1 | 1 | AND-'
`----NOT-'
3. Problem A.6 on page 725 of your text.
Examples
[see lecture notes and pdf handout]
4. Redesign the circuit of the first example on the pdf handout using
JK flip-flops rather than D flip-flops.
5. Extend the second example on the pdf handout with a reset signal ("R")
that causes the system to immediately enter state 00.
(a) give the revised state diagram (use inputs RI, with 1d being the
reset transitions where d means that we don't care what I is)
(b) give the truth table in the form
R A(t) B(t) I | JA KA | JB KB | A(t+1) B(t+1) Out
--------------+-------+-------+------------------
(c) give the logic expressions for JA, KA, JB, KB
(d) give the circuit diagram