0% found this document useful (0 votes)
8 views29 pages

FDSD04

This document discusses techniques for simplifying Boolean functions, including: - Algebraic manipulation using identities of Boolean algebra to simplify functions represented as equations. - Karnaugh map manipulation, which uses graphical grouping of adjacent 1s in truth tables to minimize product terms for functions of up to 4 variables. Examples show simplifying 2-variable and 3-variable functions using K-maps. - Other topics covered include prime implicants and essential prime implicants for systematic simplification, as well as don't-care conditions that allow further simplification. The goal is to find simpler representations of Boolean functions that can reduce the cost, size, and speed of resulting digital logic circuits.

Uploaded by

dani muller
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views29 pages

FDSD04

This document discusses techniques for simplifying Boolean functions, including: - Algebraic manipulation using identities of Boolean algebra to simplify functions represented as equations. - Karnaugh map manipulation, which uses graphical grouping of adjacent 1s in truth tables to minimize product terms for functions of up to 4 variables. Examples show simplifying 2-variable and 3-variable functions using K-maps. - Other topics covered include prime implicants and essential prime implicants for systematic simplification, as well as don't-care conditions that allow further simplification. The goal is to find simpler representations of Boolean functions that can reduce the cost, size, and speed of resulting digital logic circuits.

Uploaded by

dani muller
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Combinational Logic Circuits

Part III -Theoretical Foundations


Overview

◼ Simplifying Boolean Functions


◼ Algebraic Manipulation
◼ Karnaugh Map Manipulation (simplifying functions of 2, 3,
4 variables)
◼ Systematic Approach for Simplifying Functions
using K-maps
◼ Implicants, Prime Implicants (PIs), and Essential Prime
Implicants
◼ Simplifying Functions using Essential and Nonessential
PIs
◼ Don’t-care Conditions and Simplification using Don’t
Cares

Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 2
Boolean Functions as Equations
◼ Truth table and K-map of a Boolean X Y Z F1 F2 F3 F4
function are unique representations 0 0 0 1 1 1 1
◼ However, representing a Boolean function 0 0 1 0 0 0 0
as an equation can be done in many 0 1 0 1 1 1 1
different ways
0 1 1 0 0 0 0
◼ Canonical and Standard forms
1 0 0 0 0 0 0
◼ Example:
1 0 1 0 0 0 0
◼ F1(X,Y,Z) = X’•Y’•Z’ + X’•Y•Z’ + X•Y•Z’
◼ F2(X,Y,Z) = X’•Y’•Z’ + Y•Z’ 1 1 0 1 1 1 1
◼ F3(X,Y,Z) = X’•Z’ + X•Y•Z’ 1 1 1 0 0 0 0
◼ F4(X,Y,Z) = X’•Z’ + Y•Z’
◼ The corresponding truth tables for F1 to F4
are identical!
◼ Thus, F1 = F2 = F3 = F4 How do we simplify
◼ However, F2 and F3 are simpler than F1
and F4 is simpler than the others. Boolean functions?
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 3
Simplifying a Boolean Function

◼ Why simplifying Boolean functions?


◼ Boolean functions are used to design digital logic circuits
◼ Simpler Boolean function can mean cheaper, smaller,
faster circuit
◼ Three main approaches to simplify Boolean
functions:
◼ Algebraic Manipulations
◼ using the Boolean Algebra as a tool for simplifications
◼ Karnaugh Map Manipulations
◼ very easy graphical method to simplify Boolean functions
◼ it works for functions of up to 4 variables!
◼ Algorithmic Techniques
◼ used to program a computer to do the simplifications

Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 4
Algebraic Manipulation
◼ We use basic identities, properties, and theorems of the
Boolean Algebra to manipulate and simplify Boolean
functions
◼ Example1: Simplify F = X’YZ + X’YZ’ + XZ
F = X’YZ + X’YZ’ + XZ -- apply identity 14
= X’Y(Z+Z’) + XZ -- apply identity 7
= X’Y•1 + XZ -- apply identity 2
= X’Y + XZ
◼ Example2: Simplify G = X’Y’Z’ + X’YZ’ + XYZ’
F = X’Y’Z’ + X’YZ’ + XYZ’ -- apply identity 5
= X’Y’Z’ + X’YZ’ + X’YZ’ + XYZ’ -- apply identity 14
= X’Z’(Y’+Y) + YZ’(X’+X) -- apply identity 7
= X’Z’•1 + YZ’•1 -- apply identity 2
= X’Z’ + YZ’
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 5
Karnaugh Map Manipulations
◼ We can use a K-map to simplify a Boolean function of 2, 3, or
4 variables as Sum-Of-Products
◼ Procedure:
◼ Enter 1s in the K-map for each minterm (product term) in the function
◼ Group adjacent K-map cells containing 1s to obtain a product term
with fewer variables
◼ The number of cells in a group must be a power of 2 (2, 4, 8, …)!
◼ Try to group as many as possible cells containing 1s in a group
◼ Such group corresponds to a simpler product term!
◼ Try to make as less as possible groups to cover all cells containing 1s
◼ This corresponds to fewer product terms in the simplified function!
◼ Do not forget to handle boundary cells for K-maps of 3 or 4 variables
when you do the grouping
◼ Important: The result after the simplification may not be unique!
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 6
Simplifying a Boolean Function using
2-variable K-map (examples)
Given functions: Y 0 1 Simplified functions:
X
F1(X,Y) = Σm(0,1) = 0 1 1
F1(X,Y) = X’
= X’Y’ + X’Y 1

