Professional Documents
Culture Documents
Digital Circuit by The University of Taiwan
Digital Circuit by The University of Taiwan
Logic Design
Jie-Hong Roland Jiang
Fall 2013
2
Outline
Multi-level gate circuits
NAND and NOR gates
Design of two-level circuits using NAND and NOR
gates
Design of multi-level NAND- and NOR-gate
circuits
Circuit conversion using alternative gate symbols
Design of two-level, multiple-output circuits
Multiple-output NAND and NOR circuits
4
Multi-Level Gate Circuits
Z=(AB+C)(D+E+FG)+H A B F G
2 2 level 4
C DE
2 3 level 3
2 level 2
H
2 level 1
2 * level 3
AB C A BF G C F G
3 2 4 3 level 2
same gate
5 level 1
Z
OR-AND-OR 3-level realization of Z
Partially multiplying out Z = (AB+C)[(D+E)+FG]+H
3 levels, 6 gates, 19 gate inputs
6
Multi-Level Gate Circuits
Drawing the tree diagram of an expression
helps determine the realization costs
#level circuit delay
#gates, #gate inputs circuit area
a'
ab c'
cd 00 01 11 10 d
b
00 0 0 0 0 c'
d
f
b
01 1 1 1 0 c
d'
a
11 0 0 0 0 c
d'
8
Multi-Level Gate Circuits
Example (contd)
f = a'c'd+bc'd+bcd'+acd'
= c'd(a'+b)+cd'(a+b)
ab
cd 00 01 11 10 a'
b c'
00 0 0 0 0 d
f
01 1 1 1 0 c
a d'
b
11 0 0 0 0
c
ab
cd 00 01 11 10 d
a'
00 0 0 0 0 b
c
f
c'
01 1 1 1 0
d'
a
11 0 0 0 0 b
c'
10
Multi-Level Gate Circuits
Example (contd)
f = (c+d)(a'+b+c)(c'+d')(a+b+c')
= (c+a'd+bd)(c'+ad'+bd')
ab a
cd 00 01 11 10 d'
b c'
00 0 0 0 0 d'
f
a'
01 1 1 1 0 d c
b
11 0 0 0 0 d
11
12
NAND and NOR Gates
NAND
AND-NOT gate
3-input NAND: F = (ABC)' = A'+B'+C'
n-input NAND: F = (X1X2Xn)' = X1'+X2'+...+Xn'
A A X1
B F B F X2 F
C C Xn
NOR
OR-NOT gate
3-input NOR: F = (A+B+C)' = A'B'C'
n-input NOR: F = (X1+X2++Xn)' = X1'X2'...Xn'
A A X1
B F B F X2 F
C C Xn
13
X'
X
X'Y'
(X'Y')'=X+Y
Y
Y'
14
NAND and NOR Gates
{NAND} is functionally complete
NOT: (XX)' = X' X
X'
AND: ((AB)')' = AB
A (AB)'
B AB
15
16
NAND and NOR Gates
Exercises
Show that the sets {NOR} and {OR, NOT} are
functionally complete
Is the majority gate major functionally complete?
major(A,B,C) = 1 iff at least two of A, B, C are 1
Is the minority gate minor functionally complete?
minor(A,B,C) = 1 iff at most one of A, B, C is 1
Is {} functionally complete?
AB is true iff A is false (0), or both A and B are true (1)
Does the assumption 0 and 1 are available as gate inputs
make a difference?
17
Example 1
F = A+BC'+B'CD (AND-OR)
= [(A+BC'+B'CD)']'
= [A'(BC')'(B'CD)']' (NAND-NAND)
= [A'(B'+C)(B+C'+D')]' (OR-NAND)
= A+(B'+C)'+(B+C'+D')' (NOR-OR)
18
Two-Level Circuit Design Using NAND
and NOR Gates
F=A+BC'+B'CD
B
C'
A F
B'
C
D
F=A+(B'+C)'+(B+C'+D')' F=[A'(BC')'(B'CD)']'
AND-
B' OR B
NOR- NAND-
C C'
A F OR NAND A' F
B OR- B'
C' C
D' NAND D
B'
C
A' F
B
C'
D'
F=[A'(B'+C)(B+C'+D')]' 19
F = (A+B+C)(A+B'+C')(A+C'+D) (OR-AND)
= {[(A+B+C)(A+B'+C')(A+C'+D)]'}'
= [(A+B+C)'+(A+B'+C')'+(A+C'+D)']' (NOR-NOR)
= [(A'B'C')+(A'BC)+(A'CD')]' (AND-NOR)
= (A'B'C')'(A'BC)'(A'CD')' (NAND-AND)
20
Two-Level Circuit Design Using NAND
and NOR Gates
A
B F=(A+B+C)(A+B'+C')(A+C'+D)
C
A
B' F
F=(A'B'C')' C'
(A'BC)'(A'CD')' A F=[(A+B+C)'+
C' (A+B'+C')'+(A+C'+D)']'
D
A' OR- A
B' B
C' AND C
NAND- NOR-
A' A
B F AND NOR B' F
AND-
C C'
A' NOR A
C A' C'
D' B' D
C'
A'
B F
C
A' F=(A'B'C'+A'BC+A'CD')'
C 21
D
E.g.,
NAND-NOR form can realize only a product of literals and not a
sum of products
a
b
e F = [(ab)'+(cd)'+e]' = abcde'
c
d
22
Two-Level Circuit Design Using NAND
and NOR Gates
NAND-NAND and NOR-NOR are the most widely used
forms in integrated circuits
F = l1+l2++P1+P2+ F = (l1'l2'P1'P2')'
x1 P1 l1 x1 P1' l1'
x2 x2
l2 l2'
F F
y1 P2 y1 P2'
y2 y2
23
24
Design of Multi-Level NAND- and
NOR-Gate Circuits
Example
F1 = a'[b'+c(d+e')+f'g']+hi'j+k
A A' A A'
NOT
26
Circuit Conversion Using Alternative
Gate Symbols
NAND gate circuit conversion
A
1
B' 2
C F 4 Z
D
3
E
A A'+B [(A'+B)C]'
1
B' 2
C F 4 Z= (A'+B)C+F'+DE
D
3
E (DE)'
A'
1
B 2
C F' 4 Z
D
3
E 27
29
A
B'
C
D F
E
A
B'
C
D F
E
A
B'
C
D' F
E'
30
Two-Level, Multiple-Output Circuit
Design
In circuit design, often we need several
Boolean functions rather than one
Although every function can be implemented
separately, recognizing common gates among
these functions can achieve logic sharing and
thus reduce area
When designing multiple-output circuits, we
should try to first minimize the total number of
gates required and then minimize gate inputs
31
F1 F2 F3
AB AB AB
CD 00 01 11 10 CD 00 01 11 10 CD 00 01 11 10
00 1 00 1 00 1
01 1 01 1 01 1
11 1 1 11 1 1 1 1 11 1 1 1
10 1 10 10 1
f1 f2 f3
ab ab ab
cd 00 01 11 10 cd 00 01 11 10 cd 00 01 11 10
00 1 00 00 1
01 1 1 1 01 1 01 1 1
11 1 1 1 1 11 1 1 1 1 11 1 1
10 1 1 10 1 1 1 1 10 1 1
34
Two-Level, Multiple-Output Circuit
Design
Example (contd)
f1 = bd+b'c+ab' f1 = a'bd+abd+ab'c'+b'c
f2 = c+a'bd f2 = c+a'bd
f3 = bc+ab'c'+abd f3 = bc+ab'c'+abd
35
Solution with 00 1 1 f1 00 1 1 1 f2
maximum # of 01 1 01 1
common terms: 11 11
(8 gates, 26 inputs)
10 1 1 1 10 1 1
ab ab
cd 00 01 11 10 cd 00 01 11 10
00 1 1 f1 00 1 1 1 f2
Best solution (no
01 1 01 1
common terms):
7 gates, 18 inputs 11 11
10 1 1 1 10 1 1
37
38
Multiple-Output NAND and NOR
Circuits
Procedure for designing single-output,
multi-level NAND- and NOR-gate circuits
applies to multiple-output circuits
If all of the output gates are OR (AND), direct
conversion to a NAND-gate (NOR-gate) circuit
is possible
39
a d
b' c' F1
e'
f
h' F2
g'
40