Canonical Forms and K Maps

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 35

ADITYA ENGINEERING COLLEGE (A)

Digital Circuits and Logic Design


Simplification of Boolean expressions
using Boolean algebra and K-maps
By

B.V.V.L.KALA BHARATHI
Dept of ELECTRICAL AND ELECTRONICS ENGINEERING
Aditya Engineering College(A)
Surampalem.
Aditya Engineering College (A)

CANONICAL Form:
It is the way of representing Boolean outputs using boolean algebra.

 Two types:
 Sum-of-Products (SOP )form
 Product-of-Sums(POS) form
 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 , x.y.z‘ , A'.B , A.B
 Sum Term: a single literal or a logical sum (OR) of several literals.
Examples: x, x+y+z‘ , A'+B , A+B

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

 Sum-of-Products (SOP) Expression: A logical sum (OR) of several product terms.


Examples: 1. x.y'+x‘.y.z,
2. A.B+A'.B'

 Product-of-Sums (POS) Expression: A logical product (AND) of several sum


terms.
Examples: 1. x.(y+z'), (x+y').(x'+y+z),
2. (A+B).(A'+B')

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)
Minterm & Maxterm

 Consider two binary variables x, y.


 Each variable may appear as itself or in complemented form as literals (i.e. x, x'
& y, y' )
 MINTERM:
 For two variables, there are four possible combinations with the AND operator,
namely:
x'.y', x'.y, x.y', x.y
 These product terms are called the minterms.
 In general, n variables can give 2n minterms.

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

Maxterm

 In a similar fashion, a maxterm of n variables is the sum of n literals from the


different variables.
 For two variables, there are four possible combinations with the OR operator,
namely:
x'+y', x'+y, x+y', x+y
 In general, n variables can give 2n maxterms.

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

Minterm & Maxterm


 The minterms and maxterms of 2 variables are denoted by m0 to m3 and M0 to
M3 respectively:
Minterms Maxterms
x y term notation term notation
0 0 x'.y' m0 x+y M0
0 1 x'.y m1 x+y' M1
1 0 x.y' m2 x'+y M2
1 1 x.y m3 x'+y' M3

Each minterm is the complement of the corresponding maxterm:


Example: m2 = x.y'
m2' = (x.y')' = x' + (y')' = x'+y = M2

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

That means
minterms are product terms.
Maxterms are sum terms.
Therfore
Sum of minterms is SOP Canonical Form.
Example:A.B+A'.B' +A.B’
product of Maxterms is POS Canonical Form.
Example: A+B).(A'+B')+(A+B’)

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

Obtain the functions F1,F2 and F3 from the given table using minterms

F1 = x.y.z' = m(6)

F2x= x'.y'.z
y z + x.y'.z‘
F1 F2 + x.y'.z
F3 + x.y.z‘ + x.y.z
0 0 0 0 0 0
= (m0,m4,m5,m6,m7)=m(1,4,5,6,7)
0 0 1 0 1 1
0 1 0 0 0 0
0 1 1 0 0 1
F31= x'.y'.z
0 0+ x'.y.z
0 + 1x.y'.z'1 +x.y'.z
1 0 1 0 1 1
1 =(m1,m3,m4,m5)
1 0 1 1 0
1 1 1 0 1 0
= m(1,3,4,5)

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

Obtain the functions F1,F2 and F3 from the given table using
MAXterms

