K Map
K Map
F4 = (A'B'+C)'
Review
◼ If expression F2= x + y'z is given, below is its truth
table (obtained by “AND”ing y’ with z and then
“OR”ing the product with x.) X Y Z F2
◼ So from truth tabe, considering the 1’s
0 0 0 0
we can say,
0 0 1 1
F2=x’y’z+xy’z’ + xy’z + xyz’ + xyz
0 1 0 0
which when simplified using postulates,
0 1 1 0
will result to,
1 0 0 1
F2=x+y’z
1 0 1 1
1 1 0 1
so x+y’z = x’y’z+xy’z’ + xy’z + xyz’ + xyz
1 1 1 1
Simplified
expression SOP Canonical Format of the
expression
Review: Solve it yourself
y F5
z
Review: Solve it yourself
F2=zy’+x
Review: Solve it yourself
F2=x’y’z+x’yz+xy’
Standard Forms
▪ Two Standard Forms:
Sum-of-Products and Product-of-Sums
▪ Literals: a variable on its own or in its
complemented form. Examples: x, x' , y, y'
▪ Product Term: a single literal or a logical
product (AND) of several literals.
Examples: x, xyz', A'B, AB
Standard Forms
▪ Sum Term: a single literal or a logical sum (OR) of several literals.
Examples: x, x+y+z', A'+B, A+B
▪ Sum-of-Products (SOP) Expression: a product term or a logical sum
(OR) of several product terms.
Examples: x, x+yz', xy'+x'yz, AB+A'B'
▪ Product-of-Sums (POS) Expression: a sum term or a logical product
(AND) of several sum terms.
Examples: x, x(y+z'), (x+y')(x'+y+z), (A+B)(A'+B')
▪ Every boolean expression can either be expressed as sum-of-products or
product-of-sums expression.
Examples:
SOP: xy + xy + xyz Note: SOP and POS are
complements
POS: (x + y)(x + y)(x + z)
Minterm
▪ Consider two binary variables x, y.
▪ Each variable may appear as itself or in
complemented form as literals (i.e. x, x' & y, y' )
▪ For two variables, there are four possible
combinations with the AND operator, namely:
x'y', x'y, xy', xy
▪ These product terms are called the minterms.
▪ A minterm of n variables is the product of n literals
from the different variables.
▪ In general, n variables can give 2n minterms.
Maxterm
◼ f1=M0M1M2M5M6 =∏(M0,M2,M3,M5,M6)
◼ SOP: F2 =x’yz+xy’z+xyz’+xyz
◼ POS: F2=(x+y+z)(x+y+z’) (x+y’+z)(x’+y+z)
Canonical Form: Product of Maxterms
◼ Complement of a function
= original function-minterms
=missing miniterms
◼ mj’=Mj
◼ If f(x,y,z)=∑(1,3,6,7)=∏(0,2,4,5)
◼ 1. 2^5=32
◼ 2. (b)
◼ 3.(d)
Working:
F (x,y,z) = y'.(x + z') + x'.z=y’x+x’z
=y’x(z+z’)+x’z(y+y’)
=x’y’z’+x’y’z+x’yz+xy’z’+xy’z
=m0+m1+m3+m4+m5
= F (x,y,z) = m(0,1,3,4,5)
CSE215 Digital Logic Design
Karnaugh
Maps
00 01
Only 1 bit
changes
10 11
Representing function in K-
map
◼ (a) F1=xy;
◼
(b) F2=xy’+xy+x’y
=x(y’+y)+x’y
=x+x’y
=(x+x’)(x+y)
=(1)(x+y)
=x+y
Try it yourself
F=xy’+x’y’+x’y,
Simplify the equation using k-map
Solution
◼ F=xy’+x’y’+x’y=x’+y’
1 1
1
Three variable map
◼ Sequence in 3-variable map is not in binary sequence but in reflected
code. In reflected code, at a time only 1 bit changes from 0 to 1 and 1
to 0.
◼ Numbering of minterms follow binary numbers. Example m5 is at 101
i.e. row 1 and column 01.
Note: Any 2 adjacent
square differ by 1 variable (
which is primed in one and
unprimed in the other )
000 001 011 010
◼ F1=∑(5,7)=xy’z+xyz=xz(y’+y)=xz
◼ F2=∑(0,2)=x’y’z’+x’yz'=x’z’(y’+y)=x’z’
1 1
1 1
Simplifying functions using k-
map
◼ F=∑(2,3,4,5)=x’yz+x’yz’+xy’z’+xy’z
(note: in other words, F=
x’y
(∑(010,011,100,101) so place ‘1’ in those
positions and group the adjacent ones)
F=x’y+xy’ xy’
yz
Notice even 2
opposite edges of
the map are
xz’
adjacent, thus
they can be
grouped
◼ If F=∑(0,2,4,6), then simplify it
000 010 100 110
1 1
=Z’ 1 1
Try it yourself
F= xy’ + z’
Try it yourself:
◼ F=A’C+A’B+AB’C+BC
a) Express it as SOP (i.e. ∑)
b) Simplify it using Kmap
Solution
◼ (a) F= ∑(1,2,3,5,7)
(b)F=C + A’B
1 1 1
1 1 1
1 1 1
1 1
◼ F=A’B’C’+B’CD’+A’BCD’+AB’C’
Solution
◼ F=A’B’C’+B’CD’+A’BCD’+AB’C’
F=B’D’+B’C’+A’CD’
Product of Sum (POS)
simplification
◼ F is represented with the ‘1’s
-> F’ is represented with the ‘0’s
-> (F’)’ =F so find F’ and then find it’s
complement using DeMorgan’s law.
◼ In other word, ‘1’s represent the minterms
whereas ‘0’s represent the maxterms.
◼ If Equation is provided in SOP format, mark the
‘1’s and then mark the remaining with ‘0’s. On
the other hand, if Equation is provided in POS
format, mark the ‘0’s and then mark the remaining
with ‘1’s. Once marking is done, function can be
simplified in SOP or POS format.
SOP to POS
◼ SOP-> F=∑(0,1,2,5,8,9,10)
◼ Combining ‘1’s we get
F=B’D’+B’C’+A’C’D
◼ Combining ‘0’s we get
F’=AB+CD+BD’
◼ Applying De-morgan
F=(A’+B’)(C’+D’)(B’+D) <-POS
◼ If SOP: ∑(1,3,4,6)
then POS: ∏(0,2,5,7)
So grouping ‘1’s, F=x’z+xz’
Grouping ‘0’s, F’=xz+x’z’
therefore, F= (x’+z’)(x+z)
Don’t Care condition
◼ Don't cares in a Karnaugh map, or truth table, may be
either 1s or 0s, as long as we don't care what the output
is for an input condition we never expect to see.
◼ We plot these cells with a special sign, ‘X’, among the
normal 1s and 0s.
◼ When forming groups of cells, treat the don't care cell as
either a 1 or a 0, or ignore the don't cares. This is helpful
if it allows us to form a larger group than would
otherwise be possible without the don't cares.
◼ There is no requirement to group all or any of the don't
cares. (i.e. do not make any group only consisting the
don’t cares). Only use them in a group if it simplifies the
logic.
Simplify F(w,x,y,z)= ∑(1,3,7,11,15) and don’t care
d(w,x,y,z)= ∑(0,2,5)
Solution: Even though 2 solutions are not same, but either
1 is acceptable. Such scenario only applicable for Don’t
care scenarios!
Complement of the function and POS considering don’t
cares
F’=z’+wy’
F=(z)(w’+y)
APPLICATIONS OF K-MAP
Example 1: Design and draw
the circuit diagram of BCD to
Excess-3 code converter
Q1.Treat each W, X, Y
and Z as a function
and write them as W X
SOP Y Z
Q2. Based on the SOP,
draw the circuit
diagram of BCD to
Excess-3 code
converter
Any value higher
than 9 will result
into don’t care
output
Example 2: 7 segment display
board
Try it by your self
NOT AND
Gate Gate
Using NOR
NOT OR
Gate Gate
NOT AND
Gate Gate
Use NAND
to
represent
F=A(B+CD)
+BC’
Use NOR
to
represent
F=A(B+CD)
+BC’
A Must Self study from the
book