# variables sum

Objectives:
1. Deriving of logical expression form truth tables.
2. Logical expression simplification methods:
a. Algebraic manipulation.
b. Karnaugh map (k-map).
1. Deriving of logical expression from truth tables
Definitions:
Μ ).
Literal: Non-complemented or complemented version of a variable (π¨ or π¨
Product term: a series of literals related to one another through the AND
Μ β πͺ).
Sum term: A series of literals related to one another through the OR operator
Μ ).
Μ +πͺ
SOP form: (Sum –of-products form):
ο The logic-circuit simplification require the logic expression to be in SOP
form , for example:
Μ + πͺ
Μπ«
Μ
POS form (product-of-sum form):
ο This form sometimes used in logic circuit, example:
Μ + πͺ)
(π¨ + πͺ) β (πͺ + π«
ο The methods of circuit simplification and design that will be used are based
on SOP form.
Canonical and standard form
ο Product terms that consist of the variables of function are called
&quot;Canonical product terms&quot; or &quot;Minterms &quot;.
Μ is a minterm in a three variable logic function, but will be a
non-minterm in a four variable logic function.
ο Sum terms which contain all the variables of a Boolean function are called
&quot;Canonical sum terms&quot; or Maxterms&quot;.
Μ + πͺ is a maxterm in a three variable logic function.
Μ, π¨
ο for two variables π¨ and π©, there are four combination: π¨
called minterms or standard products
Μ
0
0
π¨
0
1
π¨
Μ
1
0
AB
1
1
π
ο for π variables there are π minterms
Example: minterms and maxterms for 3 variables:
inputs
π¨ π΅ πΆ
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
Minterm
Designation
Maxterm
Designation
Μ
Μπͺ
π¨
Μπͺ
π¨
Μ
π¨
π΄Μπ΅πΆ
π΄π΅ΜπΆΜ
π΄π΅ΜπΆ
Μ
π΄π΅πΆ
m0
m1
m2
m3
m4
m5
m6
m7
Μ
Μ +πͺ
π΄ + π΅Μ + πΆΜ
π΄Μ + π΅ + πΆ
π΄Μ + π΅ + πΆΜ
Μ +πͺ
π¨
Μ
Μ +πͺ
π¨
M0
M1
M2
M3
M4
M5
M6
M7
Two important properties:
οΆ Any Boolean function can be expressed as a sum of minterms.
οΆ Any Boolean function can be expressed as a product of minterms.
Example: Majority function: (for 3 variables)
Output is one whenever
majority of inputs is 1
inputs
π¨ π΅ πΆ
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
Output
F
0
0
0
1
0
1
1
1
inputs
Output
F
π¨ π΅ πΆ
0
0
0
0
0
0
0
1
0
0
1
0
0
1
1
1
0
1
0
0
1
0
1
1
1
1
0
1
1
1
1
1
ο Final expression:
Minterms
SOP Form
π¨
-----π΄π΅ΜπΆ
Μ
Maxterms
POS Form
Μ
Μ +πͺ
π¨
----------------
ο Four product terms, because,
there are 4 rows with a 1 output.
ο Final expression:
π­=π¨
ο Four sum terms, because, there
are 4 rows with a 0 output.
Μ ) β (π¨ + π©
Μ + πͺ) β (π¨
π­ = (π¨ + π© + πͺ) β (π¨ + π© + πͺ
Derivation of logical expression form truth tables
Summary
οΌ Sum-of-product (SOP) form.
οΌ Product-of- sums (POS) form.
o SOP form :
ο§ Write an AND term for each input combination that produces a 1
output.
ο§ Write the variable if its value is 1 , complement otherwise.
ο§ OR the AND terms to get the final expression.
2. logical expression simplification methods:
Two basic methods:
a) Algebraic manipulation:
ο Use Boolean laws to simplify the expression: (difficult to use and
don’t know if you have the simplified form.
b) Karnaugh map (k-map) method:
ο Graphical method.
ο Ease to use.
ο Can be used to simplify logical expressions with a few variables.
a) Algebraic manipulation
Example 1:
Design a logic circuit that has three inputs, π¨, π© and πͺ and whose output will be
high only when a majority of the input are high .(complete design procedure).
Solution:
Step 1: set up the truth table (see previous section)
Step 2: write the AND term for each case where the output is a
1 :( see previous section)
Step 3: write the sum-of-products expression for the output
π­=π¨
Step 4: simplify the output expression
ο Find the common term(s): π¨π©πͺ -common term.
ο Use the common term (π¨π©πͺ) to factor with other terms:
π­=π¨
ο Factoring the appropriate pairs of terms:
Μ + πͺ)
Step 5: implement the circuit for the final expression.
A
B
C
BC
F ο½ BC ο« AC ο« AB
AC
AB
Example 2: simplify the Boolean function.
Solution:
(Common term)
Μ πͺ + π©πͺ(π¨ + π¨
Μ)
Μπͺ + π¨
= π¨π©(π + πͺ) + π¨
Μ πͺ (The result)
Example 3: simplify the following Boolean function to a minimum number of
literals.
Solution:
πΏ = π©πͺ(π + π«) + π¨πͺ
Example 4: simplify the expression.
Μπͺ
Solution: (the expression is in SOP form)
Μ (πͺ
Μ + πͺ)
Example 5: simplify the expression.
ΜΜΜΜΜΜΜ
Μπ«
Μ πͺ(π¨
Μπͺ
π=π¨
Solution:
οΌ First, use Demorgan’s theorem on the first term:
Μπ«
Μ πͺ(π¨
Μ +π«
Μ) + π¨
Μπͺ
π=π¨
Μπ«
Μ +π«
Μ) + π¨
Μπͺ
π=π¨
οΌ Multiply, we get:
Μπ«
Μ πͺπ¨ + π¨
Μ +π¨
Μ πͺπ«
Μ +π¨
Μπͺ
π=π¨
(π΄Μπ΄ = 0) then
Μπ«
Μπͺ + π¨
Μ πͺπ«
Μ +π¨
Μπͺ
π=π¨
οΌ Check for the largest common factor between any two or more
product terms:
Μ)
Μ πͺ(π¨
Μ + π¨) + π¨
Μπ«
1
οΌ We get:
Μπͺ + π¨
Μπ«
οΌ The result can be obtained with other choices
Example 6: Find the complement of the following Boolean function:
Μ+π¨
Μ + πͺπ«
Μ)
Solution:
οΌ Use Demorgan’s theorem :
Μ+π¨
Μ = ΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜ
Μ + πͺπ«
Μ)
π
Μ+π¨
Μ π«) + ΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜ
Μ + πͺπ«
Μ)
= ΜΜΜΜΜΜΜΜΜΜΜΜΜΜΜ
ΜΜΜΜΜ
ΜΜΜΜ
ΜΜΜΜ
Μ β ΜΜΜΜ
Μ β πͺπ«
Μ
π¨
ΜΏ ) β (π¨
Μ+π«
Μ +πͺ
ΜΏ+π«
Μ ) + (π¨
ΜΏ )(πͺ
ΜΏ)
Μ + π«)
Μ + πͺ) β (π¨ + π«
Μ ) + (π¨
οΌ It’s not in standard form
Example 7:
Express the following function in a sum of minterms and product of maxterms.
a) Sum of minterms:
οΌ Multiply, we get:
Μ=π
π¨+π¨
Μ ) + π©πͺ(π¨ + π¨
Μ)
Μπͺ
Μπͺ
m6
m7
m3
Μ=π
πͺ+πͺ
m5
οΌ So, we can write:
π(π¨, π©, πͺ) = ∑ π(π, π, π, π)
Μ =π
π¨+π¨=π¨
inputs
Minterm
π¨ π΅ πΆ
0
0
0
m0
0
0
1
m1
0
1
0
m2
0
1
1
m3
1
0
0
m4
1
0
1
m5
1
1
0
m6
1
1
1
m7
Sum of minterms
z
0
0
0
1
0
1
1
1
b) Sum of maxterms
οΌ Using distributive law:
οΌ In the
οΌ We get:
o In
o In
o In
οΌ We can
π¨ + π© we need πΆ
π© + πͺ we need π¨
πͺ + π¨ we need π©
write
Μ)
Μ)
Μ)
Μ)
(πͺ + π¨) = (πͺ + π¨ + π©)(πͺ + π¨ + π©
οΌ Substitute all of these term in π ,we get:
Μ ) (πͺ + π¨
Μ)
Μ ) (π© + πͺ + π¨
Μ )(πͺ + π¨ + π©
Μ)
Μ ) (π¨
Μ + πͺ)
π = π΄π β π΄π β π΄π β π΄π
inputs
π¨ π΅ πΆ
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
π
Maxterm
0
0
0
1
0
1
1
1
M0
M1
M2
M3
M4
M5
M6
M7
Example 8: simplify the logic circuit shown in the following figure.
__
A
A B
B C
C
ο¦ __ οΆ
A B ο§ο§ A C ο·ο·
ο¨
οΈ
__
AC
ο¦ __ οΆ
Z ο½ ABC ο« A B ο§ο§ A C ο·ο·
ο¨
οΈ
Solution:
οΌ The output of the circuit is
Μ. (π
ΜΜΜΜ
ΜπΜ)
π = πππ + ππ
οΌ Using Demorgan’s law and multiply out all terms:
Μ(π
ΜΏ + πΜΏ)
π = πππ + ππ
Μ(π + π)
π = πππ + ππ
Μπ + ππ
Μπ
π = πππ + ππ
Μπ + ππ
Μπ
π = πππ + ππ
Μ + ππ
Μπ
π = πππ + ππ
SOP Form
Μ + ππ
Μπ
π = πππ + ππ
Μ) + ππ
Μ
π = ππ(π + π
Μ = ππ + ππ
Μ = π(π + π
Μ)
π = ππ. π + ππ
__
A B
B C
B ο« C
Z ο½ A( B ο« C )