Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
CS 21 - Computer Organization and Assembly Language Programming Lecture 11 Boolean Algebra 2
University of the Philippines - Diliman College of Engineering Department of Computer Science
Canonical Form
Sum of Minterms
Outline
1
Canonical Form
2
Sum of Minterms
3
Product of Maxterms
4
Karnaugh Maps
Product of Maxterms
Karnaugh Maps
Canonical Form
Sum of Minterms
Outline
1
Canonical Form
2
Sum of Minterms
3
Product of Maxterms
4
Karnaugh Maps
Product of Maxterms
Karnaugh Maps
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
What is a Canonical Form?
An expression structure with which every function could be realized or expressed with.
Canonical Form
Sum of Minterms
Product of Maxterms
Canonical Forms in Boolean Algebra
Sum of Minterms Product of Maxterms
Karnaugh Maps
Canonical Form
Sum of Minterms
Product of Maxterms
Why are Canonical Forms inportant?
They enable us to make the jump from truth table to circuit/expression
Karnaugh Maps
Canonical Form
Sum of Minterms
Outline
1
Canonical Form
2
Sum of Minterms
3
Product of Maxterms
4
Karnaugh Maps
Product of Maxterms
Karnaugh Maps
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
What is a Minterm?
In an n-variable Boolean function, a product term in which each of the n variables appears once (in either its complemented or uncomplemented form).
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
Minterm Example
Let’s say that our Boolean function has the input variables a, b, c and d. Examples of minterms: abcd a’b’c’d’ a’bcd Question: Given n variables, how many minterms are there?
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
Indexing Minterms
The minterms of a function are frequently indexed by ”reading” the values of inputs as 1s or 0s: 1 when uncomplemented, 0 when complemented. For example, given a four variable function with input variables a, b, c and d: abcd = 1111 = m15 (or minterm 15) a’b’c’d’ = 00004 = m0 a’bcd = 0111 = m7
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
Sum-of-Minterms Principle
Given an n-variable Boolean function, we could express it a sum of some of its minterms.
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
Sum-of-Minterms Principle
Given an n-variable Boolean function, we could express it a sum of some of its minterms. Main issue: Which minterms?
Canonical Form
Sum of Minterms
Product of Maxterms
Truth Table to Sum-of-Minterms
Scan the rows of the truth table
Which minterms?
Karnaugh Maps
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
Truth Table to Sum-of-Minterms Rows in which the output is 1, get to be converted to the included minterm, with the values of the columns dictating the minterm configuration
Canonical Form
Sum of Minterms
Truth Table to Sum-of-Minterms
Minterm Indexes: 0, 1, 2, 3, 7
Product of Maxterms
Karnaugh Maps
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
Truth Table to Sum-of-Minterms
Minterm Indexes: 0, 1, 2, 3, 7 Sum-of-Minterm Boolean Expression: m0 +m1 +m2 +m3 +m7 a’b’c’ + a’b’c + a’bc’ + a’bc + abc
Canonical Form
Sum of Minterms
Outline
1
Canonical Form
2
Sum of Minterms
3
Product of Maxterms
4
Karnaugh Maps
Product of Maxterms
Karnaugh Maps
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
What is a Maxterm?
In an n-variable Boolean function, a product term in which each of the n variables appears once (in either its complemented or uncomplemented form).
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
Maxterm Example
Let’s say that our Boolean function has the input variables a, b, c and d. Examples of maxterms: (note the capitalization) A+B+C+D A’ + B’ + C’ + D’ A’ + B + C + D Question: Given n variables, how many maxterms are there?
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
Product-of-Maxterms Principle
Given an n-variable Boolean function, we could express it a product of some of its maxterms.
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
Product-of-Maxterms Principle
Given an n-variable Boolean function, we could express it a product of some of its maxterms. Main issue: Which maxterms?
Canonical Form
Sum of Minterms
Product of Maxterms
Truth Table to Product-of-Maxterms Scan the rows of the truth table
Which maxterms?
Karnaugh Maps
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
Truth Table to Product-of-Maxterms Rows in which the output is 0, get to be converted to the included maxterm, with the values of the columns dictating the minterm configuration
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
Truth Table to Product-of-Maxterms IMPORTANT DIFFERENCE: unlike in the Sum-of-Minterm derivation, zero column value -> uncomplemented input and one column value -> complemented input value
Product-of-Maxterm Boolean Expression: (M4 )(M5 )(M6 ) (A’ + B + C)(A’ + B + C’)(A’ + B’ + C)
Canonical Form
Sum of Minterms
Outline
1
Canonical Form
2
Sum of Minterms
3
Product of Maxterms
4
Karnaugh Maps
Product of Maxterms
Karnaugh Maps
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
Sum of Products and Product of Sums
Sum of Products form Excluding inverters, two levels Just like sum of minterms, but terms/”addends” need not be minterms Product of Sums form Excluding inverters, two levels Just like product of maxterms, but terms/”multiplicands” need not be maxterms
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
Point to remember
Sum-of-Minterms and Product-of-Maxterms NOT minimal
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
Karnaugh Map
K-maps for short First described by Maurice Karnaugh in the 1950s Modified truth table intended to allow minimal SOP and POS expressions to be obtained by visual inspection
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
Setting up the Karnaugh Map
�Split� the variables into two sets: those that would become rows and those that would become columns
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
Setting up the Karnaugh Map �Split� the variables into two sets: those that would become rows and those that would become columns When drawing the grid or the truth table make sure that all combinatorial values for the variables are represented
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
Setting up the Karnaugh Map �Split� the variables into two sets: those that would become rows and those that would become columns When drawing the grid or the truth table make sure that all combinatorial values for the variables are represented Fill in the output values
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
Deriving the Expressions from the Karnaugh Map
For SOP find squares and rectangles of 1s, making sure that all 1 are covered. Notes make sure that the size of a rectangle or square is a power of 2 edges of the grid wraparound
each square or rectangle is a term, with the unchanged variable throughout the shape being present in the term
Canonical Form
Sum of Minterms
Product of Maxterms
Sum of Products
Minimal SOP: a’ + bc’
Karnaugh Maps
Canonical Form
Sum of Minterms
Product of Maxterms
Karnaugh Maps
Deriving the Expressions from the Karnaugh Map
For POS find squares and rectangles of 0s, making sure that all 1 are covered. Notes make sure that the size of a rectangle or square is a power of 2 edges of the gris wraparound
each square or rectangle is a term, with the unchanged variable throughout the shape being present in the term
Canonical Form
Sum of Minterms
Product of Maxterms
Product of Sums
Minimal POS: (A’ + C)(A’ + B)
Karnaugh Maps
Canonical Form
Sum of Minterms
Product of Maxterms
So...
Any questions?
Karnaugh Maps