Chapter 3 Gate-Level Minimization
Chapter 3 Gate-Level Minimization
Simplification of Boolean
Functions
January 4, 2025 1
3-1 Introduction
Gate-level minimization refers to the design task of
finding an optimal gate-level implementation of Boolean
functions describing a digital circuit.
January 4, 2025 2
3-2 The Map Method
The complexity of the digital logic gates
The complexity of the algebraic expression
Logic minimization
Algebraic approaches: lack specific rules
The Karnaugh map k-map
A simple straight forward procedure
A pictorial form of a truth table
Applicable if the # of variables < 7
A diagram made up of squares
Each square represents one minterm
January 4, 2025 3
Review of Boolean Function
Boolean function
Sum of minterms
Sum of products (or product of sum) in the simplest form
A minimum number of terms
A minimum number of literals
The simplified expression may not be unique
January 4, 2025 4
Two-Variable Map
A two-variable map
Four minterms
x' = row 0; x = row 1
y' = column 0; y =
column 1
A truth table in square
diagram
Fig. 3.2(a): xy = m3 Figure 3.1 Two-variable Map
Fig. 3.2(b): x+y =
x'y+xy' +xy =
m1+m2+m3
January 4, 2025 7
A Three-variable Map
m0+m4= x’y’z’+xy’z’ = y’z’
m1+m5=x’y’z+xy’z=y’z
m3+m7= x’yz+xyz =yz
m2+m6= x’yz’+xyz’ =yz’
January 4, 2025 8
A Three-variable Map
m0+m4= x’y’z’+xy’z’ = y’z’
m1+m5=x’y’z+xy’z=y’z
m3+m7= x’yz+xyz =yz
m2+m6= x’yz’+xyz’ =yz’
xyz 00 01 11 10
0 m0 m1 m3 m2
(x’y’z’) (x’y’z) (x’yz) (x’yz’)
1 m4 m5 m7 m6
(xy’z’) (xy’z) (xyz) (xyz’)
January 4, 2025 9
Example 3.1
Example 3.1: simplify the Boolean function F(x, y, z) =
S(2, 3, 4, 5)
F(x, y, z) = S(2, 3, 4, 5) = x'y + xy'
Figure 3.4 Map for Example 3.1, F(x, y, z) = Σ(2, 3, 4, 5) = x'y + xy'
January 4, 2025 10
Example 3.2
Example 3.2: simplify F(x, y, z) = S(3, 4, 6, 7)
F(x, y, z) = S(3, 4, 6, 7) = yz+ xz’
YZ+XZ’+XY
Figure 3.6 Map for Example 3-3, F(x, y, z) = Σ(0, 2, 4, 5, 6) = z' +xy'
January 4, 2025 13
Example 3.4
Example 3.4: let F = A'C + A'B + AB'C + BC
a) Express it in sum of minterms.
b) Find the minimal sum of products expression.
Ans:
F(A, B, C) = S(1, 2, 3, 5, 7) = C + A'B
Figure 3.7 Map for Example 3.4, A'C + A'B + AB'C + BC = C + A'B
January 4, 2025 14
January 4, 2025 15
Example 3.4
Obtain simplified expressions in sum of products
F = XY+X’Y’Z’+X’YZ’
F=A’B+BC’+B’C’ =C’+A’B
F=D(A’+B)+B’(C+AD) = D+B’C
F(A,B,C,D)=Σ(2,3,12,13,14,15)==AB+A’B’C
F=A’B’C’D’+AC’D’+B’CD’+A’BCD+BC’D
==B’D’+A’BD+ABC’
F=BDE+B’C’D+CDE+A’B’CE+A’B’C+B’C’D’E’
= DE+A’B’C+B’C’E’
January 4, 2025 16
3.3 Four-Variable Map
The map
16 minterms
Combinations of 2, 4, 8, and 16 adjacent squares
F = y'+w'z'+xz'
Figure 3.9 Map for Example 3-5; F(w, x, y, z) = Σ(0, 1, 2, 4, 5, 6, 8, 9, 12, 13, 14) = y' + w' z' +xz'
January 4, 2025 19
Example 3.6
Example 3-6: simplify F = ABC + BCD + ABCD +
ABC
=A’B’C’(D+D’)+(A+A’)B’CD’+A’B’C’D’+AB’C’(D+D’)
=A’B’C’D+A’B’C’D’+AB’CD’+A’B’CD’+A’BCD’+AB’C’D+AB’
C’D’
=0001+0000+1010+0010+0110+1001+1000
=(0,1,2,6,8,9,10)
January 4, 2025 20
Example 3.6
Example 3-6: simplify F = ABC + BCD + ABCD +
ABC
B’C’+B’D’+A’CD’
January 4, 2025 21
Prime Implicants
Prime Implicants
All the minterms are covered.
Minimize the number of terms.
A prime implicant: a product term obtained by combining the
maximum possible number of adjacent squares (combining all
possible maximum numbers of squares).
Essential P.I.: a minterm is covered by only one prime
implicant.
The essential P.I. must be included.
January 4, 2025 22
Prime Implicants
Consider F(A, B, C, D) = Σ(0, 2, 3, 5, 7, 8, 9, 10, 11, 13, 15)
The simplified expression may not be unique
F = BD+B'D'+CD+AD = BD+B'D'+CD+AB'
= BD+B'D'+B'C+AD = BD+B'D'+B'C+AB'
January 4, 2025 25
Example 3.7
Example 3.7: simplify F = S(0, 2, 4, 6, 9, 13, 21, 23, 25,
29, 31)
F = A'B'E'+BD'E+ACE
January 4, 2025 26
3-5 Product of Sums Simplification
Approach #1
Simplified F' in the form of sum of products
Apply DeMorgan's theorem F = (F')'
F': sum of products → F: product of sums
The 1’s marked in the map represent all the minterms of
the function F.
The 0’s marked in the map represent all the minterms not
included in F means complement of function F that is F’.
Combined all 1’s mark squares gives simplified F(SOP).
Combined all 0’s mark squares gives simplified F’(SOP).
Apply DeMorgan’s on F’ gives simplified F(POS).
27
Example 3.8
Example 3.8: simplify F = S(0, 1, 2, 5, 8, 9, 10) into (a)
sum-of-products form, and (b) product-of-sums form:
F ( x, y , z ) (1,3, 4,6)
In sum-of-maxterm:
(complement of F)
F ( x, y , z ) (0, 2,5,7)
January 4, 2025 30
Sum-of-Minterm Procedure
Consider the function defined in Table 3.2.
Combine the 1’s:
F ( x, y , z ) xz xz
Combine the 0’s :
F'( x, y , z ) xz xz
Taking the Demorgan’s of F’
POS: F=(X’+Z’)(X+Z)
January 4, 2025 31
If function expressed in POS ask to present in map,
Take the complement of the function and from it find the
squares to be marked by 0’s.
F=(A’+B’+C)(B+D)
F’=ABC’+B’D’
And then marking 0’s in the squares representing the
minterms of F’. The remaining squares are marked with
1’s. '
January 4, 2025 32
EXAMPLES
Obtain the simplified expressions in POS,sop:
F(x,y,z)= p(0,1,4,5) =Y
X yz 00 01 11 10
0 0 0 1 1
1 0 0 1 1
F’=y’
(F’)’=Y (pos)
F=Y (SOP)
January 4, 2025 33
EXAMPLES
Obtain the simplified expressions in POS:
F(A,B,C,D)=P(0,1,2,3,4,10,11)= (B+C’)(A+B)(A+C+D)
Combine 0’s complement of sop
F’= A’B’+A’C’D’+B’C
(F’)’ = (A’B’+A’C’D’+B’C)’
POS=(A+B)(A+C+D)(B+C’)--pos
'
Combine 1’s SOP
F= BC+BD+AC’
January 4, 2025 34
EXAMPLES
Obtain the simplified SOP and POS And implement
using AND and OR gates.
F=(A+B’+D)(A’+B+D)(C+D)(C’+D’)
Find DeMorgan’s of F is
F’=A’BD’+AB’D’+C’D’+CD
January 4, 2025 35
3-6 Don't-Care Conditions
The value of a function is not specified for certain
combinations of variables
BCD; 1010-1111: don't care
The don't-care conditions can be utilized in logic
minimization
Can be implemented as 0 or 1
Example 3.9: simplify F(w, x, y, z) = S(1, 3, 7, 11, 15)
which has the don't-care conditions d(w, x, y, z) = S(0,
2, 5).
January 4, 2025 36
Example 3.9 (cont.)
F = yz + w'x'; F = yz + w'z
F = S(0, 1, 2, 3, 7, 11, 15) ; F = S(1, 3, 5, 7, 11, 15)
Either expression is acceptable
Combine 1’s
F’=Z’ + WY’
(F’)’= Z(W’+Y) --POS
Take De-Morgan’s
(F’)’ =F= (x’+z)(w’+z’)---pos
F= ABC’+A’D ---sop
January 4, 2025 43
NAND Implementation
For NAND Gates implementation: SOP
F= AB+CD+E
Figure
January 4, 2025 3.20 Three ways to implement F = AB + CD
44
NAND Implementation
Two-level logic
NAND-NAND = sum of products
Example: F = AB+CD
By using DeMorgan’s theorem
F = ((AB)' (CD)' )' =AB+CD
Figure
January 4, 2025 3.20 Three ways to implement F = AB + CD
45
Example 3.10
Example 3-10: implement F(x, y, z) = Σ(0,6)
Uisng k-map Yz 00 01 11 10
x
0 1 0 0 0
F=x’y’z’+xyz’ sop
1 0 0 0 1
F’= z+ xy’+x’y sop’
((x’y)’(xy’)’z’)’= (x’y)+ (xy’)+z
January 4, 2025 47
Multilevel NAND Circuits
Boolean function implementation
AND-OR logic → NAND-NAND logic
AND → AND + inverter
OR: inverter + OR = NAND
For every bubble that is not compensated by another small circle
along the same line, insert an inverter.
January 4, 2025
Figure 3.24 Logic Operation with NOR Gates
50
Two Graphic Symbols for a NOR Gate
52
Example
January 4, 2025 53
Example 3.10
Example 3-10: implement F(x, y, z) = Σ(0,6)
Uisng k-map Yz 00 01 11 10
x
COMBINE 0’S
0 1 0 0 0
F’= z+ xy’+x’y – sop’
1 0 0 0 1
(F’)’=Z’(X’+Y)(X+Y’)
Take De-Morgans
(F’)’=(BD+BC+AC)’ (P0S)
=(B’+D’)(B’+C’)(A’+C’)
Take De-Morgans
(F’)’=F=(BD+BC+AC)’ (P0S) implement using NOR
=(B’+D’)(B’+C’)(A’+C’) gate for F and F’ both.
Take De-Morgans of F
F’= (A+B)(C+D)(B+C) (POS)
January 4, 2025 62
AND-OR-Invert Implementation
AND-OR-INVERT (AOI) Implementation
NAND-AND = AND-NOR = AOI
F = (AB+CD+E)’ ((AB)’.(CD)’E’)= (AB+CD+E)’
F' = AB+CD+E (sum of products)
SOP– AND-OR /NAND-NAND
January 4, 2025 65
Tabular Summary and Examples
January 4, 2025 66
January 4, 2025 Figure 3.31 Other Two-level Implementations 67
The Tabulation Method
To overcome a difficulty of function simplification of six
or more variables.
It give guaranteed to produce a simplified standard-
form expression for a function.
It can applied to problems with many variables.
It has the advantage of being suitable for machine
computation.
It is also known as the Quine-McCluskey method.
Two parts: the first is to find by an exclusive search all
the terms that are candidates for inclusion in the
simplified function. These terms are prime-implicants.
Choose among the prime-implicants those give an
expression with the least number of literals.
January 4, 2025 68
Determine the prime- implicants
January 4, 2025 69
Example: simplify the Boolean function by using the tabular
method: F= S(0,1,2,8,10,11,14,15)
Step 1: group binary representation of the minterms
according to the number
W of
X 1’s
Y contained.
Z
0 0 0 0 0 √
col a.
1 0 0 0 1 √
2 0 0 1 0 √
8 1 0 0 0 √
10 1 0 1 0 √
11 1 0 1 1 √
14 1 1 1 0 √
15 1 1 1 1 √
January 4, 2025 70
W X
Example: simplify Y Boolean
the Z function by using the tabular
0, 1 F=0 S(0,1,2,8,10,11,14,15)
method: 0 0 _
0, 2 0 0 _ 0 √
Step 2: any two minterms which are differ from each
other
0, 8by only
_ 0one0 variable
0 √can be combined, and
unmatched variable removed.
2, 10 _ 0 1 0 √
8, 10 1 0 _ 0 √
10, 11 1 0 1 _ √
col b.
10, 14 1 _ 1 0 √
11, 15 1 _ 1 1 √
14, 15 1 1 1 _ √
January 4, 2025 71
Example: simplify the Boolean function by using the tabular
method: F= S(0,1,2,8,10,11,14,15)
Step 3: any two minterms which are differ from each
other by only one variable can be combined, and
unmatched variable removed.
W X Y Z
col c.
0, 2, 8, 10 _ 0 _ 0
0, 8, 2, 10 _ 0 _ 0
10 11 14, 15 1 _ 1 _
, ,
10 14 11, 15 1 _ 1 _
, ,
January 4, 2025 72
Example: simplify the Boolean function by using the tabular
method: F= S(0,1,2,8,10,11,14,15)
Step 4: the Unchecked terms in the table form the
prime-implicants.
In col b:- w’x’y’---0,1
In col c:- x’z’—0,2,8,10and wy—10,11,14,15
The sum of prime-implicants gives the minimized function
in sum of products.
F= W’X’Y’ +X’Z’+WY
January 4, 2025 73
3-9 Exclusive-OR Function
Exclusive-OR (XOR)
xÅy = xy'+x'y
Exclusive-NOR (XNOR)
(xÅy)' = xy + x'y'
Some identities
xÅ0 = x
xÅ1 = x'
xÅx = 0
xÅx' = 1
xÅy' = (xÅy)'
x'Åy = (xÅy)'
Commutative and associative
AÅB = BÅA
(AÅB) ÅC = AÅ (BÅC) = AÅBÅC
January 4, 2025 74
Exclusive-OR Implementations
Implementations
(x'+y')x + (x'+y')y = xy'+x'y = xÅy
January 4, 2025 77
Four-variable Exclusive-OR
function
Four-variable Exclusive-OR function
AÅBÅCÅD = (AB'+A'B)Å(CD'+C'D) = (AB'+A'B)(CD+C'D')+
(AB+A'B')(CD'+C'D)
January 4, 2025 80
Parity Generation and Checking
January 4, 2025 81
3.10 Hardware Description Language
(HDL)
Describe the design of digital systems in a textual form
Hardware structure
Function/behavior
Timing
VHDL and Verilog HDL
January 4, 2025 82
A Top-Down Design Flow
Specification
Logic Synthesis
January 4, 2025 83
Module Declaration
Examples of keywords:
module, end-module, input, output, wire, and, or,
and not
January 4, 2025 84
HDL Example 3.1
HDL description for circuit shown in Fig. 3.37
January 4, 2025 85
Gate Displays
Example: timescale directive
‘timescale 1 ns/100ps
January 4, 2025 86
HDL Example 3.2
Gate-level description with propagation delays for circuit
shown in Fig. 3.37
January 4, 2025 87
HDL Example 3.3
Test bench for simulating the circuit with delay
January 4, 2025 88
Simulation output for HDL
Example 3.3
January 4, 2025 89
Boolean Expression
Boolean expression for the circuit of Fig. 3.37
Boolean expression:
January 4, 2025 90
HDL Example 3.4
January 4, 2025 91
User-Defined Primitives
General rules:
Declaration:
January 4, 2025 92
HDL Example 3.5
January 4, 2025 93
HDL Example 3.5 Continued)
January 4, 2025 94
Figure 3.39 Schematic for circuit with_UDP_02467
January 4, 2025 95