FDSD04
FDSD04
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
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
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
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’
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 12
Simplifying with K-maps Systematically
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 13
Prime Implicant (PI)
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
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
∑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
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 20
Other Examples (cont.)
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
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 25
Example with Don’t-Care Conditions
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 29