Professional Documents
Culture Documents
FDSD03
FDSD03
◼ It is a sum of minterms X Y Z F
◼ The minterms included are those
0 0 0 0
mj such that F( ) = 1 in row j of
the truth table for F( ) 0 0 1 1 m1 =X’Y’Z
◼ Example: 0 1 0 1 m2 =X’YZ’
◼ Truth table for F(X,Y,Z) at right 0 1 1 0
◼ The canonical sum-of-products 1 0 0 1 m4 =XY’Z’
form for F is: 1 0 1 0
F(X,Y,Z) = m1 + m2 + m4 + m6 =
= X’Y’Z + X’YZ’ + 1 1 0 1 m6 =XYZ’
XY’Z’ + XYZ’ 1 1 1 0
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 10
Canonical Product-Of-Sums
◼ It is a product of maxterms X Y Z F
◼ The maxterms included are those
0 0 0 0 M0 =X+Y+Z
Mj such that F( ) = 0 in row j of
the truth table for F( ) 0 0 1 1
◼ Example: 0 1 0 1
◼ Truth table for F(X,Y,Z) at right 0 1 1 0 M3 =X+Y’+Z’
◼ The canonical product-of-sums 1 0 0 1
form for F is: 1 0 1 0 M5 =X’+Y+Z’
F(X,Y,Z) = M0 • M3 • M5 • M7 =
= (X+Y+Z) • (X+Y’+Z’) • 1 1 0 1
(X’+Y+Z’) • (X’+Y’+Z’) 1 1 1 0 M7 =X’+Y’+Z’
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 11
Shorthand: ∑ and ∏
◼ F(X,Y,Z) = m1 + m2 + m4 + m6 =
= X’Y’Z + X’YZ’ + XY’Z’ + XYZ’ =
= ∑ m(1,2,4,6),
◼ ∑ indicates that this is a sum-of-products form
◼ m(1,2,4,6) indicates to included minterms m1, m2, m4, and m6
◼ F(X,Y,Z) = M0 • M3 • M5 • M7 =
= (X+Y+Z) • (X+Y’+Z’) • (X’+Y+Z’) • (X’+Y’+Z’) =
= ∏ M(0,3,5,7),
◼ ∏ indicates that this is a product-of-sums form
◼ M(0,3,5,7) indicates to included maxterms M0, M3, M5, and M7
◼ Example:
F(X,Y,Z) = X’Y’Z + X’YZ’ + XY’Z’ + XYZ’
= m 1 + m2 + m 4 + m6
= ∑m(1,2,4,6)
= ∏M(0,3,5,7)
= (X+Y+Z)•(X+Y’+Z’)•(X’+Y+Z’)•(X’+Y’+Z’)
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 13
Standard Forms (NOT Unique)
◼ There are two types of standard forms:
◼ Sum-of-Products (SOP) form (NOT unique)
◼ Product-of-Sums (POS) form (NOT unique)
◼ In standard forms, not all variables need to appear
in the individual product or sum terms!
◼ Example1: X Y Z F
F(X,Y,Z) = X’Y’Z + X’YZ’ + XZ’ 0 0 0 0
F(X,Y,Z) = X’Y’Z + YZ’ + XZ’
0 0 1 1
are two standard sum-of-products forms
0 1 0 1
Non-canonical
0 1 1 0
terms
◼ Example2: 1 0 0 1
F(X,Y,Z) = (X+Y+Z) • (X+Y’+Z’) • (X’+ Z’) 1 0 1 0
F(X,Y,Z) = (X+Y+Z) • (Y’+Z’) • (X’+ Z’) 1 1 0 1
are two standard product-of-sums form 1 1 1 0
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 14
Conversion from Standard to
Canonical SOP form
1. Expand non-canonical product terms by inserting
equivalent of 1 for each missing variable V:
(V + V’) = 1
2. Remove duplicate minterms
◼ Example:
X Y Z F
F(X,Y,Z) = X’Y’Z + YZ’ + XZ’ = 0 0 0 0
= X’Y’Z + (X+X’)YZ’ + X(Y+Y’)Z’ 0 0 1 1
= (X+Y+Z)•(X+Y’+Z’)•(X’+Y’+Z’)• 0 1 1 0
(X’+Y+Z’) 1 0 0 1
1 0 1 0
◼ Can you do it for: 1 1 0 1
F(X,Y,Z) = (X+Y+Z)•(X+Y’+Z’)•(X’+ Z’) 1 1 1 0
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 16
Karnaugh Maps (Unique)
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 17
Two-Variable K-map
Y Y
X 0 1 X 0 1
X Y F(X,Y)
0 1 0 1
0 0 0 F(0,0)
0 F(0,0) F(0,1) 0 m0=X’Y’ m1=X’Y
1 0 1 F(0,1)
2 3 2 3
2 1 0 F(1,0)
1 F(1,0) F(1,1) 1 m2=XY’ m3=XY
3 1 1 F(1,1)
X Y F3 Y 0 1
0 0 0 X
0 1 1 0 1 F3 = m1 + m2
1 0 1
1 1 = X’Y + XY’ (canonical)
1 1 0
X Y F4 Y 0 1
0 0 1 X
0 1 1 0 1 1 F4 = m0 + m1 + m3
1 0 0 = X’Y’ + X’Y + XY (canonical)
1 1
1 1 1 = X’ + Y (standard)
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 19
Two-Variable K-map (cont.)
◼ Any two adjacent cells in the map differ Y
by ONLY one variable X 0 1
◼ appears complemented in one cell and
uncomplemented in the other 0 m0=X’Y’ m1=X’Y
◼ Example:
m0 (=X’Y’) is adjacent to m1 (=X’Y) and m2 1 m2=XY’ m3=XY
(=XY’) but NOT m3 (=XY)
◼ Multiple-cell rectangles in the map
correspond to standard terms Y
X 0 1
◼ Examples:
2-cell rectangle m2|m3 corresponds to term X:
0 m0=X’Y’ m1=X’Y
◼
m2 + m3 = XY’+XY = X•(Y’+Y) = X
◼ 4-cell rect. m0 m1 corresponds to constant 1:
m2 m3
1 m2=XY’ m3=XY
m0 + m1 + m2 + m3 = X’Y’ + X’Y + XY’ + XY =
= X’•(Y’+Y) + X•(Y’+Y) = X + X’ = 1
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 20
Three-Variable K-map
YZ Y
X Y Z F(X,Y,Z) 00 01 11 10
0 0 0 0 F(0,0,0)
X
0 1 3 2
1 0 0 1 F(0,0,1)
0 F(0,0,0) F(0,0,1) F(0,1,1) F(0,1,0)
2 0 1 0 F(0,1,0)
3 0 1 1 F(0,1,1) 4 5 7 6
4 1 0 0 F(1,0,0) X 1 F(1,0,0) F(1,0,1) F(1,1,1) F(1,1,0)
5 1 0 1 F(1,0,1)
6 1 1 0 F(1,1,0) Z
7 1 1 1 F(1,1,1) YZ Y
◼ Cell 0 corresponds to row 0 in the X 00 01 11 10
truth table and represents minterm 0 1 3 2
X’Y’Z’; Cell 1 corresponds to row 1 0 m0=X’Y’Z’ m1=X’Y’Z m3=X’YZ m2=X’YZ’
and represents X’Y’Z; etc.
◼ If F(X,Y,Z) has value 1 in a row of 4 5 7 6
the truth table, i.e., a minterm is X 1 m4=XY’Z’ m5=XY’Z m7=XYZ m6=XYZ’
present in the function, then a 1 is
placed in the corresponding cell.
Z
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 21
Three-Variable K-map -- Examples
Truth Table K - map Canonical and Standard SOP
X Y Z F1 Y
0 0 0 1 YZ
X 00 01 11 10 F1 = m0 + m3 + m5 + m6 =
0 0 1 0
0 1 0 0 0 1 1 = X’Y’Z’ + X’YZ +
0 1 1 1 XY’Z + XYZ’
1 0 0 0 X1 1 1
1 0 1 1
(canonical)
1 1 0 1 Z
1 1 1 0
X Y Z F2
0 0 0 1 Y
YZ F2 = m0 + m2 + m3 + m6 + m7 =
0 0 1 0 X 00 01 11 10
0 1 0 1 = X’Y’Z’ + X’YZ’ + X’YZ +
0 1 1 1
0 1 1 1 XYZ’ + XYZ (canonical)
1 0 0 0
X1 1 1
1 0 1 0
1 1 0 1
Z
= X’Z’ + Y (standard)
1 1 1 1
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 22
Three-Variable K-map (cont.)
YZ Y
X 00 01 11 10
0 1 3 2
0 m0=X’Y’Z’ m1=X’Y’Z m3=X’YZ m2=X’YZ’
4 5 7 6
X 1 m4=XY’Z’ m5=XY’Z m7=XYZ m6=XYZ’
Z
◼ NOTE: variable ordering is important – assume function F(X,Y,Z) then X
specifies the rows in the map and YZ the columns
◼ Each cell is adjacent to three other cells (left, right, up or down).
◼ Left-edge cells are adjacent to right-edge cells!
◼ One cell represents a minterm of 3 literals
◼ A rectangle of 2 adjacent cells represents a product term of 2 literals
◼ A rectangle of 4 cells represents a product term of 1 literal
◼ A rectangle of 8 cells encompasses the entire map and produces a
function that is equal to logic 1
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 23
Four-Variable K-map
YZ Y
W X Y Z F(W,X,Y,Z) 00 01 11 10
0 0 0 0 0 F(0,0,0,0)
WX
0 1 3 2
1 0 0 0 1 F(0,0,0,1)
00 m0=W’X’Y’Z’ m1=W’X’Y’Z m3=W’X’YZ m2=W’X’YZ’
2 0 0 1 0 F(0,0,1,0)
3 0 0 1 1 F(0,0,1,1) 4 5 7 6
4 0 1 0 0 F(0,1,0,0) 01 m4=W’XY’Z’ m5=W’XY’Z m7=W’XYZ m6=W’XYZ’
5 0 1 0 1 F(0,1,0,1) X
12 13 15 14
6 0 1 1 0 F(0,1,1,0)
11 m12=WXY’Z’ m13=WXY’Z m15=WXYZ m14=WXYZ’
7 0 1 1 1 F(0,1,1,1)
W
8 1 0 0 0 F(1,0,0,0) 8 9 11 10
9 1 0 0 1 F(1,0,0,1) 10 m8=WX’Y’Z’ m9=WX’Y’Z m11=WX’YZ m10=WX’YZ’
10 1 0 1 0 F(1,0,1,0)
11 1 0 1 1 F(1,0,1,1)
Z
◼ Cell 0 corresponds to row 0 in the truth table and represents
12
1 1 0 0 F(1,1,0,0) minterm W’X’Y’Z’; Cell 1 corresponds to row 1 and
13 1 1 0 1 F(1,1,0,1) represents W’X’Y’Z; etc.
◼ If F(W,X,Y,Z) has value 1 in a row of the truth table, i.e., a
14 1 1 1 0 F(1,1,1,0) minterm is present in the function, then a 1 is placed in the
15 1 1 1 1 F(1,1,1,1) corresponding cell.
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 24
Four-Variable K-map -- Examples
Y
YZ
Truth Table WX 00 01 11 10 K - map
W X Y Z F
0 0 0 0 1 00 1 1 1
0 0 0 1 0 01
0 0 1 0 1 X
11 1 1 1 1 Canonical
0 0 1 1 1 K - map W
0 1 0 0 0 10 1 1 1 1 and
0 1 0 1 0 Standard SOP
F = m0 + m2 + m3 + Z
0 1 1 0 0
m8 + m9 + m10 + m11 + m12 + m13 + m14 + m15 =
0 1 1 1 0
= W’X’Y’Z’ + W’X’YZ’ + W’X’YZ +
1 0 0 0 1 WX’Y’Z’ + WX’Y’Z + WX’YZ’ + WX’YZ + (canonical form)
1 0 0 1 1 WXY’Z’ + WXY’Z + WXYZ’ + WXYZ
1 0 1 0 1 = W’X’Z’ + W’X’YZ’ + W’X’YZ +
1 0 1 1 1 WX’Y’Z’ + WX’Y’Z + WX’YZ’ + WX’YZ + (standard form)
1 1 0 0 1 WXY’Z’ + WXY’Z + WXYZ’ + WXYZ
1 1 0 1 1 = W’X’Z’ + X’Y +
WX’Y’Z’ + WX’Y’Z + WX’YZ’ + WX’YZ + (standard form)
1 1 1 0 1
WXY’Z’ + WXY’Z + WXYZ’ + WXYZ
1 1 1 1 1 = W’X’Z’ + X’Y + W (standard form)
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 25
Four-Variable K-map (cont.)
Y
YZ 00 01 11 10
WX 0 1 3 2
m0 m1 m3 m2
00 W’X’Y’Z’ W’X’Y’Z W’X’YZ W’X’YZ’
4 m4 5 m5 7 m7 6 m6
01
W’XY’Z’ W’XY’Z W’XYZ W’XYZ’
12 m 13 m 15 m 14 m X
11 12 13 15 14
WXY’Z’ WXY’Z WXYZ WXYZ’
W 8 m 9 m 11 m 10 m
10 8 9 11 10
WX’Y’Z’ WX’Y’Z WX’YZ WX’YZ’
Z
◼ NOTE: variable ordering is important – assume function F(W,X,Y,Z)
then WX specifies the rows in the map and YZ the columns
◼ Each cell is adjacent to four cells (left, right, up, down)
◼ Top cells are adjacent to bottom cells; Left-edge cells are adjacent to right-edge cells
◼ One cell represents a minterm of 4 literals
◼ A rectangle of 2 adjacent cells represents a product term of 3 literals
◼ A rectangle of 4 cells represents a product term of 2 literals
◼ A rectangle of 8 cells represents a product term of 1 literal
◼ A rectangle of 16 cells produces a function that is equal to logic 1
Fall 2023 Fundamentals of Digital Systems Design by Todor Stefanov, Leiden University 26
Five-Variable K-map
F(T,W,X,Y,Z) YZ
T=1
WX
16 17 19 18
YZ
20 21 23 22
WX
0 1 3 28 2 29 31 30
4 5 7 24 6 25 27 26
12 13 15 14
TWXYZ’
8 9 11 10
T=0 T’WXYZ’