Canonical Forms. - Philadelphia University Jordan

21-04-2014
Philadelphia University
Faculty of Information Technology
Department of Computer Science
Computer Logic Design
By
Dareen Hamoudeh
Dareen Hamoudeh
1
Canonical Forms
(Standard Forms of Expression)
Minterms and Maxterms
Dareen Hamoudeh
2
1
21-04-2014
Why STANDARD FORMS?
• All Boolean expressions, regardless of their form, can
be converted into either of two standard forms: the
sum-of-products form or the product-of-sums form.
• Standardization makes the evaluation, simplification,
and implementation of Boolean expressions much
more systematic and easier.
Dareen Hamoudeh
3
Examples
 Product Terms : Terms that are ANDed together.
• XYZ
• (A+B)(C+D)(A+D)
 Sum Terms: Terms that are ORed together.
• X+Y+Z
• XYZ + VX
Dareen Hamoudeh
4
2
21-04-2014
Minterms
• So, if we have two literals (x,y) with AND operation
then we have 4 combinations:
X’Y’ X’Y
XY’ XY
Each combination is called minterm.
• Now,For 3 variables we have 23= 8 minterms:
X’Y’Z’ X’Y’Z …
XYZ
• In general, if a function has n variables there are 2n
minterms.
Dareen Hamoudeh
5
Minterms
Dareen Hamoudeh
6
3
21-04-2014
Minterms
• If we have the function
When does it =1 ?
After implementing its truth table:
We notice that f1 =1 in the terms m1, m4, m7 … so:
Dareen Hamoudeh
7
Minterms
•
•
•
•
Also called sum of products (SOP) or Standard Product expression contains:
– Only OR (sum) operations at the “outermost” level.
– Each term that is summed must be a product of literals:
f(x,y,z) = y’ + x’yz’ + xz
Every function can be written as a sum of minterms, which is a special kind of sum
of products form.
The sum of minterms form for any function is unique.
If you have a truth table for a function, you can write a sum of minterms
expression just by picking out the rows of the table where the function output is 1.
And can be expressed in the following notation:
f = x’y’z + xy’z’ + xyz = m1 + m4 + m7
= f(x,y,z) = m(1,4,7)
= f(x,y,z) = (1,4,7)
Dareen Hamoudeh
8
4
21-04-2014
sum of products (SOP)
•
Now, if we have the following truth table, can you extract the sum of
minterms for the function F2.
Dareen Hamoudeh
sum of products (SOP)
The advantage is that any sum of products expression can
be implemented using a two-level circuit
• literals and their complements at the “0th” level
• AND gates at the first level
• a single OR gate at the second level
Dareen Hamoudeh
10
5
21-04-2014
sum of products (SOP)
“complement”
f = x’y’z’ + x’y’z + x’yz’ + x’yz + xyz’
= m0 + m1 + m2 + m3 + m6
= m(0,1,2,3,6)
f’ = xy’z’ + xy’z + xyz
= m4 + m5 + m7
= m(4,5,7)
f’ contains all the minterms not in f
x
y
z
f(x,y,z)
f’(x,y,z)
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1
1
1
1
0
0
1
0
0
0
0
0
1
1
0
1
Dareen Hamoudeh
11
Maxterms
• if we have two literals (x,y) with OR operation then
we have 4 combinations:
X’+Y’ X’+Y
X+Y’ X+Y
Each combination is called maxterm.
• Now,For 3 variables we have 23= 8 minterms:
X’+Y’+Z’ X’+Y’+Z …
X+Y+Z
• In general, if a function has n variables there are 2n
maxterms.
Dareen Hamoudeh
12
6
21-04-2014
Maxterms
Dareen Hamoudeh
13
Maxterms
• If we have the function
When does it =0 ?
We notice that f1 =0 in the terms M0, M2, M3, M5,M6… so:
F1= (X+Y+Z)(X+Y’+Z)(X+Y’+Z’)(X’+Y+Z’)(X’+Y’+Z) = M0 . M2 . M3 . M5 . M6
Dareen Hamoudeh
14
7
21-04-2014
Maxterms
•
•
•
•
Also called Product of sums (POS) or Standard Sums expression contains:
– Only AND(product) operations at the “outermost” level.
– Each term must be a Sum of literals:
f(x,y,z) = y’ (x’ + y + z’) (x + z)
Every function can be written as a product of maxterms, which is a special kind of
products of sums form.
The product of maxterms form for any function is unique.
If you have a truth table for a function, you can write a product of maxterms
expression by picking out the rows of the table where the function output is 0.
And can be expressed in the following notation:
F = (X+Y+Z)(X+Y’+Z)(X+Y’+Z’)(X’+Y+Z’)(X’+Y’+Z) = M0 . M2 . M3 . M5 . M6
= F(x,y,z) = ΠM(0,2,3,5,6)
= F(x,y,z) = Π(0,2,3,5,6)
Dareen Hamoudeh
15
Product of sums (POS)
•
Now, if we have the following truth table, can you extract the Product of
maxterms for the function F2.
Dareen Hamoudeh
16
8
21-04-2014
Product of sums (POS)
“complement”
f = (x’ + y + z)(x’ + y + z’)(x’ + y’ + z’)
= M4 M5 M7
= ΠM(4,5,7)
f’ = (x + y + z)(x + y + z’)(x + y’ + z)
(x + y’ + z’)(x’ + y’ + z)
= M0 M1 M2 M3 M6
= ΠM(0,1,2,3,6)
f’ contains all the maxterms not in f
x
y
z
f(x,y,z)
f’(x,y,z)
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1
1
1
1
0
0
1
0
0
0
0
0
1
1
0
1
Dareen Hamoudeh
17
Minterms and maxterms are related
•
Any minterm mi is the complement of the corresponding maxterm Mi
•
For example, m4’ = M4 because (xy’z’)’ = x’ + y + z
Dareen Hamoudeh
18
9
21-04-2014
Converting between standard forms
•
We can convert a sum of minterms to a product of maxterms
From before
and
complementing
so
f
f’
= m(0,1,2,3,6)
= m(4,5,7)
= m4 + m5 + m7
(f’)’ = (m4 + m5 + m7)’
f = m4’ m5’ m7’
[ DeMorgan’s law ]
= M4 M5 M7
[ By the previous page ]
= ΠM(4,5,7)
•
In general, just replace the minterms with maxterms, using maxterm numbers that
don’t appear in the sum of minterms:
f = m(0,1,2,3,6)
= ΠM(4,5,7)
•
The same thing works for converting from a product of maxterms to a sum of
minterms.
Dareen Hamoudeh
19
Product of Sums
• If f(x, y, z) = sum of minterms (0, 1, 4, 5), represent f as a
product of maxterms
–
–
–
–
A: product of maxterms(2, 3)
B: product of maxterms(2, 3, 6, 7)
C: product of maxterms(0, 1, 4, 5)
D: product of maxterms(5, 6, 7)
Dareen Hamoudeh
20
10
21-04-2014
Sum Of Minterms
Dareen Hamoudeh
21
Example 1
• Express the function F(A,B,C) = AB+A’C in
minterm notation
• First term AB misses the variable C, so AND term
with (C+C’):
AB= AB(C+C’) = ABC + ABC’
• Second term A’C misses the variable B so, AND
term with (B+B’):
A’C= A’C(B+B’)= A’BC + A’B’C
Now we combine the terms:
F(A,B,C)=ABC + ABC’ + A’BC + A’B’C
= m7 + m6 + m3 + m1
Dareen Hamoudeh
22
11
21-04-2014
Example 2
• Express E = Y’ + X’Z’ in minterm notation.
E = (X+X’)Y’ + X’Z’(Y+Y’)
= XY’(Z+Z’) + X’Y’(Z+Z’)+X’YZ’+X’Y’Z’
= XY’Z+XY’Z’+X’Y’Z+X’Y’Z’+X’YZ’
= m5 + m4 + m1 + m0 + m2
= m5 + m4 + m2 + m1 + m0
Dareen Hamoudeh
23
Product of maxterms
Dareen Hamoudeh
24
12
21-04-2014
Example 1
Dareen Hamoudeh
25
Example 1 cont.
Dareen Hamoudeh
26
13
21-04-2014
Note
Dareen Hamoudeh
27
14