Y 0 1
X
F2(X,Y) = Σm(0,3) = 0 1
F2(X,Y) = X’Y’ + XY
= X’Y’ + XY 1 1

Y 0 1
X
F3(X,Y) = Σm(0,2,3) = 0 1
= X’Y’ + XY’ + XY F3(X,Y) = X + Y’
1 1 1

Y 0 1
X
F4(X,Y) = Σm(0,1,2,3) = 0 1 1
= X’Y’ + X’Y + XY’ + XY F4(X,Y) = 1
1 1 1
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 7
Simplifying a Boolean Function using
3-variable K-map (groupings)
minterm Y
1 00 01 11 10
m0 m1 m3 m2 0 m0 m1 m3 m2
m4 m5 m7 m6 X 1 m4 m5 m7 m6
Z
◼ Group of 2 adjacent cells gives product term of two literals.
X’Z’ YZ Y X’Y’ X’Z Y X’Y
00 01 11 10 00 01 11 10
0 m0 m1 m3 m2 0 m0 m1 m3 m2
X 1 m4 m5 m7 m6 X 1 m4 m5 m7 m6
XZ’ Y’Z Z XZ XY’ Z XY
◼ Group of 4 adjacent cells gives product term of one literal.
Z’ Z Y Y
00 01 11 10 X’ 00 01 11 10
0 m0 m1 m3 m2 0 m0 m1 m3 m2
X 1 m4 m5 m7 m6 X 1 m4 m5 m7 m6
Z X Y’ Z Y
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 8
Simplifying a Boolean Function using
3-variable K-map (examples)
YZ Y
Given functions: Simplified functions:
X 00 01 11 10

F1(X,Y,Z) = Σm(1,2,4,7) 0 1 1 Simplification is


X1 1 1 not possible
Z
YZ Y
X 00 01 11 10
0 1 1 F2(X,Y,Z) = XY’ + X’Y
F2(X,Y,Z) = Σm(2,3,4,5)
X1 1 1
Z
YZ Y
X 00 01 11 10
0 1 1
F3(X,Y,Z) = Σm(0,2,4,6) F3(X,Y,Z) = Z’
X1 1 1
Z
YZ Y
X 00 01 11 10

F4(X,Y,Z) = Σm(0,1,2,3,6,7) 0 1 1 1 1
F4(X,Y,Z) = X’ + Y
X1 1 1
Z
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 9
Simplifying a Boolean Function using
3-variable K-map (more examples)
YZ Y
Given functions: Simplified functions:
X 00 01 11 10

F5(X,Y,Z) = Σm(3,4,6,7) 0 1 F5(X,Y,Z) = XZ’ + YZ


