3. Department of Communication Engineering, NCTU 3
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
The maximum number of gates cascaded in series
between a circuit input and the output is referred to as the
number of levels of gates
ANR-OR circuit A level of AND gates followed by a
OR at the output
OR-AND circuit A level of OR gates followed by a
AND at the output
OR-AND-OR circuit A level of OR gates followed by a
level of AND gates followed by
OR gate at the output
A function written in SOP form or in POS form
corresponds to a two-level gate circuit
Inverters which are connected directly to input variables
will not be counted when determining the # of levels
4. Department of Communication Engineering, NCTU 4
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
Example: A four-level realization with 6 gates and 13
gate inputs
5. Department of Communication Engineering, NCTU 5
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
Another realization of 3 levels of gates. There are six
gates and 19 gate inputs in total
6. Department of Communication Engineering, NCTU 6
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
Example: Find a circuit of AND and OR gates to realize
By Karnaugh map, f = a’c’d + bc’d + bcd’+ acd’(7-1)
( , , , ) (1,5,6,10,13,14)f a b c d m
7. Department of Communication Engineering, NCTU 7
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
Factoring (7-1) yields f=c'd(a'+b)+cd'(a+b) (7-2)
Both realizations use 5 gates, but the later one has fewer
inputs with on more level of gate delays
8. Department of Communication Engineering, NCTU 8
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
An alternative realization in POS form: obtained from the
0’s on the Karnaugh map
f'=c'd'+ab'c'+cd+a'b'c (7-3)
f=(c+d)(a'+b+c)(c'+d')(a+b+c') (7-4)
9. Department of Communication Engineering, NCTU 9
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
Partially multiplying out (7-4) using (X+Y)(X+Z)=X+YZ :
f =[c+d(a'+b)][c'+d'(a+b)] (7-5)
=(c+a'd+bd)(c'+ad'+bd') (7-6)
Eq. (7-6) leads to a 3-level AND-OR-AND circuit
10. Department of Communication Engineering, NCTU 10
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
Summaries:
If an expression for f’has n-levels, the complement of that
expression is an n-level expression of f
To realize f as an n-level circuit with an AND-gate output,
one procedure is to find an n-level expression for f’with an
OR operation at the output and then complement the
expression for f’
12. Department of Communication Engineering, NCTU 12
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
NAND and NOR gates are frequently used because they
are generally faster and use fewer components than AND
or OR gates
Any logic function can be implemented using only
NAND or only NOR gates
An n-input NAND gate is
1 2 1 2( )n nF X X X X X X
13. Department of Communication Engineering, NCTU 13
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
Similarly, an n-input NOR gate is
A set of function is said to be functionally complete if any
Boolean function can be expressed in terms of this set of
operations, e.g. AND, OR and NOT
Any set of logic gates which can realize AND, OR, and
NOT is also functionally complete
1 2 1 2( )n nF X X X X X X
14. Department of Communication Engineering, NCTU 14
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
E.g. AND and NOT form a functionally complete set of
gates, since
NAND is also functionally complete
16. Department of Communication Engineering, NCTU 16
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
A two-level circuit composed of AND and OR gates is
easily converted to a circuit composed of NAND gates or
NOR gates. E.g. converting from a minimum SOP
(7-13):AND-OR
(7-14):NAND-NAND
(7-15):OR-NAND
(7-16):NOR-OR
18. Department of Communication Engineering, NCTU 18
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
Obtaining a two-level circuit containing only NOR gates
should start with the minimum POS for F, instead of SOP
E.g.
(7-18):OR-AND
(7-19):NOR-NOR
(7-20):AND-NOR
(7-21):NAND-AND
20. Department of Communication Engineering, NCTU 20
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
Two of the most commonly used circuits are the NAND-
NAND and the NOR-NOR
Procedure for designing a min 2-level NAND-NAND
circuit
Find a minimum SOP for F
Draw the corresponding two-level AND-OR circuit
Replacing all gates with NAND gates
21. Department of Communication Engineering, NCTU 21
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
Procedure for designing a min 2-level NOR-NOR circuit
Find a minimum POS for F
Draw the corresponding two-level OR-AND circuit
Replace all gates with NOR gates
23. Department of Communication Engineering, NCTU 23
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
The following procedure may be used to design multi-
level NAND-gate circuits
Simplify the switching function to be realized
Design a multi-level circuit of AND and OR gates.
The output gate must be a OR gate
AND-gate outputs cannot be used as AND-gate inputs; OR-
gate outputs cannot be used as OR-gates inputs
Replace all gates with NAND gates
The procedure for the design of multi-level NOR-gate
circuits is exactly the same as for NAND-gate circuits
except that the output gate of the circuit must be an AND
gate, and all gates are replaced with NOR gates
26. Department of Communication Engineering, NCTU 26
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
Alternative representations for an inverter
Alternative representations for AND, OR, NAND and
NOR gates
28. Department of Communication Engineering, NCTU 28
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
The procedure for converting AND-OR circuit to a
NAND or NOR circuit
Convert all AND gates to NAND gates by adding an
inversion bubble at the output
Convert all OR gates to NAND gates by adding inversion
bubbles at the inputs
Whenever an inverted output drives an inverted input, these
two inversions cancel
Whenever a noninverted gate output drives an inverted gate
input or vice versa, insert an inverter so that the bubble will
cancel
32. Department of Communication Engineering, NCTU 32
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
Solution of digital design problems often requires the
realization of several functions of the same variables. The
use of some gates in common between two or more
functions sometimes leads to a more economical circuit
E.g. we have
33. Department of Communication Engineering, NCTU 33
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
The individual realizations to them are
34. Department of Communication Engineering, NCTU 34
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
Observe that the term ACD is necessary for the
realization of F1 and that A’CD is necessary for F3. If
replacing CD in F2 by A’CD + ACD, the realization of
CD is unnecessary
35. Department of Communication Engineering, NCTU 35
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
In realizing multiple-output circuits, the use of a
minimum sum of prime implicants for each function does
not necessarily lead to a minimum cost solution
When designing multiple-output circuits, try to minimum
the total number of gates required
E.g.
1
2
3
(2,3,5,7,8,9,10,11,13,15)
(2,3,5,6,7,10,11,14,15)
(6,7,8,9,13,14,15)
f m
f m
f m
36. Department of Communication Engineering, NCTU 36
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
The corresponding Karnaugh maps are
37. Department of Communication Engineering, NCTU 37
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
By inspection, we can see that
a’bd from f2, abd from f3 and ab’c’from f3 can be used in f1.
Replacing bd with a’bd + abd, the gate needed to realize bd
can be eliminated.
m10 and m11 in f1 are already covered by b’c, and ab’c’from
f3 can be used to cover m8 and m9, thus ab’being eliminated
The minimum solution is therefore
38. Department of Communication Engineering, NCTU 38
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
Determination of essential prime implicants for multiple-
output realization
The prime implicants essential to an individual function
may not be essential to the multiple-output realization
bd is an essential prime implicant of f1 but not of all f’s
39. Department of Communication Engineering, NCTU 39
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
When searching for a prime implicant to an multiple-output
realization,
Check each 1 which do not appear on the other function maps
Example 1
c’d is essential to f1, bd’is essential to f2
abd is not essential since it appears on both maps
40. Department of Communication Engineering, NCTU 40
Logic Design Unit 7 Multi-Level Gate Circuits Sau-Hsuan Wu
Example 2
a’d’and a’bc’are essential to f1
bd’and a’b’c are essential to f2