Solution-1 - cs.csubak.edu

C ALIFORNIA S TATE U NIVERSITY, B AKERSFIELD (CSUB)
D EPARTMENT OF E LECTRICAL & C OMPUTER E NGINEERING & C OMPUTER S CIENCE
ECE 322: D IGITAL D ESIGN WITH VHDL
Homework 1
Solution
QUESTION 1: (50 P OINTS )
a) Using the algebraic manipulation, derive the simplest sum-of-products expression for the function f (x 1 , x 2 , x 3 , x 4 ) =
(x 10 + x 30 + x 40 )(x 20 + x 30 + x 4 )(x 1 + x 20 + x 30 ).(Hint: you should obtain the following result: f = x 30 + x 20 x 10 + x 20 x 40 .)
b) Using the Venn diagram, derive the simplest sum-of-products expression for the function f (x 1 , x 2 , x 3 ) =
P
m(1, 3, 4, 6).
c) Using the algebraic manipulation, confirm the result you obtained in part (b).
d) Design the simplest function that you have derived in part (b) using only NAND gates.
e) How many NAND gates do you need to synthesize the circuit in part (b)?
————————————————————————————————————————-
A NSWER
a) f (x 1 , x 2 , x 3 , x 4 ) = (x 10 + x 30 + x 40 )(x 20 + x 30 + x 4 )(x 1 + x 20 + x 30 )
f = x 30 + ((x 10 + x 40 )(x 20 + x 4 )(x 1 + x 20 ))
f = x 30 + ((x 10 + x 40 )(x 20 + (x 1 x 4 )))
f = x 30 + ((x 1 x 4 )0 (x 20 + (x 1 x 4 )))
f = x 30 + ((x 1 x 4 )0 x 20 )
f = x 30 + x 20 x 10 + x 20 x 40 .
b) The sum-of-products form of the function is given by: f = x 10 x 20 x 3 + x 10 x 2 x 3 + x 1 x 20 x 30 + x 1 x 2 x 30 . The
corresponding Venn diagram is shown.
1
Based on the Venn diagram, the minimal sum-of-product expression for the function is as follows
f = x 1 x 30 + x 10 x 3 .
c) Using algebraic manipulation, we may derive the same simplest sum-of-product form as what we obtained
in part b). Follow the procedure:
f = x 10 x 20 x 3 + x 10 x 2 x 3 + x 1 x 20 x 30 + x 1 x 2 x 30 ,
f = (x 10 x 20 x 3 + x 10 x 2 x 3 ) + (x 1 x 20 x 30 + x 1 x 2 x 30 ),
f = (x 10 x 3 (x 20 + x 2 )) + (x 1 x 30 (x 20 + x 2 )),
f = (x 10 x 3 (1)) + (x 1 x 30 (1)),
f = x 10 x 3 + x 1 x 30 .
d) Using DeMorgan’s law we can obtain the NAND-NAND form of the simplified function f.
f = x01x3 + x1x03 = ((x01x3)0.(x1x03)0)0.
e) The simplest SOP form of the function f requires 5 NAND elements to be synthesized.
2
QUESTION 2: (50 P OINTS )
Concerning the following logic circuit, answer the questions.
a) Draw the truth table which shows the logic function f .
b) Derive the canonical POS form of the function f .
c) Implement the function only using NOR gates.
d) Derive the canonical SOP form of the function f; and using the Venn diagram justify that the derived
canonical expression may not be simplified any more.
————————————————————————————————————————-
A NSWER
a) The corresponding truth table is as follows:
x1
0
0
0
0
1
1
1
1
x2
0
0
1
1
0
0
1
1
x3
0
1
0
1
0
1
0
1
f
1
0
0
1
0
1
1
0
b) Canonical product-of-sums:
Q
f = M (1, 2, 4, 7) = (x 1 + x 2 + x 30 )(x 1 + x 20 + x 3 )(x 10 + x 2 + x 3 )(x 10 + x 20 + x 30 )
c) To draw the NOR-NOR implementation, we apply the DeMorgan’s theorem:
f = ((x 1 + x 2 + x 30 )0 + (x 1 + x 20 + x 3 )0 + (x 10 + x 2 + x 3 )0 + (x 10 + x 20 + x 30 )0 )0
Due to the existing symmetry in the truth table, the NOR-NOR implementation topology is the same as
NAND-NAND implementation.
3
d) Canonical SOP form is f = x 10 x 20 x 30 + x 10 x 2 x 3 + x 1 x 20 x 3 + x 1 x 2 x 30 .
Since none of the highlighted regions have common borders, we can conclude that it is impossible to simplify
the SOP canonical form.
4