X1 1 1 1
Z
YZ Y
X 00 01 11 10
0 1 1 F6(X,Y,Z) = Z’ + XY’
F6(X,Y,Z) = Σm(0,2,4,5,6)
X1 1 1 1
Z
YZ Y
X 00 01 11 10
0 1 1 1
F7(X,Y,Z) = Σm(1,2,3,5,7) F7(X,Y,Z) = Z + X’Y
X1 1 1
Z
YZ Y
X 00 01 11 10 F8(X,Y,Z) = XZ’+X’Z +Y’Z
F8(X,Y,Z) = Σm(1,3,4,5,6) 0 1 1 or
X1 1 1 1 F8(X,Y,Z) = XZ’+X’Z +XY’
Z Not unique solution
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 10
Simplifying a Boolean Function using
4-variable K-map (grouping examples)
◼ Group of 2 adjacent cells gives ◼ Group of 4 adjacent cells gives
product term of 3 literals. product term of 2 literals.
YZ Y YZ Y
WX 00 01 11 10 W’X’Z’ WX 00 01 11 10 X’Z’
00 m0 m1 m3 m2 00 m0 m1 m3 m2
W’YZ
m4 m5 m7 m6
01
X
W’Y’ m4 m 5 m7 m 6
01
X
11 m12 m13 m15 m14 11 m12 m 13 m 15 m 14
W WXY W WY
10 m8 m9 m11 m10 10 m8 m9 m11 m10
X’Y’Z
Z Z
◼ Group of 8 adjacent cells gives ◼ Group of all cells gives
product term of 1 literal.
Y Z’ YZ
constant one.
Y 1
YZ
WX 00 01 11 10 WX 00 01 11 10
00 m0 m1 m3 m2 00 m0 m1 m3 m2
01 m4 m5 m7 m6 m4 m5 m7 m6
01
X X
11 m12 m13 m15 m14 W 11 m 12 m 13 m 15 m 14
W W
10 m8 m9 m11 m10 10 m8 m9 m11 m10

Z Z
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 11
Simplifying a Boolean Function using
4-variable K-map (examples)
YZ Y YZ Y
WX 00 01 11 10 Given function: WX 00 01 11 10
00 1 1 1 F2(W,X,Y,Z) = 00 1 1 1
01 1 1 1 = Σm(0,1,2,4,5,6,8, 01 1
X 9,12,13,14) X
11 1 1 11
W W
10 1 1 1 Simplified function: 10 1 1 1
Z F2(W,X,Y,Z) = Z
= Y’ + W’Z’ + XZ’

Given function: Given function:


YZ Y
F1(W,X,Y,Z) = WX 00 01 11 10 F3(W,X,Y,Z) = W’X’Y’ +
= Σm(0,1,2,4,5,7,8,9,10,12,13) 00 1 1 1 X’YZ’ + WX’Y’ + W’XYZ’
01 1 1 1
X
Simplified function: 11 1 1 1
W Simplified function:
F1(W,X,Y,Z) = 10 1 1 F3(W,X,Y,Z) =
= Y’ + X’Z’ + W’XZ = X’Y’ + X’Z’ + W’YZ’
Z

Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 12
Simplifying with K-maps Systematically

◼ You have seen intuitive procedure on how to group


cells and simplify Boolean functions!
◼ Can we have more systematic procedure?
◼ YES, if we introduce the terms:
◼ implicant
◼ prime implicant
◼ essential prime implicant

◼ An Implicant I of a function F() is a product term


which implies F(), i.e., F() = 1 whenever I = 1
◼ All minterms of a function F are implicants of F
◼ All rectangles in a K-map made up of cells containing 1s
correspond to implicants

Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 13
Prime Implicant (PI)

◼ An implicant I of F is called a Prime Implicant (PI)


if the removal of any literal from I results in a product
term that is NOT an implicant of F
◼ The above should hold for all literals in I

◼ Thus, a prime implicant is not contained in any


simpler implicant

◼ The set of prime implicants corresponds to


◼ all rectangles, in a K-map, made up of cells containing 1s
that satisfy the following condition:
◼ each rectangle is not contained in a larger rectangle

Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 14
Example of Prime Implicants (PIs)
◼ Consider function F(W,X,Y,Z)
whose K-map is shown at right
◼ Y’Z’ is not a prime implicant Z’ XY
because it is contained in Z’ YZ Y
WX 00 01 11 10
◼ WXY is not a prime implicant 00 1 1
because it is contained in XY 01 1 1 1
X
◼ Product terms Z’, XY, WX’Y’ are W 11 1 1 1

prime implicants. Why? 10 1 1 1


Z
◼ Consider the term XY and obtain
terms by deleting any literal: Y’Z’ WX’Y’ WXY
◼ We get two terms: term X and term Y
◼ Both terms are NOT implicants of F
◼ Thus, the term XY is prime implicant
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 15
Essential Prime Implicants (EPIs)
◼ If a minterm of function F is included in
ONLY one prime implicant pi, then pi
is an Essential Prime Implicant of F Z’ XY
◼ An essential prime implicant MUST YZ Y
appear in all possible SOP WX 00 01 11 10
00 1 1
expressions of function F
01 1 1 1
◼ To find essential prime implicants: 1 1
X
11 1
◼ Generate all prime implicants of a function
10 1 1 1
◼ Select those prime implicants that contain
Z
at least one 1 that is not covered by any
other prime implicant WX’Y’
◼ For the previous example, the PIs are
Z’, XY, and WX’Y’; all of these are
essential.
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 16
Essential Prime Implicants (examples)

