3hx boolean algebra assign sop pos
DESCRIPTION
3HX-Boolean Algebra -ASSIGN - SOP-POSTRANSCRIPT
Logic Circuits and Switching Theory URSM-COENG
F. M. Fernando Page 1 of 10
PROBLEMS AND EXAMPLES ON LAWS OF BOOLEAN ALGEBRA
1. Using Boolean algebra techniques, simplify AB + A(B + C) + B(B + C).
Solution: The following is not necessarily the only approach.
Step 1: Apply the Distributive law to the second & last terms in the expression,
AB + AB + AC + BB + BC
Step 2: Apply (BB=B) to the fourth term, AB + AB + AC + B + BC
Step 3: Apply (AB+AB=AB) to the first two terms, AB + AC + B + BC
Step 4: Apply (B+BC=B) to the last two terms, AB + AC + B
Step 5: Apply (AB+B=B) to the first & third terms. B + AC
Therefore, AB + A(B + C) + B(B + C) is reduced to B + AC.
(NOTE: The least number of logical steps to solve this problem is the best solution.)
2. Simplify A’BC + AB’C’ + A’B’C’ + AB’C + ABC.
Solution:
Step 1: Factor BC out of the first & last terms, BC(A’ + A) + AB’C’ + A’B’C’ + AB’C
Step 2: Apply (A’ + A=1) to the term in parentheses, factor AB’ from the second & last terms,
BC(1) + AB’(C’ + C) + A’B’C’
Step 3: Drop the 1 to the first term & (C’ + C=1) to the term in parentheses, BC + AB’(1) + A’B’C’
Step 4: Drop the 1 to the second term, BC + AB’ + A’B’C’
Step 5: Factor B’ from the second & last terms, BC + B’(A + A’C’)
Step 6: Apply (A + A’C’=A + C’) to the term in parentheses, BC + B’(A + C’)
Step 7: Use the Distributive & Commutative laws, BC + AB’ + B’C’
Therefore, A’BC + AB’C’ + A’B’C’ + AB’C + ABC = BC + AB’ + B’C’.
3. Prove that A + A’B = A + B .
A. This rule can be proved as follows:
(A + AB) + A’B = (from A = A + AB) (AA + AB) + A’B = (since A = AA) (AA + AB) + 0 + A’B= (recall X + 0 = X) (AA + AB) + (AA’ + A’B) = (bec. AA’ = 0) (A + A’)(A + B) = (factoring) 1 (A + B) = (from A + A’ = 1) A + B = A + B (drop the 1)
4. Is A + BC = (A + B)(A +C) valid?
A + BC = (A + B)(A + C)
= AA + AC + AB + BC (Distributive law) = A + AC + AB + BC (bec. AA = A) = A(1 + C) + AB + BC (factoring) = A1 + AB + BC (since 1 + C = 1) = A + AB + BC (bec. A1=A) = A(1 + B) + BC (factoring) = A1 + BC (since 1 + B = 1)
A + BC = A + BC (bec. A1=A) Therefore, A + BC = (A + B)(A +C) is valid.
5. Apply De Morgan’s Laws to (AB + C)(A + BC).
(AB + C) (A + BC) = (AB + C) + (A + BC) = (AB) C + A (BC) = (A + B)C + A(B + C)
B. The proof can also be carried by Truth table such as:
A B A’ A’B A+A’B A+B
0 0 1 1
0 1 0 1
1 1 0 0
0 1 0 0
0 1 1 1
0 1 1 1
EQUAL C. The resulting logic circuit simplification:
Logic Circuits and Switching Theory URSM-COENG
F. M. Fernando Page 2 of 10
ASSIGNMENT
Logic Circuits and Switching Theory URSM-COENG
F. M. Fernando Page 3 of 10
Logic Circuits and Switching Theory URSM-COENG
F. M. Fernando Page 4 of 10
Logic Circuits and Switching Theory URSM-COENG
F. M. Fernando Page 5 of 10
Logic Circuits and Switching Theory URSM-COENG
F. M. Fernando Page 6 of 10
STANDARD FORMS OF BOOLEAN EXPRESSION
THE SUM-OF-PRODUCT (SOP) FORM
A product term is term consisting of the product (Boolean multiplication) of literals (variables or their
complements). When two or more product terms are summed by Boolean addition, the resulting
expression is a SOP. Some examples are
B + ABC
ABC + CDE + B’CD’
A’B + A’BC’ + AC
The domain of general Boolean expression is the set of variables contained in the expression in either
complemented or uncomplemented form. For example, the domain of the expression
A’B + AB’C is the set of variables A, B, C
and the domain of the expression
ABC’ + CD’E + B’CD’ is the set of variables A, B, C, D, E.
An SOP expression can be implemented with one OR gate and two or more AND gates (ORing the
outputs of two or more AND gates). The implementation of the SOP expression AB + BCD + AC is
shown. The output X of the OR gate equals the SOP expression.
CONVERSION OF A GENERAL EXPRESSION TO SOP FORM
The expression A(B + CD) for example, can be converted to SOP for by Boolean algebra techniques (in
here, the Distributive law)
A(B + CD) = AB + ABCD
Other examples follow,
AB + B(CD + EF) = AB + BCD + BEF
(A + B) + C = (A + B) C = (A + B) C = AC + BC
THE STANDARD SOP FORM
A standard SOP expression is one in which all the variables in the domain appear in each product term in
the expression, as in ABC’D + A’B’CD’ + ABC’D’.
To convert product terms to standard SOP:
Step 1: Multiply each nonstandard product term by a term made up of the sum of a missing variable
and its complement. This results in two product terms where any variable added to its
complement equals 1. As you know, you can multiply anything by 1 without changing its value.
For example, the term ABC is missing variable D or D’
Logic Circuits and Switching Theory URSM-COENG
F. M. Fernando Page 7 of 10
ABC(D +D’)= ABCD + ABCD’
Step 2: Repeat Step 1 until all resulting product terms contain all variables in the domain in either
complemented or uncomplemented form. In converting a product term to standard form, the
number of product terms is doubled for each missing variable, as in this example
AB’C + A’B’ + ABC’D
= AB’C(D + D’) + [A’B’(C + C’)](D + D’) + ABC’D
= AB’CD + AB’CD’ + [A’B’C + A’B’C’](D+D’) + ABC’D
= AB’CD + AB’CD’ + A’B’CD + A’B’CD’ + A’B’C’D + A’B’C’D’ + ABC’D
BINARY REPRESENTATION OF A STANDARD PRODUCT TERM
A standard product term is equal to 1 for only one combination of variable values. For example, when A=1, B=0, C=1, D=0 the product term AB’CD’ = 1, since
AB’CD’ = 1 0’ 1 0’ = 1 1 11 = 1
Note: A product term is implemented with an AND gate whose output is 1 only if each of its input is 1.
Inverters are used to produce the complements of the variables as required.
Example: Determine the binary values for which the following standard SOP expression is equal to 1,
A B C D + A B’ C’ D + A’B’C’D’
Solution: 1 1 11 + 10’0’1 + 0’0’0’0’ = 1 + 1 + 1 = 1
Hence, for the first term, A=1, B=1, C=1, D=1
for the second term, A=1, B=0, C=0, D=1
for the last term, A=0, B=0, C=0, D=0
The SOP expression equals 1 when any or all of these three product terms is 1.
THE PRODUCT-OF-SUMS (POS) FORM
When two or more sum terms are multiplied, the resulting expression is a product-of-sums (POS). Some
examples are
(A’ + B)(A + B’ + C)
(A’ + B’ + C’)(C + D’ + E)(B’ + C + D)
B(A + B’ + C)(A’ + C)
A POS expression can be implemented by logic in which the outputs of a number (equal to the number of sum terms in the expression) of OR gates connect to the inputs of an AND gate, as in
THE STANDARD POS FORM
For example, the expression (A + B’ + C)(A + B + D’)(A + B’ + C’ + D) has a domain made up of the variables A, B, C, D. Each sum term in a POS expression that does not contain all the variables in the domain, as in the given expression, can be expanded to standard form as follows: Step 1: Add to each nonstandard product term a term made up of the product of the missing variable
and its complement. This results in two sum terms. For example, the term A + B’ + C is missing
variable DD’
Logic Circuits and Switching Theory URSM-COENG
F. M. Fernando Page 8 of 10
A + B’ + C = A + B’ + C + DD’ Step 2: Apply the theorem: X + YZ = (X + Y)(X + Z), for the given expression, let X = A + B’ + C
A + B’ + C + DD’ = (A + B’ + C + D)( A + B’ + C + D’)
Step 3: Repeat Step 1 until all resulting sum terms contain all variables in the domain in either
complemented or uncomplemented form.
BINARY REPRESENTATION OF A STANDARD SUM TERM
A standard sum term is equal to 0 for only one combination of variable values. For example, when A=0,
B=1, C=0, D=1 the sum term A + B’ + C + D’ = 0, since A + B’ + C + D’ = 0 + 1’ + 0 + 1’ = 0 + 0 + 0 + 0 = 0
Note: A sum term is implemented with an OR gate whose output is 0 only if each of its input is 0.
Inverters are used to produce the complements of the variables as required.
Example: Determine the binary values for which the following standard POS expression is equal to 0,
(A+B+C+D)(A+ B’+ C’+ D)(A’+B’+C’+D’)
Solution: ( 0+0+0+0 )( 0+ 1’ + 1’ +0 )( 1’+1’+1’+ 1’ ) = 0 0 0 0 = 0
Hence, for the first term, A=0, B=0, C=0, D=0
for the second term, A=0, B=1, C=1, D=0
for the last term, A=1, B=1, C=1, D=1
The POS expression equals 0 when any of these three sum terms equals 0.
CONVERTING STANDARD SOP TO STANDARD POS THROUGH TRUTH TABLE FORMAT
Converting SOP Expressions to Truth Table Format
A truth table is simply a list of the possible combinations of input variable values (domain) and the
corresponding output values (1 or 0). For an expression with a domain of 3 variables, there are 8 of
those variables (23 = 8). For an expression with a domain of 4 variables, there are 16 of those variables
(24 = 16), and so on. The following are the steps to follow:
1. The first step in constructing a truth table from a SOP expression is to list all possible
combination of binary values of the variables in the expression.
2. Next, convert the SOP expression to standard form if it is not already.
3. Finally, place a 1 in the output column (i.e., X) for each binary value that makes the standard
SOP expression a 1 and place a 0 for all the remaining binary values.
Example 1: Develop the truth table for X = A’B’C + AB’C’ + ABC.
Solution: There are 3 variables in the domain, so there are 8 (23=8) possible combinations of binary values of the input variables ABC as 000, 001, 010, 011, …, 111. The binary values that make the product terms in the expressions equal to 1 are: A’B’C:001; AB’C’:100; and ABC:111. For each of these binary values, place a 1 in the output (X) column. For each of the remaining binary combinations, place a 0 in the output column.
INPUTS OUTPUT PRODUCT TERM
A B C X 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1
0 1 0 0 1 0 0 1
A’B’C
AB’C’
ABC
Logic Circuits and Switching Theory URSM-COENG
F. M. Fernando Page 9 of 10
Converting POS Expressions to Truth Table Format
Recall that a POS expression is equal to 0 only if at least one of the sum terms is equal to 0. The
following are the steps to follow:
1. The first step in constructing a truth table from a POS expression is to list all possible
combination of binary values of the variables in the expression.
2. Next, convert the POS expression to standard form if it is not already.
3. Finally, place a 0 in the output column (i.e., X) for each binary value that makes the standard
SOP expression a 0 and place a 1 for all the remaining binary values.
Example 2: Determine the truth table for X = (A+B+C)(A+B’+C)(A+B’+C’)(A’+B+C’)(A’+B’+C).
Solution: There are 3 variables in the domain and the 8 possible binary values are listed in the inputs columns. The binary values that make the sum terms in the expression equal to 0 are (A+B+C):000;
(A+B’+C):010;(A+B’+C’):011;(A’+B+C’):101;(A’+B’+C):110. For each of these binary values, place a 0 in the output column. For each of the remaining binary combinations, place a 1 in the output column.
INPUTS OUTPUT SUM TERM
A B C X 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1
0 1 0 0 1 0 0 1
A+B+C
A+B’+C
A+B’+C’
A’+B+C’
A’+B’+C
Converting Standard SOP-To-POS/POS-To-SOP Expressions
Notice that the truth table in Example 1 and 2 (above) are equivalent. This means that the SOP expression can be converted to its equivalent POS expression, and vice versa as shown,
INPUTS OUTPUT PRODUCT or SUM TERM A B C X
0 0 0 0 A+B+C
0 0 1 1 A’B’C
0 1 0 0 1 1
0 0
A+B’+C
A+B’+C’
1 0 0 1 AB’C’
1 0 1 1 1 0
0 0
A’+B+C’
A’+B’+C
1 1 1 1 ABC
Logic Circuits and Switching Theory URSM-COENG
F. M. Fernando Page 10 of 10
PROBLEMS
1. Create a truth table (including the product term column) for the standard SOP expression A’BC’ + AB’C.
2. Develop a truth table(including the sum term column) for the following standard POS expression
(A+B’+C)(A+B+C’)(A’+B’+C’)
3. From the truth table shown, determine the SOP and POS expressions. Draw the equivalent logic
circuits.
INPUTS OUTPUT PRODUCT or SUM TERM A B C X
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1
4. If a certain Boolean expression has a domain of 5 variables, how many binary values will be in its truth table?
5. In a certain truth table, the output is a 0 for the binary value 1100 and the rest are all 1’s. Write the POS and SOP equivalent Boolean equations out of this information.
PROJECT REPORT
Minimizing Boolean functions using Karnaugh Maps is not applicable for more than 5 variables and practical for only up to 4 variables, hence the class is to choose to report on two alternatives, namely
1. The Quine-McClusky Method which has the advantage of being easily implemented with a computer or programmable calculator.
2. Espresso Algorithm that has become the de facto world standard in logic function minimization incorporated in the Espresso logic minimizer.
3. Petrick’s Method is a technique for determining all minimum SOP solutions from a prime implicant chart.