Title: ECE2030 Introduction to Computer Engineering Lecture 1
1ECE2030 Introduction to Computer
EngineeringLecture 9 Combinational Logic,
Mixed Logic
Prof. Hsien-Hsin Sean Lee School of Electrical
and Computer Engineering Georgia Tech
2Logic Design
- Logic circuits
- Combinational
- Sequential
3Combinational Logic
- Outputs, at any time, are determined by the
input combination - When input changed, output changed immediately
- Note that real circuits are imperfect and have
propagation delay - A combinational circuit
- Performs logic operations that can be specified
by a set of Boolean expressions - Can be built hierarchically
4Design Hierarchy Example
9-input Odd Function
X0
X1
9-input Odd Function
X2
Z
X3
X4
X5
X6
X7
X8
Function Specification To detect odd number of
1 inputs, i.e. Z1 when there is an odd
number of 1 present in the inputs
How to design a 3-input Odd Function?
5Derive Truth Table for Desired Functionality
A B C F
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
BC
00 01 11 10
0 0 1 0 1
1 1 0 1 0
A
6Design Hierarchy Example
9-input Odd Function
X0
X1
9-input Odd Function
X2
Z
X3
X4
X5
X6
X7
X8
3-input Odd function B0A0??A1?A2
7Combinational Logic Design Example
F
8Mixed Logic
- Enable component reuse
- Allow a digital logic circuit designer to
implement a combinational logic with - Only NAND gates
- Only NOR gates
- Only NAND and NOR gates
9DeMorgans Law
10Mixed Logic (1)
- Implement all ORs in the Boolean function
- Implement all ANDs in the Boolean function
- Forget all the inversion at this moment
11Example Mixed Logic (1)
B
C
A
D
12Mixed Logic (2)
- Draw Vertical Bars in the circuits where all
complements in the Boolean equation occur - Draw a bubble on each Vertical Bar
13Example Mixed Logic (2)
B
C
A
D
14Mixed Logic (3)
- Convert each gate to the desired gate
- If only NAND gate is available, insert a bubble
in front of the AND gate - If only OR gate is available, insert a bubble in
front of the OR gate - Using DeMorgans Law in the process
- OR ? NAND by adding 2 bubbles on the inputs side
of OR - AND ? NOR by adding 2 bubbles on the inputs side
of the AND
15Example Mixed Logic (3)
Assume this design uses NAND gates only
B
C
A
D
16Mixed Logic (4)
- Balance the bubbles on each wire, i.e. even out
the number of bubbles on every wire - If there is odd number of bubbles on a wire, add
an inverter (i.e. a bubble) - And remove those vertical bars with bubbles
which are used to help only, not in the circuits
17Example Mixed Logic (4)
Assume this design uses NAND gates only
B
C
A
D
18How about Inverters?
- Inverters can be implemented by either a NAND or
a NOR gate - Wiring the inputs together
19Example Mixed Logic (Final)
Assume this design uses NAND gates only
B
C
A
D
20Example Mixed Logic (Final)
Assume this design uses NAND gates only
B
C
A
D
6 NAND gates are used
21Mixed Logic
- How about build the prior circuits with only NOR
gates?
22Example Mixed Logic (1)
B
C
A
D
23Example Mixed Logic (2)
B
C
A
D
Add vertical bar for each inversion
24Example Mixed Logic (3)
Assume this design uses NOR gates only
B
C
A
D
Convert each gate to a NOR
25Example Mixed Logic (4)
Assume this design uses NOR gates only
B
C
A
D
Balance number of Bubbles on each wire
26Example Mixed Logic (4)
Assume this design uses NOR gates only
B
C
A
D
Balance number of bubbles on each wire and
substitute all gates to NOR
27Example Mixed Logic (Final)
Assume this design uses NOR gates only
B
C
A
D
7 NOR gates are used
28Mixed Logic Example II (1)
C
D
B
A
Implement the logic circuits by ignoring all
inversions
29Mixed Logic Example II (2)
C
D
B
A
Add vertical bar/bubble for each inversion
30Mixed Logic Example II (3)
C
D
B
A
Assume this design uses NAND gates only
31Mixed Logic Example II (4)
C
D
B
A
Balance the bubbles for each wire w/ inverters
32Mixed Logic Example II (5)
C
D
B
A
Remove the vertical bars/bubbles
33Mixed Logic Example II (6)
C
D
B
A
Replace all the gates to NAND gates
34Mixed Logic Example II (7)
C
D
B
A
Final mixed logic uses 11 NAND gates (one of
them is a triple-input NAND gate)
35Mixed Logic Example III (1)
B
D
A
C
Implement the logic circuits by ignoring all
inversions
36Mixed Logic Example III (2)
B
D
A
C
Add vertical bar/bubble for each inversion
37Mixed Logic Example III (3)
B
D
A
C
Assume this design uses NOR gates only
38Mixed Logic Example III (4)
B
D
A
C
Balance the bubbles for each wire w/ inverters
39Mixed Logic Example III (5)
B
D
A
C
Remove the vertical bars/bubbles
40Mixed Logic Example III (6)
B
D
A
C
Replace all the gates to NOR gates
41Mixed Logic Example III (7)
B
D
A
C
Final mixed logic uses 9 NOR gates