◼ Consider function F1(W,X,Y,Z) whose K-map is shown below:


◼ All Prime Implicants are: YZ Y
00 01
XZ’, W’XY’, W’Y’Z, X’Y’Z, WX 11 10

WX’Z, WX’Y, WYZ’ 00 1


01 1 1 1
◼ Essential Prime Implicants are: X
XZ’ W
11 1 1
10 1 1 1
Z

◼ Consider function F2(W,X,Y,Z) whose K-map is shown below:


◼ All Prime Implicants are: YZ Y
00 01 11 10
XZ’, W’Z, W’X WX
00 1 1
◼ Essential Prime Implicants are:
1 1 1 1
XZ’ and W’Z 01
X
11 1 1
W
10

Fall 2023
Z
Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 17
Systematic Procedure for Simplifying
Boolean Functions
Given : The K-map of a Boolean function
Obtain: The simplest SOP expression for the function

1. Find all prime implicants (PIs) of the function


2. Select all essential PIs
3. For remaining minterms not included in the
essential PIs, select a set of other PIs to cover
them, with minimal overlap in the set
4. The resulting simplified function is the logical
OR of the product terms selected above
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 18
Example
YZ Y
◼ F(W,X,Y,Z) = WX 00 01 11 10

∑m(0,1,2,3,4,5,7,14,15). 00 1 1 1 1
01 1 1 1
X
◼ All prime implicants (PI) are: 11 1 1
W
W’X’, W’Y’, W’Z, XYZ, WXY 10
Z
◼ Select all essential PIs:
W’X’, W’Y’, WXY
◼ Select other PIs to cover all 1s with
minimal overlap:
◼ Possibilities: W’Z or XYZ
◼ We select W’Z because it is simpler.
◼ F(W,X,Y,Z) = W’X’+W’Y’+WXY+ W’Z
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 19
Other Examples

◼ Consider function F(W,X,Y,Z) whose K-map


is shown at right.
◼ All prime implicants are: YZ Y
◼ W’X’Y’Z’, WXY’, WX’Y, WXZ, WYZ, XY’Z WX 00 01 11 10
00 1
◼ Essential prime implicants are:
01 1
◼ W’X’Y’Z’, WXY’, WX’Y, XY’Z 1
X
11 1 1
◼ Nonessential prime implicants are: W
10 1 1
◼ WXZ, WYZ Z
◼ Simplified function (solution not unique):
◼ F = W’X’Y’Z’+WXY’+WX’Y+XY’Z + WXZ
◼ F = W’X’Y’Z’+WXY’+WX’Y+XY’Z + WYZ

Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 20
Other Examples (cont.)

◼ Consider function F(W,X,Y,Z) =∑m(0,1,2,4,5,10,11,13,15)


whose K-map is shown at right.
◼ All prime implicants are:
YZ Y
◼ W’Y’, XY’Z, WXZ, WYZ, WX’Y, W’X’Z’, X’YZ’ WX 00 01 11 10
◼ Essential prime implicants are: 00 1 1 1
◼ W’Y’ 01 1 1
X
11 1 1
◼ Nonessential prime implicants are: W
10 1 1
◼ XY’Z, WXZ, WYZ, WX’Y, W’X’Z’, X’YZ’
Z
◼ Simplified function (solution not unique):
◼ F = W’Y’+WXZ+WX’Y+W’X’Z’
WXZ and WX’Y are NON-overlapping PIs.
◼ F = W’Y’+WXZ+WX’Y+X’YZ’
◼ F = W’Y’+WYZ+X’YZ’+XY’Z
WYZ and X’YZ’ are NON-overlapping PIs.
◼ F = W’Y’+WYZ+X’YZ’+WXZ
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 21
Product-Of-Sums (POS) Simplification
◼ So far, we have considered simplification of a Boolean
function expressed in Sum-Of-Products (SOP) form using a
K-map .
◼ Sometimes the Product-Of-Sums form of a function is
simpler than the SOP form.
◼ Can we use K-maps to simplify a Boolean function in
Product-Of-Sums form?
◼ Procedure:
◼ Use sum-of-products simplification on the zeros of function F in the K-
map. In this way you will get the simplified complement of F (F’).
◼ Find the complement of F’ which is F, i.e., (F’)’ = F
◼ Recall that the complement of a Boolean function can be obtained by (1)
taking the dual and (2) complementing each literal.
◼ OR, using DeMorgan’s Theorem.

Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 22
POS Simplification Example
F = ∑m(0,1,2,3,4,5,7,14,15) The complement of F (F’)
YZ Y YZ Y
WX 00 01 11 10 WX 00 01 11 10
00 1 1 1 1 00
01 1 1 1 0 01 1
X X
11 0 0 1 1 11 1 1
W W
10 0 0 0 0 10 1 1 1 1
Z Z