x y z F1 F2 F3
0 0 0 0 0 0 F1=(M0,M1,M2,M3,M4,M5,M7)=M(0,1,2,3,4,5,7)
0 0 1 0 1 1
0 1 0 0 0 0
=(x+y+z).(x+y+z’)(x+y'+z).(x+y'+z')(x’+y+z)
0 1 1 0 0 1 (x’+y’+z) (x'+y'+z')
1 0 0 0 1 1
1 0 1 0 1 1
1 1 0 1 1 0 F2 = (M0,M2,M3)=M(0,2,3)
1 1 1 0 1 0
= (x+y+z).(x+y'+z).(x+y'+z')

F3 =(M0,M2,M6,M7)= M(0,2,6,7)
= (x+y+z).(x+y'+z).(x'+y'+z).(x'+y'+z')
Digital Circuits and logic design 8/24/20
Aditya Engineering College (A)

Conversion of Canonical Forms


Sum-of-Minterms  Product-of-Maxterms
Rewrite minterm shorthand using maxterm shorthand.
Replace minterm indices with indices not already used.
Eg: F1(A,B,C) = m(3,4,5,6,7) = M(0,1,2)

Product-of-Maxterms  Sum-of-Minterms
Rewrite maxterm shorthand using minterm shorthand.
Replace maxterm indices with indices not already used.
Eg: F2(A,B,C) = M(0,3,5,6) = m(1,2,4,7)
Digital Circuits and logic design 8/24/20
Aditya Engineering College (A)

MINIMIZATION OF BOOLEAN EXPRESSIONS

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

EXAMPLE

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

Karnaugh Map Technique


• K-Maps are a graphical technique used to simplify a logic equation.

• K-Maps are procedural and much cleaner than Boolean simplification.

• K-Maps can be used for any number of input variables, BUT are only
practical for two, three, and four variables.

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

K-Map Format
• Each minterm in a truth table corresponds to a cell in the
K-Map.
• K-Map cells are labeled such that both horizontal and
vertical movement differ only by one variable.
• Since the adjacent cells differ by only one variable, they
can be grouped to create simpler terms in the sum-of-
products expression.
• The sum-of-products expression for the logic function can
be obtained by OR-ing together the cells or group of cells
that contain 1s.

Digital Circuits and logic design 8/24/20


Two Variable K-Map
Truth Table to K-Map Mapping

V
W X FWX X X
Minterm – 0 0 0 1
W 1 0
0 1
Minterm – 1 0 1 0
Minterm – 2 1 0 1 1
W
2
0 3
Minterm – 3 1 1 0

Digital Circuits and logic design 8/24/20


Two Variable K-Map Groupings

Groups of One – 4

V
B B

A 10 10

A 10 10
AB AB

AB AB

8/24/20
Digital Circuits and logic design
Two Variable K-Map Groupings

Groups of Two – 4

V
B B

A 10 110

A 10 10
A

A B B

Digital Circuits and logic design


8/24/20
Two Variable K-Map Groupings

Group of Four – 1

V
B B

A
1 1

A 1 1

Digital Circuits and logic design


8/24/20
Aditya Engineering College (A)

K-Map Simplification Process


1. Construct a label for the K-Map. Place 1s in cells corresponding to the 1s in the truth table.
Place 0s in the other cells.
2. Identify and group all isolated 1’s. Isolated 1’s are ones that cannot be grouped with any
other one, or can only be grouped with one other adjacent one.
3. Group any hex.
4. Group any octet, even if it contains some 1s already grouped but not enclosed in a hex.
5. Group any quad, even if it contains some 1s already grouped but not enclosed in a hex or
octet.
6. Group any pair, even if it contains some 1s already grouped but not enclosed in a hex, octet,
or quad.
7. OR together all terms to generate the SOP equation.

Digital Circuits and logic design 8/24/20


Example #1: 2 Variable K-Map
Example:
After labeling and transferring the truth table data into the K-Map, write the simplified sum-of-
products (SOP) logic expression for the logic function F1.

V
J K F1 K K
0 0 1 1 1
J
0 1 1
1 0 0 J 0 0
1 1 0

Digital Circuits and logic design 8/24/20


Example #1: 2 Variable K-Map
Example:
After labeling and transferring the truth table data into the K-Map, write the simplified sum-of-
products (SOP) logic expression for the logic function F1.

Solution:
V
J K F1 K K
0 0 1 1 1
J
0 1 1
1 0 0 J J 0 0
1 1 0

Digital Circuits and logic design


F1  J 8/24/20
Three Variable K-Map

Truth Table to K-Map Mapping

W X Y FWXY V
Minterm – 0 0 0 0 1 Y Y
Minterm – 1 0 0 1 0
W X 1 0
0 1
Minterm – 2 0 1 0 0
Minterm – 3 0 1 1 0 W X 0 0 Only one
2 3 variable changes
Minterm – 4 1 0 0 0 for every row
Minterm – 5 1 0 1 1 change
W X 1 0
6 7
Minterm – 6 1 1 0 1
Minterm – 7 1 1 1 0 W X 0 1
4 5

Digital Circuits and logic design 8/24/20


Three Variable K-Map Groupings

Groups of One – 8 (not shown)


Groups of Two – 12
AC AC

C VC

A B 0 0
11 1
0 0
A B 11 1
AB
0 0
A B 1 1
AB
0 0
A B 1 1
AB

AB BACC BACC
Digital Circuits and logic design BC BC 8/24/20
Three Variable K-Map Groupings

Groups of Four – 6

B
C VC

A B 110 0
1
1
0 0
A B 1
11 1
1
0 0
A B 111 11
A 0 0
A B 11 11
B

A
Digital Circuits and logic design C C 8/24/20
Three Variable K-Map Groupings

Group of Eight - 1

C VC

A B 1 1

1 1
A B
1 1
A B
1 1
A B

1
Digital Circuits and logic design 8/24/20
Example #2: 3 Variable K-Map
Example:
After labeling and transferring the truth table data into the K-Map, write the simplified sum-of-
products (SOP) logic expression for the logic function F2.

E F G F2 G G
0 0 0 0 E F 0 1
0 0 1 1
0 1 0 1
1 0
E F
0 1 1 0
1 0
1 0 0 0 E F
1 0 1 1 0 1
1 1 0 1 E F
1 1 1 0

Digital Circuits and logic design


8/24/20
Example #2: 3 Variable K-Map
Example:
After labeling and transferring the truth table data into the K-Map, write the simplified sum-of-
products (SOP) logic expression for the logic function F2.
FG
Solution: F2 G VG
E F G
0 0 0 0 E F 0 1
0 0 1 1
0 1 0 1
1 0
E F
0 1 1 0
1 0
1 0 0 0 FG E F
1 0 1 1 0 1
1 1 0 1 E F
1 1 1 0

Digital Circuits and logic design F2  F G  F G 8/24/20


Four Variable K-Map Groupings
Groups of One – 16 (not shown)
Groups of Two – 32 (not shown)
Groups of Four – 24 (seven shown)
V BC BD BC
C D C D C D C D
AD
A B 110 10 110 10
BD
A B 10 0 0 10
AD
A B 10 0 0 10

A B 110 110 10 10 BD

8/24/20
Digital Circuits and logic design
Four Variable K-Map Groupings

Groups of Eight – 8 (two shown)

V B
C D C D C D C D
D
A B 110 10 10 110

A B 10 0 0 10

A B 10 0 0 10

A B 110 10 10 110

Digital Circuits and logic design 8/24/20


Four Variable K-Map Groupings

Group of Sixteen – 1

V
C D C D C D C D

A B 1 1 1 1

A B 1 1 1 1

A B 1 1 1 1

A B 1 1 1 1

1 8/24/20

Digital Circuits and logic design


Example #3: 4 Variable K-Map
Example:
After labeling and transferring the truth table data into the K-Map, write the simplified sum-of-products (SOP)
logic expression for the logic function F3.
V
R S T U F3
0 0 0 0 0
0 0 0 1 1
0 0 1 0 0

0 0 1 1 1
0 1 0 0 0
0 1 0 1 1

0 1 1 0 1
0 1 1 1 1
1 0 0 0 0
1 0 0 1 1

1 0 1 0 0
1 0 1 1 0
1 1 0 0 1

1 1 0 1 0
8/24/20
Digital Circuits and logic design
1 1 1 0 1
1 1 1 1 1
Aditya Engineering College (A)

Don’t Care Conditions


• A don’t care condition, marked by (X) in the truth table, indicates a
condition where the design doesn’t care if the output is a (0) or a (1).
• A don’t care condition can be treated as a (0) or a (1) in a K-Map.
• Treating a don’t care as a (0) means that you do not need to group it.
• Treating a don’t care as a (1) allows you to make a grouping larger,
resulting in a simpler term in the SOP equation.

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

Some You Group, Some You Don’t

VC This don’t care condition was treated as a (1). This allowed the grouping
C
of a single one to become a grouping of two, resulting in a simpler term.
A B X 0

1 0
AC A B
0 0
A B
X 0
A B

There was no advantage in treating this don’t care condition


as a (1), thus it was treated as a (0) and not grouped.

Digital Circuits and logic design 8/24/20


Aditya Engineering College (A)

THANK YOU

Digital circuits and logic


design Digital Circuits and logic design 8/24/20

You might also like