Lecture 3
Lecture 3
Lecture 3
COURSEOUTLINE
1. Introduction
2. Gate-Level Minimization
3. Combinational Logic
4. Synchronous Sequential Logic
5. Registers and Counters
6. Memories and Programmable Logic
2
4-VARIABLEMAP
• Notice the order of the minterms
3
NOTESONA4-VARIABLEMAP
•The number of adjacent squares that may be combined must always
represent a number that is a power of two, suchas 1, 2, 4, 8 and 16
•Asmore adjacent squares are combined, we obtain a product term
with fewer literals
• One square represents one minterm, giving a term with 4 literals
• Two adjacent squares represent a term with 3 literals
• Four adjacent squares represent a term with 2 literals
• Eight adjacent squares represent a term with 1 literal
• Sixteen adjacent squares encompass the entire map and produce a
function that is always equal to logic 1
4
4-VARIABLEMAP:EXAMPLEI
Simplify the Boolean expression:
𝐹 𝐴, 𝐵, 𝐶, 𝐷 = Σ(0,1,2,4,5,7,8,9,10,12,13)
5
4-VARIABLEMAP:EXAMPLEI
Simplify the Boolean expression:
𝐹 𝐴, 𝐵, 𝐶, 𝐷 = Σ(0,1,2,4,5,7,8,9,10,12,13)
𝐹 𝐴, 𝐵, 𝐶, 𝐷 = 𝐶 ′ + 𝐵′𝐷′ + 𝐴′𝐵𝐷
6
4-VARIABLEMAP:EXAMPLEII
Simplify the Boolean expression:
𝐹 𝑤, 𝑥, 𝑦, 𝑧 = Σ(0,1,2,4,5,6,8,9,12,13,14)
7
4-VARIABLEMAP:EXAMPLEII
Simplify the Boolean expression:
𝐹 𝑤, 𝑥, 𝑦, 𝑧 = Σ(0,1,2,4,5,6,8,9,12,13,14)
𝐹 𝑤, 𝑥, 𝑦, 𝑧 = 𝑦 ′ + 𝑤 ′ 𝑧 ′ + 𝑥𝑧′
8
CHOICEOFBLOCKS
We can simplify a function by using larger blocks
🢝 Do we really need all blocks?
🢝 Can we leave some out to further simplify an expression?
Any function needs to contain a special type of blocks
🢝These are called Essential Prime Implicants
We need to define some new terms:
🢝 Implicant
🢝 Prime implicant
🢝 Essential prime implicant
9
TERMINOLOGY
Implicant (I)
🢝Any product termin the SOP form
🢝A block of 1sin a K-map
Prime implicant (PI)
🢝Block of 1s that cannot be further increased
🢝Product termthat cannot be further reduced
Essential prime implicant (EPI)
🢝A prime implicant on a K-map which covers at least one 1 which is not covered by
any other prime implicant is called an Essential Prime Implicant
11
ILLUSTRATINGTHETERMS:EXAMPLEI
The Prime Implicants are:
1 1
1 1 1
1 1 1
1 1
12
ILLUSTRATINGTHETERMS:EXAMPLEI
The Prime Implicants are:
• 𝐴 ′ 𝐷 𝑔𝑟𝑎𝑦 ,
• 𝐴𝐶 𝑟𝑜𝑠𝑒 ,
• 𝐵𝐶 ′ 𝐷 ′ 𝑝𝑖𝑛𝑘 ,
• 𝐶𝐷 𝑝𝑢𝑟𝑝𝑙𝑒 ,
• 𝐴𝐵𝐷 ′ 𝑔𝑟𝑒𝑒𝑛 ,
• 𝐴 ′ 𝐵𝐶 ′ (𝑦𝑒𝑙𝑙𝑜𝑤).
1 1 1
1 1 1
14
ILLUSTRATINGTHETERMS:EXAMPLEII
The Prime Implicants are:
• 𝐵𝐷 𝑔𝑟𝑎𝑦 ,
• 𝐴′𝐵𝐶′ 𝑦𝑒𝑙𝑙𝑜𝑤 ,
• 𝐴𝐶 ′ 𝐷 𝑝𝑢𝑟𝑝𝑙𝑒 ,
• 𝐴𝐵𝐶 𝑔𝑟𝑒𝑒𝑛 ,
• 𝐴′𝐶𝐷 𝑟𝑜𝑠𝑒 .
16
PRODUCTOFSUMSMINIMIZATION
How to generate a POSfrom a K-map?
•Use duality of Boolean algebra
(DeMorgan’s law)
CD
00 01 11 10
• Look at the 0s in map instead of the 1s AB
17
PRODUCTOFSUMSMINIMIZATION
How to generate a POSfrom a K-map?
•Use duality of Boolean algebra
(DeMorgan’s law)
CD
00 01 11 10
• Look at the 0s in map instead of the 1s AB
18
PRODUCTOFSUMSMINIMIZATION
How to generate a POSfrom a K-map?
•Use duality of Boolean algebra
(DeMorgan’s law)
• Look at the 0s in map instead of the 1s
• Generate blocks around the 0s
🢝This gives the inverse of 𝐹
🢝Use duality to generate POS
Example:
🢝𝐹 = ∑(0,1,2,5,8,9,10)
🢝𝐹′ = 𝐴𝐵 + 𝐶𝐷 + 𝐵𝐷 ′
🢝𝐹 = (𝐴′ + 𝐵′)(𝐶 ′ + 𝐷′)(𝐵′ + 𝐷)
19
GATEIMPLEMENTATION
SOP using: POS using:
• The 1s in the k-map • The 0s in the k-map
20
EXAMPLEONPOSMINIMIZATION
🢝Given the K-map below, produce
the 𝐹′ from the zeros in the map
and then obtain 𝐹 from it
𝐹 ′ = AB′+AC′+A′BCD ′
𝐹 = (AB′)(AC′)(A′BCD′ )
𝐹 = (𝐴′ + 𝐵)(𝐴′ + 𝐶)(𝐴 + 𝐵 ′ + 𝐶′ + 𝐷)
21
DON’TCARECONDITIONS
🢝There may be a combination of input values which:
🢝Will never occur,
🢝If they do occur, the output is of no concern
22
MINIMIZATIONUSINGDON’TCARES
🢝Treat don’t cares as if they are 1s to generate Prime Implicants
23
MINIMIZATIONEXAMPLE
𝐹 𝑤, 𝑥, 𝑦, 𝑧 = ∑(1,3,7,11,15) and 𝑑 𝑤, 𝑥, 𝑦, 𝑧 = ∑(0,2,5)
What are the possible solutions?
𝐹 = 𝑦𝑧 + 𝑤 ′ 𝑥′ 𝐹 = 𝑦𝑧 + 𝑤 ′ 𝑧 24
24
EXAMPLEINVOLVINGX
Simplify the function whose K-map is shown at the
right
𝐹 = 𝐴 ′ 𝐶 ′ 𝐷 + 𝐴𝐵′ + 𝐶𝐷 ′ + 𝐴′𝐵𝐶′
or
𝐹 = 𝐴 ′ 𝐶 ′ 𝐷 + 𝐴𝐵 ′ + 𝐶𝐷 ′ + 𝐴′𝐵𝐷′
25
ANOTHEREXAMPLE
Simplify the function whose K-map is shown at
the right
𝐹 = 𝐴 ′ 𝐶 ′ + 𝐴𝐵
or
𝐹 = 𝐴 ′ 𝐶 ′ + 𝐵𝐷′
26
NANDANDNORIMPLEMENTATIONS
•Digital circuits are frequently constructed with NAND or NOR gates
rather than AND & OR gates
• NAND and NOR gates are easier to fabricate with electronic
components and are the basic gates used in all IC digital logic families
27
NANDANDNORIMPLEMENTATIONS
Vdd Vdd
Gnd Gnd
28
A B C
0 0 1
0 1 1
NANDIMPLEMENTATION 1
1
0
1
1
0
vdd
A B 0 1
C
A
B 0 1
Gnd
29
A B C
0 0 1
0 1 1
NANDIMPLEMENTATION 1
1
0
1
1
0
vdd vdd
0 0 0 1
1 vdd
0 0 1
Gnd Gnd
30
A B C
0 0 1
0 1 1
NANDIMPLEMENTATION 1
1
0
1
1
0
vdd vdd
0 1 0 1
1 vdd
1 0 1
Gnd Gnd
31
A B C
0 0 1
0 1 1
NANDIMPLEMENTATION 1
1
0
1
1
0
vdd vdd
1 0 0 1
1 vdd
0 0 1
Gnd Gnd
32
A B C
0 0 1
0 1 1
NANDIMPLEMENTATION 1
1
0
1
1
0
vdd vdd
1 1 0 1
0 Gnd
1 0 1
Gnd Gnd
33
A B C
0 0 1
0 1 0
NORIMPLEMENTATION 1
1
0
1
0
0
vdd
A
0 1
A B
0 1
Gnd
34
A B C
0 0 0
0 1 0
ANDNAND-BASEDIMPLEMENTATION 1
1
0
1
0
1
vdd
A B 0 1
C C’
B 0 1
Gnd Gnd
35
A B C
0 0 0
0 1 0
ANDNAND-BASEDIMPLEMENTATION 1
1
0
1
0
1
vdd
A B 0 1
C=0 C’=1
vdd
A
B 0 1
Gnd Gnd
36
A B C
0 0 0
0 1 0
ANDNAND-BASEDIMPLEMENTATION 1
1
0
1
0
1
vdd
A B 0 1
C=1 C’=0
Gnd
A
B 0 1
Gnd Gnd
37
LOGICOPERATIONWITHNANDGATE
NOT, AND, and OR can be implemented with NAND!
The complement
operation is obtained
from a one-input NAND
gate that behaves
exactly like an inverter
38
CONVERSIONTONANDIMPLEMENTATION
Minimized expressions are AND-OR combinations
🢝There are two illustrations for NAND gates
CONVERSIONTONAND
IMPLEMENTATION
• Sum of minterms
C
D
40
NAND
Representations
CONVERSIONTONAND
IMPLEMENTATION
• Sum of minterms
41
NAND
Representations
NANDEXAMPLE
IMPLEMENTATION
Minimize and implement the
function
𝐹(𝑥, 𝑦, 𝑧) = ∑(1,2,3,4,5,7),
𝐹 = 𝑥𝑦 ′ + 𝑥 ′ 𝑦 + 𝑧
using only NAND gates
42
MULTILEVELNANDCIRCUITS
Multilevel circuits conversion rules:
1. Convert all AND gates to NAND with AND-invert symbols
2. Convert all OR gates to NAND with invert-OR symbols
3. Check all bubbles in the diagram. For every bubble that is not
compensated by another bubble, insert an inverter.
Example:
43
NAND
Representations
MULTILEVEL
NAND CIRCUITS
Multilevel circuits conversion rules:
1. Convert all AND gates to NAND with AND-invert symbols
2. Convert all OR gates to NAND with invert-OR symbols
3. Check all bubbles in the diagram. For every bubble that is not
compensated by another bubble, insert an inverter.
Example:
44
NAND
Representations
MULTILEVEL
NAND CIRCUITS
Multilevel circuits conversion rules:
1. Convert all AND gates to NAND with AND-invert symbols
2. Convert all OR gates to NAND with invert-OR symbols
3. Check all bubbles in the diagram. For every bubble that is not
compensated by another bubble, insert an inverter.
Example:
𝑪𝑫 𝑪𝑫
𝑩 𝑩
𝑨 𝑨
𝑩𝑪 𝑩𝑪
45
NAND
Representations
MULTILEVEL
NAND CIRCUITS
Multilevel circuits conversion rules:
1. Convert all AND gates to NAND with AND-invert symbols
2. Convert all OR gates to NAND with invert-OR symbols
3. Check all bubbles in the diagram. For every bubble that is not
compensated by another bubble, insert an inverter.
Example:
𝑩 + 𝑪𝑫 𝑩 + 𝑪𝑫
𝑨 𝑨
𝑩𝑪 𝑩𝑪
46
NAND
Representations
MULTILEVEL
NAND CIRCUITS
Multilevel circuits conversion rules:
1. Convert all AND gates to NAND with AND-invert symbols
2. Convert all OR gates to NAND with invert-OR symbols
3. Check all bubbles in the diagram. For every bubble that is not
compensated by another bubble, insert an inverter.
Example:
𝑩 + 𝑪𝑫 𝑨 (𝑩 + 𝑪𝑫)𝑨
𝑩𝑪 𝑩𝑪
47
NAND
Representations
MULTILEVELNAND
CIRCUITS:ANEXAMPLE
𝐹 = (𝐴𝐵′ + 𝐴′𝐵)(𝐶 + 𝐷′)
48
NAND
Representations
MULTILEVELNAND
CIRCUITS:ANEXAMPLE
𝐹 = (𝐴𝐵′ + 𝐴′𝐵)(𝐶 + 𝐷′)
49
NAND
Representations
MULTILEVELNAND
CIRCUITS:ANEXAMPLE
𝐹 = (𝐴𝐵′ + 𝐴′𝐵)(𝐶 + 𝐷′)
50
NAND
Representations
MULTILEVELNAND
CIRCUITS:ANEXAMPLE
𝐹 = (𝐴𝐵′ + 𝐴′𝐵)(𝐶 + 𝐷′)
51
LOGICOPERATIONWITHNORGATE
NORcan also replace NOT, AND & OR
The complement
operation is obtained
from a one-input NOR
gate that behaves
exactly like an inverter
52
NOR
Representations
CONVERTINGTONOR
IMPLEMENTATIONS
Same rulesas for NAND implementations
𝐹 = (𝐴𝐵′ + 𝐴′𝐵)(𝐶 + 𝐷′)
With NOR
𝐹 = (𝐴𝐵′ + 𝐴′𝐵)(𝐶 + 𝐷′)
53