◼ Simplify using zeros: F’ = WX’ + WY’+ W’XYZ’


◼ Complement F’ to find F, i.e., F = (F’)’
◼ First get the dual of F’:
dual(F’) = (W+X’) • (W+Y’) • (W’+X+Y+Z’)
◼ Complement each literal in dual(F’) to get F as POS
F = (W’+X) • (W’+Y) • (W+X’+Y’+Z)
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 23
Don’t-Care Conditions

◼ Sometimes a Boolean function is not specified for


some combinations of input values. Why?
◼ There may be a combination of input values which will
never occur
◼ If they do occur, the value of the function is of no concern
◼ Such combinations is called don’t-care condition
◼ The function value for such combinations is called a
don't-care
◼ The don’t-care function values are usually denoted
with x
◼ x may be arbitrarily set to 0 or 1 in an implementation
◼ Don’t-cares can be used to further simplify a
function
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 24
Simplification using Don’t-Cares

◼ Treat don't-cares as if they are 1s to


generate prime implicants in order to
produce simple expressions
◼ Delete prime implicants that cover only don't-
care minterms
◼ Treat the covering of remaining don't care
minterms as optional in the selection process
◼ they may be covered
◼ but it is not necessary

Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 25
Example with Don’t-Care Conditions

◼ Consider the following incompletely specified


function F that has three don’t-care minterms d:
◼ F(A,B,C,D) = ∑m(1,3,7,11,15)
◼ d(A,B,C,D) = ∑m(0,2,5)
CD C CD C
AB 00 01 11 10 AB 00 01 11 10
00 x 1 1 x 00 x 1 1 x
01 0 x 1 0 01 0 x 1 0
B B
11 0 0 1 0 11 0 0 1 0
A A
10 0 0 1 0 10 0 0 1 0
D D
F1 = CD + A’B’ F2 = CD + A’D
Notice: F1 and F2 are algebraically not equal. Both include the specified
minterms of F, but each includes different don’t-care minterms.
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 26
Other Examples with Don’t-Cares (1)
CD C
AB 00 01 11 10
00 x 1 0 0
◼ Simplify the function G(A,B,C,D) 01 1 x 0 x
B
whose K-map is shown at right. A
11 1 x x 1
10 0 x x 0
D

G = A’C’+ AB or G = A’C’+BD’ or G = BD’ + C’D


CD C CD C CD C
AB 00 01 11 10 AB 00 01 11 10 AB 00 01 11 10
00 x 1 0 0 00 x 1 0 0 00 x 1 0 0
01 1 x 0 x 01 1 x 0 x 01 1 x 0 x
B B B
11 1 x x 1 11 1 x x 1 11 1 x x 1
A A A
10 0 x x 0 10 0 x x 0 10 0 x x 0
D D D
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 27
Other Examples with CD
00 01 11
C
10
AB
Don’t-Cares (2) 00 0 1 0 1
01 1 1 0 1
B
◼ Simplify the function F(A,B,C,D) A
11 0 0 x x
whose K-map is shown at the 10 1 1 x x
top-right. CD
D
C
◼ F = A’BC’+AB’+CD’+A’C’D AB 00 01 11 10
00 0 1 0 1
or 01 1 1 0 1
B
◼ F = A’BD’+AB’+CD’+A’C’D A
11 0 0 x x
10 1 1 x x
◼ The middle two terms are EPIs,
D
while the first and last terms are CD C
00 01 11 10
selected to cover the minterms AB
00 0 1 0 1
m1, m4, and m5. 01 1 1 0 1
◼ There’s a third solution! Can you 11 0 0 x x
B
A
find it? 10 1 1 x x
Fall 2023 D
Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 28
Algorithmic Techniques for Simplification

◼ Simplification of Boolean functions using K-maps


works for functions of up to 4 variables
◼ What do we do for functions with more than 4
variables?
◼ You can “code up” a minimizer program
◼ Use the Quine-McCluskey algorithm
◼ Base on (essential) prime implicants
◼ We won’t discuss these techniques here
◼ Search on Internet to find more information about
the Quine-McCluskey algorithm

Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 29

You might also like