#2 Gate Level Minimization & K-Map
#2 Gate Level Minimization & K-Map
&
Logic Design
(CSDC-0101)
Gate Level Minimization
The Map Method
In a digital circuit with multiple digital inputs and multiple digital outputs, the outputs depend
on the current value of inputs.
A Boolean function can be represented in the form of sum of minterms or the product of
maxterms, which enable the designer to make a truth table more easily.
In a truth table, an output of one represents minterms, and an output of zero represent
maxterms.
Also, Boolean functions can be simplified using Karnaugh map (K-map) without using Boolean
theorems, by transferring a function to K-map and reading simplified function from K-map.
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 2
Minterm
A minterm is associated with each combination of variables in a function.
If a function has n variables, then it has 2n minterms.
It is simple to generate a truth table from minterms and vice versa.
Consider two Boolean variables, X and Y.
There are four different possible combinations that can be generated from X AND Y, and they are
X’ Y’, X’ Y, X Y’, and XY.
These four combinations are called the minterms for X AND Y .
E.g. F(X,Y) = X Y’ + X’ Y
This may also be rewritten as F (X, Y) = Σ(1,2) where F is sum of minterms (or where F = 1):.
This function can be represented as F(X,Y) = m1 + m2 or each minterm that represents a one in the truth table.
Each minterm is obtained from an AND term of the n variables, with each variable being primed if the
corresponding bit of the binary number is 0 and unprimed if a 1.
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 3
F(X,Y,Z) = X’Y’Z + X’YZ + XYZ
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 4
Maxterm
Maxterm is complement of a minterm.
If the minterm m0 is X Y Z, then the maxterm M0 is
(X’ Y’ Z’)’ = X + Y + Z
In a truth table, an output of one represents minterms, and an output of zero represent maxterms.
The function F can be expressed as the product of maxterms.
F(X,Y,Z) = M0 M2 M4 M5 M6 , or it can represented by
F(X,Y,Z) = π(0,2,4,5,6)
Each maxterm is obtained from an OR term of the n variables, with each variable being unprimed if
the corresponding bit is a 0 and primed if a 1.
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 5
F(X,Y,Z) = (M0,M2,M4,M5,M6 )
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 6
SOURCE: INTERNET 7
Karnaugh Map (K-Map)
Karnaugh maps are used to simplify a Boolean function without using Boolean algebra
theorems.
A K-map is also another way to represent the truth table of a function.
K-maps are made of cells where each cell represents a minterm. Cells marked with a one will be
the minterms used for the sum of the minterms representation of a function.
Conversely, cells marked with a zero will be used for the product of the maxterms
representation.
Adjacent Cell
Two cells are adjacent if they differ on only one variable. The cells X’Y’ and X’Y are
adjacent because their only difference is Y’ and Y. Adjacent cells can be combined in order to
simplify a K-map’s function.
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 8
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 9
Example:
F(X,Y) = XY’ + X’Y’ = m2 + m0.
The truth table for the function and its mapping to a K-map is done as:
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 10
Simplify the following function:
F(X,Y)=X’Y+XY’+XY
or
F(X,Y) = m1+m2+m3
The cells m2 and m3 are adjacent, so they can be combined. Likewise, the cells m1 and m3 can
be combined. By reading the map, you will have the simplified function.
Cells m2 and m3 are the entire row X, and cells m1 and m3 are the entire column Y, with the
other cell being zero. Therefore,
F(X,Y) = X+Y
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 11
Three-Variable Map
A three-variable K-map contains eight cells, and each cell represents a minterm.
(a) At row 0, all four cells contain X’; therefore this row is labeled X’.
(b) At row 1, all four cells contain X; therefore this row is labeled X.
(c) At the columns 11 and 10, all four cells contain Y; therefore these
columns are labeled Y.
(d) At the columns 00 and 01, all four cells contain Y’; therefore these
columns are labeled Y’.
(e) At the columns 01 and 11, all four cells contain Z; therefore these
columns are labeled Z.
(f) At the columns 00 and 10, all four cells contain Z’; therefore these
columns are labeled Z’.
Adjacent cells can be grouped together in a K-map; in a K-map it can
combine 2 cells, 4 cells, 8 cells, and 16 cells.
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 12
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 13
(a) All adjacent cells in columns Z’ and columns Y are
one.
F (X,Y, Z) = Z’ + Y’
(b) The cells in row X’, columns Y’ are adjacent, as are the
cells in row X, columns Y.
F (X,Y, Z) = X’Y’+XY
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 14
Four-Variable Map
Four-variable K-maps contain 16 cells.
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 15
K-map for F(W,X,Y,Z) = m0 + m2 + m8 + m10
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 16
Five-Variable Map
A 5-variable Boolean function can have a maximum of 32 minterms. Hence, 5-variable K-Map
contains 32 cells.
A 5-variable K-map is formed using two connected 4-variable map.
SOURCE: INTERNET 17
Five-Variable Map
𝐹 𝐴, 𝐵, 𝐶, 𝐷, 𝐸 = 𝐴ҧ𝐵ത 𝐸ത + 𝐵 𝐷𝐸
ഥ + 𝐴𝐶𝐸
𝐹 𝐴, 𝐵, 𝐶, 𝐷, 𝐸 = σ(0, 2, 4, 7, 8, 10, 12, 16, 18, 23, 24, 25, 26, 27, 28)
ഥ 𝐸ത + 𝐵𝐶𝐷𝐸
𝐹 𝐴, 𝐵, 𝐶, 𝐷, 𝐸 = 𝐷 ത + 𝐶ҧ 𝐸ത + 𝐴𝐵𝐶ҧ
SOURCE: INTERNET 18
Sum of Products (SOP) and Product of Sums (POS)
The sum of products of a function is its simplified sum of
minterms while product of sums of a function is its
simplified product of maxterms.
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 19
Don’t Care Conditions
In a truth table, if certain combinations of the input variables are impossible, they are
considered don’t care conditions.
These conditions are where the output of the function does not matter. For example, binary-
coded decimal (BCD) is 4 bits and only 0000 to 1001 are used, so from 1010 to 1111 are not BCD;
the truth table or K-map values are don’t cares.
A truth table or K-map cell marked with a “X” or “d” is a don’t care term, and output will not be
affected whether it is a one or zero.
The don’t care can be used to expand the adjacency of cells in a K-map to further simplify a
function, since their output does not matter.
Since a don’t care can output either a zero or one, we can assume it is a one in order to expand
a grouping of adjacent cells.
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 20
K-map for F(X,Y,Z) = m0 + m1 + m2 + m5 and D(X,Y,Z) = m3 + m7
K-map with don’t care minterms Simplified: F(X,Y,Z) = X’+ Z.
F(W,X,Y,Z) = XZ + X’Z’ + XW ’
When minterms for function F are don’t care terms, the don’t care function D is equal to the sum of
the don’t care minterm(s).
SOURCE: HTTPS://DOI.ORG/10.1007/978-3-319-66775-1_1 21