CS251 - Computer Organization
Computer Science 251
Computer Organization
Dickinson College
Fall Semester 1999
Grant Braught
Class #10 - Boolean Algebra and Logic Simplification
Simplification Example #1:
___
___ _
Z = (A B) + (A C)
_
_ _ _ _
Z = (A + B) + (A + C) DeMorgan's AND
_ _ _
Z = A + B + A + C
_ _ _
Z = (A + A) + B + C Commutative/Associative OR
_ _
Z = (1 + B) + C Inverse/Associative OR
_
Z = 1 + C Null OR
Z = 1 Null OR
Note: Terms such as !(AB) or !(A+B) will require the use of DeMorgan's laws to simplify.
Simplification Example #2:
____________
___ ___
Z = ((A B)(A C))
________________
_ _ _ _
Z = ((A + B)(A + C)) DeMorgan's AND
_______ _______
_ _ _ _
Z = (A + B) + (A + C) DeMorgan's AND
_ _ _ _
_ _ _ _
Z = A B + A C DeMorgan's OR
Z = A B + A C
How many gates will it require to compute Z?
3 - 2 AND and 1 OR.
Can we do better?
Sure, continue the simplification one step further:
Z = A (B + C) Distributive OR
This implementation only requires 2 gates.
 
The moral of the story is that SOP gives and easy implementation but it is not always the best.
MinTerm Form:
MinTerm form is another (more compact) way of expressing a boolean function.
A B C D | Z
--------+--
0 0 0 0 0 | 1
1 0 0 0 1 | 0
2 0 0 1 0 | 0
3 0 0 1 1 | 0
4 0 1 0 0 | 1
5 0 1 0 1 | 0
6 0 1 1 0 | 1
7 0 1 1 1 | 0 MinTerm Form --> Z(A,B,C,D) = Sm(0,4,6,10,11,14)
8 1 0 0 0 | 0
9 1 0 0 1 | 0
10 1 0 1 0 | 1
11 1 0 1 1 | 1
12 1 1 0 0 | 0
13 1 1 0 1 | 0
14 1 1 1 0 | 1
15 1 1 1 1 | 0
To get the MinTerm form list the rows of the truth table that contain 1's.
What if you don't have a truth table?
Several possibilities:
Generate one from the expression that you do have.
Convert your expression to SOP form then convert to the MinTerms.
Example #1: Express the following SOP expression in MinTerm form.
_ _ _ _ _ _ _ _ _ _ _ _
Z = A B C D + A B C D + A B C D + A B C D + A B C D + A B C D + A B C D + A B C D
1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 0 1 0 1 0 1 1 0 0 0 1 1 0 0 1 0 0
15 11 7 14 10 12 6 4
Z(A,B,C,D) = Sm(4,6,7,10,11,12,14,15)
To find the MinTerms:
 
Write down a 1 for each non-inverted term - corresponding to 1's in the truth table.
 
Write down a 0 for each inverted term - corresponding to 0's in the truth table.
 
Convert the resulting binary numbers to decimal.
 
List the decimal numbers in increasing order in the MinTerm notation.
Example #2: Express the following SOP expression in MinTerm form.
_ _ _
J = A B + A C + A B C
What is the difficulty here?
Not all of the terms contain all of the variables!
Can that be fixed?
Yes. Use the Identity Law.
_ _ _
J = A B + A C + A B C
_ _ _ _ _
J = A B (C + C) + A C (B + B) + A B C Identity OR
_ _ _
NOTE: A B (C + C) = A B
_ _ _
A C (B + B) = A C
_ _ _ _ _ _ _
J = A B C + A B C + A C B + A C B + A B C Distributive OR
_ _ _ _ _ _ _
J = A B C + A B C + A B C + A B C + A B C Commutative OR
1 0 1 1 0 0 0 1 1 0 0 1 1 1 0
5 4 3 1 6
J(A,B,C) = Sm(1,3,4,5,6)
The SOP form where each term contains all variables is called: Sum-of-Normal-Products
Example #3: Express the following expression in MinTerm form.
___ _ _____
K = (A B + C) (A + C)
What is the problem here?
This isn't even in SOP form, yet alone Sum-of-Normal-Products.
So convert it to SOP and then convert it to Sum-of-Normal-Products.
___ _____
K = (A B + C) (A + C)
_ _ _ _
K = ((A + B) + C) (A C) DeMorgan's AND/OR
_ _ _ _
K = (A + B + C) (A C) Associative OR
_ _ _ _ _ _ _ _
K = A (A C) + B (A C) + C (A C) Distributive OR
_ _ _ _ _ _ _ _
K = A A C + A B C + A C C Associative/Commutative AND
_ _ _ _ _ _
K = A C + A B C + A 0 Idempotent/Inverse AND
_ _ _ _ _
K = A C + A B C Null AND
_ _ _ _ _ _
K = A C (B + B) + A B C Identity OR
_ _ _ _ _ _ _ _
K = A C B + A C B + A B C Distributive OR
_ _ _ _ _ _ _ _
K = A B C + (A B C + A B C) Commutative AND / Associative OR
_ _ _ _ _
K = A B C + A B C Idempotent OR
0 1 0 0 0 0
2 0
K(A,B,C) = Sm(0,2)
To convert an expression to SOP form:
 
Expand all !(AB) and !(A+B) type terms using DeMorgan's law.
 
Apply the distributive laws until an SOP form is achieved.
 
Use the Commutative law to write the variables of all terms in the same order.
To go to Sum-of-Normal-Products from SOP use the Identity and Distributive OR laws.