Upload
sharon-ross
View
219
Download
0
Embed Size (px)
Citation preview
Sum-of-Products (SOP)Sum-of-Products (SOP)
The Sum-of-Products (SOP) The Sum-of-Products (SOP) FormForm
An SOP expression An SOP expression when two or when two or more product more product terms are summed terms are summed by Boolean by Boolean addition.addition. Examples:Examples:
Also:Also:
ACCBABA
DCBCDEABC
ABCAB
DBCCBAA
In an SOP form, a In an SOP form, a single overbar single overbar cannot extend over cannot extend over more than one more than one variable; however, variable; however, more than one more than one variable variable in a termin a term can have an overbar:can have an overbar: example: is example: is
OK!OK!
But notBut not::
CBA
ABC
CBCACBACBACBA
BDBCBBADACABDCBBA
BEFBCDABEFCDBAB
ACDABCDBA
)()()(
))((
)(
)(
SOP SOP General General ExpressionExpression
Any logic expression can be changed into Any logic expression can be changed into SOP form by applying Boolean algebra SOP form by applying Boolean algebra techniques.techniques.
ex: ex:
The Standard SOP FormThe Standard SOP Form
A standard SOP expression is one in A standard SOP expression is one in which which all all the variables in the domain the variables in the domain appear appear in each product termin each product term in the in the expression.expression. Example: Example:
Standard SOP expressions are important Standard SOP expressions are important in: in: Constructing truth tablesConstructing truth tables The Karnaugh map simplification methodThe Karnaugh map simplification method
DCABDCBACDBA
Converting Product Terms Converting Product Terms to Standard SOPto Standard SOP
Step 1:Step 1: Multiply each nonstandard product Multiply each nonstandard product term by a term made up of the sum of a term by a term made up of the sum of a missing variable and its complement. This missing variable and its complement. This results in two product terms. results in two product terms. As you know, you can multiply anything by 1 As you know, you can multiply anything by 1
without changing its value.without changing its value. Step 2:Step 2: Repeat step 1 until all resulting Repeat step 1 until all resulting
product term contains all variables in the product term contains all variables in the domain in either complemented or domain in either complemented or uncomplemented form. In converting a uncomplemented form. In converting a product term to standard form, the number of product term to standard form, the number of product terms is doubled for each missing product terms is doubled for each missing variable.variable.
Converting Product Terms Converting Product Terms to Standard SOP (example)to Standard SOP (example)
Convert the following Boolean expression Convert the following Boolean expression into standard SOP form:into standard SOP form:
DCABBACBA
DCABDCBADCBADCBACDBADCBACDBADCABBACBA
DCBADCBADCBACDBADDCBADDCBA
CBACBACCBABA
DCBACDBADDCBACBA
)()(
)(
)(
Binary Representation of a Binary Representation of a Standard Product TermStandard Product Term
A standard product term is equal to 1 A standard product term is equal to 1 for only one combination of variable for only one combination of variable values.values. Example: is equal to 1 when A=1, Example: is equal to 1 when A=1,
B=0, C=1, and D=0 as shown belowB=0, C=1, and D=0 as shown below
And this term is 0 for all other combinations And this term is 0 for all other combinations of values for the variables.of values for the variables.
111110101 DCBA
DCBA
Product-of-Sums (POS)Product-of-Sums (POS)
The Product-of-Sums (POS) The Product-of-Sums (POS) FormForm
When two or more When two or more sum terms are sum terms are multiplied, the multiplied, the result expression is result expression is a product-of-sums a product-of-sums (POS):(POS): Examples:Examples:
Also:Also:
In a POS form, a In a POS form, a single overbar single overbar cannot extend over cannot extend over more than one more than one variable; however, variable; however, more than one more than one variable variable in a termin a term can have an overbar:can have an overbar: example: is example: is
OK!OK!
But notBut not::
CBA
CBA
))()((
))()((
))((
CACBABA
DCBEDCCBA
CBABA
))(( DCBCBAA
The Standard POS FormThe Standard POS Form
A standard POS expression is one in A standard POS expression is one in which which all all the variables in the domain the variables in the domain appear appear in each sum termin each sum term in the in the expression.expression. Example: Example:
Standard POS expressions are important Standard POS expressions are important in: in: Constructing truth tablesConstructing truth tables The Karnaugh map simplification methodThe Karnaugh map simplification method
))()(( DCBADCBADCBA
Converting a Sum Term to Converting a Sum Term to Standard POSStandard POS
Step 1:Step 1: Add to each nonstandard product Add to each nonstandard product term a term made up of the product of term a term made up of the product of the missing variable and its complement. the missing variable and its complement. This results in two sum terms.This results in two sum terms. As you know, you can add 0 to anything As you know, you can add 0 to anything
without changing its value.without changing its value. Step 2:Step 2: Apply rule 12 Apply rule 12 A+BC=(A+B) A+BC=(A+B)
(A+C).(A+C). Step 3:Step 3: Repeat step 1 until all resulting Repeat step 1 until all resulting
sum terms contain all variable in the sum terms contain all variable in the domain in either complemented or domain in either complemented or uncomplemented form.uncomplemented form.
Converting a Sum Term to Converting a Sum Term to Standard POS (example)Standard POS (example)
Convert the following Boolean expression Convert the following Boolean expression into standard POS form:into standard POS form:
))()(( DCBADCBCBA
))()()()((
))()((
))((
))((
DCBADCBADCBADCBADCBA
DCBADCBCBA
DCBADCBAAADCBDCB
DCBADCBADDCBACBA
Binary Representation of a Binary Representation of a Standard Sum TermStandard Sum Term
A standard sum term is equal to 0 for A standard sum term is equal to 0 for only one combination of variable values.only one combination of variable values. Example: is equal to 0 when A=0, Example: is equal to 0 when A=0,
B=1, C=0, and D=1 as shown belowB=1, C=0, and D=1 as shown below
And this term is 1 for all other combinations And this term is 1 for all other combinations of values for the variables.of values for the variables.
000001010 DCBA
DCBA
SOP/POSSOP/POS
Converting Standard SOP to Converting Standard SOP to Standard POSStandard POS
The Facts:The Facts: The binary values of the product terms The binary values of the product terms
in a given standard SOP expression are in a given standard SOP expression are not present in the equivalent standard not present in the equivalent standard POS expression.POS expression.
The binary values that The binary values that are notare not represented in the SOP expression are represented in the SOP expression are present in the equivalent POS present in the equivalent POS expression.expression.
Converting Standard SOP to Converting Standard SOP to Standard POSStandard POS
What can you use the facts?What can you use the facts? Convert from standard SOP to standard Convert from standard SOP to standard
POS.POS. How?How?
Step 1:Step 1: Evaluate each product term in the Evaluate each product term in the SOP expression. That is, determine the SOP expression. That is, determine the binary numbers that represent the product binary numbers that represent the product terms.terms.
Step 2:Step 2: Determine all of the binary numbers Determine all of the binary numbers not included in the evaluation in Step 1.not included in the evaluation in Step 1.
Step 3:Step 3: Write the equivalent sum term for Write the equivalent sum term for each binary number from Step 2 and each binary number from Step 2 and express in POS form.express in POS form.
Converting Standard SOP to Converting Standard SOP to Standard POS (example)Standard POS (example)
Convert the SOP expression to an Convert the SOP expression to an equivalent POS expression:equivalent POS expression:
The evaluation is as follows:The evaluation is as follows:
There are 8 possible combinations. The SOP There are 8 possible combinations. The SOP expression contains five of these, so the POS expression contains five of these, so the POS must contain the other 3 which are: 001, 100, must contain the other 3 which are: 001, 100, and 110.and 110. ))()((
111101011010000
CBACBACBA
ABCCBABCACBACBA
Boolean Expressions & Boolean Expressions & Truth TablesTruth Tables
All All standard Boolean expressionstandard Boolean expression can can be easily converted into truth table be easily converted into truth table format using binary values for each format using binary values for each term in the expression.term in the expression.
Also, Also, standard SOP or POSstandard SOP or POS expression can be determined from expression can be determined from the truth table. the truth table.
Converting SOP Converting SOP Expressions to Truth Table Expressions to Truth Table
FormatFormat Recall the fact:Recall the fact:
An SOP expression is equal to 1 only if at least An SOP expression is equal to 1 only if at least one of the product term is equal to 1.one of the product term is equal to 1.
Constructing a truth table:Constructing a truth table: Step 1:Step 1: List all possible combinations of binary List all possible combinations of binary
values of the variables in the expression.values of the variables in the expression. Step 2:Step 2: Convert the SOP expression to Convert the SOP expression to
standard form if it is not already.standard form if it is not already. Step 3:Step 3: Place a 1 in the output column (X) for Place a 1 in the output column (X) for
each binary value that makes the each binary value that makes the standard SOPstandard SOP expression a 1 and place 0 for all the expression a 1 and place 0 for all the remaining binary values. remaining binary values.
Converting SOP Converting SOP Expressions to Truth Table Expressions to Truth Table
Format (example)Format (example) Develop a truth Develop a truth
table for the table for the standard SOP standard SOP expressionexpression
ABCCBACBA
InputsInputs OutputOutput Product Product TermTermAA BB CC XX
00 00 00
00 00 11
00 11 00
00 11 11
11 00 00
11 00 11
11 11 00
11 11 11
InputsInputs OutputOutput Product Product TermTermAA BB CC XX
00 00 00
00 00 11
00 11 00
00 11 11
11 00 00
11 00 11
11 11 00
11 11 11
CBA
CBA
ABC
InputsInputs OutputOutput Product Product TermTermAA BB CC XX
00 00 00
00 00 11 11
00 11 00
00 11 11
11 00 00 11
11 00 11
11 11 00
11 11 11 11
CBA
CBA
ABC
InputsInputs OutputOutput Product Product TermTermAA BB CC XX
00 00 00 00
00 00 11 11
00 11 00 00
00 11 11 00
11 00 00 11
11 00 11 00
11 11 00 00
11 11 11 11
CBA
CBA
ABC
Converting POS Converting POS Expressions to Truth Table Expressions to Truth Table
FormatFormat Recall the fact:Recall the fact:
A POS expression is equal to 0 only if at least A POS expression is equal to 0 only if at least one of the product term is equal to 0.one of the product term is equal to 0.
Constructing a truth table:Constructing a truth table: Step 1:Step 1: List all possible combinations of binary List all possible combinations of binary
values of the variables in the expression.values of the variables in the expression. Step 2:Step 2: Convert the POS expression to Convert the POS expression to
standard form if it is not already.standard form if it is not already. Step 3:Step 3: Place a 0 in the output column (X) for Place a 0 in the output column (X) for
each binary value that makes the each binary value that makes the standard POSstandard POS expression a 0 and place 1 for all the expression a 0 and place 1 for all the remaining binary values. remaining binary values.
Converting POS Converting POS Expressions to Truth Table Expressions to Truth Table
Format (example)Format (example) Develop a truth Develop a truth
table for the table for the standard SOP standard SOP expressionexpression
))((
))()((
CBACBA
CBACBACBA
InputsInputs OutputOutput Product Product TermTermAA BB CC XX
00 00 00
00 00 11
00 11 00
00 11 11
11 00 00
11 00 11
11 11 00
11 11 11
InputsInputs OutputOutput Product Product TermTermAA BB CC XX
00 00 00
00 00 11
00 11 00
00 11 11
11 00 00
11 00 11
11 11 00
11 11 11
)( CBA
)( CBA
)( CBA
)( CBA
)( CBA
InputsInputs OutputOutput Product Product TermTermAA BB CC XX
00 00 00 00
00 00 11
00 11 00 00
00 11 11 00
11 00 00
11 00 11 00
11 11 00 00
11 11 11
)( CBA
)( CBA
)( CBA
)( CBA
)( CBA
InputsInputs OutputOutput Product Product TermTermAA BB CC XX
00 00 00 00
00 00 11 11
00 11 00 00
00 11 11 00
11 00 00 11
11 00 11 00
11 11 00 00
11 11 11 11
)( CBA
)( CBA
)( CBA
)( CBA
)( CBA
Determining Standard Determining Standard Expression from a Truth Expression from a Truth
TableTable To determine the standard To determine the standard SOP SOP
expressionexpression represented by a truth table. represented by a truth table. Instructions:Instructions:
Step 1:Step 1: List the binary values of the input List the binary values of the input variables for which the output is 1.variables for which the output is 1.
Step 2:Step 2: Convert each binary value to the Convert each binary value to the corresponding product term by replacing:corresponding product term by replacing:
each 1 with the corresponding variable, and each 1 with the corresponding variable, and each 0 with the corresponding variable each 0 with the corresponding variable
complement.complement.
Example: 1010 Example: 1010 DCBA
Determining Standard Determining Standard Expression from a Truth Expression from a Truth
TableTable To determine the standard To determine the standard POS POS
expressionexpression represented by a truth table. represented by a truth table. Instructions:Instructions:
Step 1:Step 1: List the binary values of the input List the binary values of the input variables for which the output is 0.variables for which the output is 0.
Step 2:Step 2: Convert each binary value to the Convert each binary value to the corresponding product term by replacing:corresponding product term by replacing:
each 1 with the corresponding variable each 1 with the corresponding variable complement, and complement, and
each 0 with the corresponding variable.each 0 with the corresponding variable.
Example: 1001 Example: 1001 DCBA
POSSOP
Determining Standard Determining Standard Expression from a Truth Expression from a Truth
Table (example)Table (example)I/PI/P O/PO/P
AA BB CC XX
00 00 00 00
00 00 11 00
00 11 00 00
00 11 11 11
11 00 00 11
11 00 11 00
11 11 00 11
11 11 11 11
There are There are four four 1s1s in the output in the output and the and the corresponding corresponding binary value binary value are 011, 100, are 011, 100, 110, and 111.110, and 111.
ABC
CAB
CBA
BCA
111
110
100
011
There are There are four four 0s0s in the output in the output and the and the corresponding corresponding binary value binary value are 000, 001, are 000, 001, 010, and 101.010, and 101.
CBA
CBA
CBA
CBA
101
010
001
000
ABCCABCBABCAX
))()()(( CBACBACBACBAX
The Karnaugh The Karnaugh MapMap
The Karnaugh MapThe Karnaugh Map
Feel a little difficult using Boolean Feel a little difficult using Boolean algebra laws, rules, and theorems to algebra laws, rules, and theorems to simplify logic?simplify logic?
A K-map provides a systematic A K-map provides a systematic method for simplifying Boolean method for simplifying Boolean expressions and, if properly used, expressions and, if properly used, will produce the simplest SOP or will produce the simplest SOP or POS expression possible, known as POS expression possible, known as the the minimum expressionminimum expression..
The 3 Variable K-MapThe 3 Variable K-Map There are 8 cells as shown:There are 8 cells as shown:
CC
ABAB00 11
0000
0101
1111
1010
CBA CBA
CBA BCA
CAB ABC
CBA CBA
The 4-Variable K-MapThe 4-Variable K-Map
CDCD
ABAB0000 0101 1111 1010
0000
0101
1111
1010 DCBA
DCAB
DCBA
DCBA
DCBA
DCAB
DCBA
DCBA
CDBA
ABCD
BCDA
CDBA
DCBA
DABC
DBCA
DCBA
K-Map SOP MinimizationK-Map SOP Minimization
The K-Map is used for simplifying The K-Map is used for simplifying Boolean expressions to their minimal Boolean expressions to their minimal form.form.
A minimized SOP expression contains A minimized SOP expression contains the fewest possible terms with fewest the fewest possible terms with fewest possible variables per term.possible variables per term.
Generally, a minimum SOP expression Generally, a minimum SOP expression can be implemented with fewer logic can be implemented with fewer logic gates than a standard expression.gates than a standard expression.
Mapping a Standard SOP Mapping a Standard SOP ExpressionExpression
For an SOP For an SOP expression in expression in standard form:standard form: A 1 is placed on the K-A 1 is placed on the K-
map for each product map for each product term in the expression.term in the expression.
Each 1 is placed in a Each 1 is placed in a cell corresponding to cell corresponding to the value of a product the value of a product term.term.
Example: for the Example: for the product term , a 1 product term , a 1 goes in the 101 cell on goes in the 101 cell on a 3-variable map.a 3-variable map.
CC
ABAB00 11
0000
0101
1111
1010
CBA CBA
CBA BCA
CAB ABC
CBA CBACBA
1
CC
ABAB00 11
0000
0101
1111
1010
Mapping a Standard SOP Mapping a Standard SOP Expression (full example)Expression (full example)
The expression: The expression:
CBACABCBACBA 000 001 110 100
1 1
1
1
DCBADCBADCABABCDDCABDCBACDBA
CBACBABCA
ABCCABCBACBA
Practice:
Mapping a Nonstandard Mapping a Nonstandard SOP ExpressionSOP Expression
A Boolean expression must be in A Boolean expression must be in standard form before you use a K-standard form before you use a K-map.map. If one is not in standard form, it must If one is not in standard form, it must
be converted.be converted. You may use the procedure You may use the procedure
mentioned mentioned earlierearlier or use numerical or use numerical expansion.expansion.
Mapping a Nonstandard Mapping a Nonstandard SOP ExpressionSOP Expression
Numerical Expansion of a Nonstandard product Numerical Expansion of a Nonstandard product termterm Assume that one of the product terms in a certain 3-Assume that one of the product terms in a certain 3-
variable SOP expression is .variable SOP expression is . It can be expanded numerically to standard form as It can be expanded numerically to standard form as
follows:follows: Step 1:Step 1: Write the binary value of the two variables and attach Write the binary value of the two variables and attach
a 0 for the missing variable : 100.a 0 for the missing variable : 100. Step 2:Step 2: Write the binary value of the two variables and attach Write the binary value of the two variables and attach
a 1 for the missing variable : 100. a 1 for the missing variable : 100. The two resulting binary numbers are the values of the The two resulting binary numbers are the values of the
standard SOP terms standard SOP terms and . and . If the assumption that one of the product term in If the assumption that one of the product term in
a 3-variable expression is B. How can we do this? a 3-variable expression is B. How can we do this?
C
BA
C
CBA CBA
Mapping a Nonstandard Mapping a Nonstandard SOP ExpressionSOP Expression
Map the following SOP expressions on K-Map the following SOP expressions on K-maps:maps:
DBCADACDCA
CDBADCBADCBACABBACB
CABC
CABBAA
K-Map Simplification of K-Map Simplification of SOP ExpressionsSOP Expressions
After an SOP expression has been After an SOP expression has been mapped, we can do the process of mapped, we can do the process of minimization:minimization: Grouping the 1sGrouping the 1s Determining the minimum SOP Determining the minimum SOP
expression from the mapexpression from the map
Grouping the 1sGrouping the 1s
You can group 1s on the K-map You can group 1s on the K-map according to the following rules by according to the following rules by enclosing those adjacent cells enclosing those adjacent cells containing 1s.containing 1s.
The goalThe goal is to maximize the size of is to maximize the size of the groups and to minimize the the groups and to minimize the number of groups.number of groups.
Grouping the 1s (rules)Grouping the 1s (rules)
1.1. A group must contain either 1,2,4,8,or 16 A group must contain either 1,2,4,8,or 16 cells (depending on number of variables in cells (depending on number of variables in the expression)the expression)
2.2. Each cell in a group must be adjacent to one Each cell in a group must be adjacent to one or more cells in that same group, but all or more cells in that same group, but all cells in the group do not have to be adjacent cells in the group do not have to be adjacent to each other.to each other.
3.3. Always include the largest possible number Always include the largest possible number of 1s in a group in accordance with rule 1.of 1s in a group in accordance with rule 1.
4.4. Each 1 on the map must be included in at Each 1 on the map must be included in at least one group. The 1s already in a group least one group. The 1s already in a group can be included in another group as long as can be included in another group as long as the overlapping groups include noncommon the overlapping groups include noncommon 1s.1s.
Grouping the 1s Grouping the 1s (example)(example)
CC
ABAB 00 11
0000 11
0101 11
1111 11 11
1010
CC
ABAB 00 11
0000 11 11
0101 11
1111 11
1010 11 11
Grouping the 1s Grouping the 1s (example)(example)
CDCD
ABAB 0000 0101 1111 1010
0000 11 11
0101 11 11 11 11
1111
1010 11 11
CDCD
ABAB 0000 0101 1111 1010
0000 11 11
0101 11 11 11
1111 11 11 11
1010 11 11 11
Determining the Minimum Determining the Minimum SOP Expression from the SOP Expression from the
MapMap The following rules are applied to find The following rules are applied to find
the minimum product terms and the the minimum product terms and the minimum SOP expression:minimum SOP expression:
1.1. Group the cells that have 1s. Each group Group the cells that have 1s. Each group of cell containing 1s creates one product of cell containing 1s creates one product term composed of all variables that occur term composed of all variables that occur in only one form (either complemented or in only one form (either complemented or complemented) within the group. complemented) within the group. Variables that occur both complemented Variables that occur both complemented and uncomplemented within the group are and uncomplemented within the group are eliminated eliminated called called contradictory contradictory variablesvariables..
Determining the Minimum Determining the Minimum SOP Expression from the SOP Expression from the
MapMap2.2. Determine the minimum product term for Determine the minimum product term for
each group.each group. For a 3-variable map:For a 3-variable map:
1.1. A 1-cell group yields a 3-variable product termA 1-cell group yields a 3-variable product term2.2. A 2-cell group yields a 2-variable product termA 2-cell group yields a 2-variable product term3.3. A 4-cell group yields a 1-variable product termA 4-cell group yields a 1-variable product term4.4. An 8-cell group yields a value of 1 for the An 8-cell group yields a value of 1 for the
expression.expression. For a 4-variable map:For a 4-variable map:
1.1. A 1-cell group yields a 4-variable product termA 1-cell group yields a 4-variable product term2.2. A 2-cell group yields a 3-variable product termA 2-cell group yields a 3-variable product term3.3. A 4-cell group yields a 2-variable product termA 4-cell group yields a 2-variable product term4.4. An 8-cell group yields a a 1-variable product termAn 8-cell group yields a a 1-variable product term5.5. A 16-cell group yields a value of 1 for the A 16-cell group yields a value of 1 for the
expression.expression.
Determining the Minimum Determining the Minimum SOP Expression from the SOP Expression from the
MapMap3.3. When all the minimum product terms When all the minimum product terms
are derived from the K-map, they are are derived from the K-map, they are summed to form the minimum SOP summed to form the minimum SOP expression.expression.
Determining the Minimum Determining the Minimum SOP Expression from the SOP Expression from the
Map (example)Map (example)
CDCD
ABAB0000 0101 1111 1010
0000 11 11
0101 11 11 11 11
1111 11 11 11 11
1010 11
B
CA
DCA
DCACAB
Determining the Minimum Determining the Minimum SOP Expression from the SOP Expression from the
Map (exercises)Map (exercises)
CBABCAB
CC
ABAB 00 11
0000 11
0101 11
1111 11 11
1010
CC
ABAB 00 11
0000 11 11
0101 11
1111 11
1010 11 11
ACCAB
Determining the Minimum Determining the Minimum SOP Expression from the SOP Expression from the
Map (exercises)Map (exercises)
DBACABA CBCBAD
CDCD
ABAB 0000 0101 1111 1010
0000 11 11
0101 11 11 11 11
1111
1010 11 11
CDCD
ABAB 0000 0101 1111 1010
0000 11 11
0101 11 11 11
1111 11 11 11
1010 11 11 11
Practicing K-Map (SOP)Practicing K-Map (SOP)
DCBADABCDBCADCBA
CDBACDBADCABDCBADCB
CBACBACBABCACBA
CAB
CBD
Mapping Directly from a Mapping Directly from a Truth TableTruth Table
I/PI/P O/PO/P
AA BB CC XX
00 00 00 11
00 00 11 00
00 11 00 00
00 11 11 00
11 00 00 11
11 00 11 00
11 11 00 11
11 11 11 11
CC
ABAB00 11
0000
0101
1111
1010
1
1
1
1
CC
ABAB00 11
0000
0101
1111
1010
Mapping a Standard POS Mapping a Standard POS Expression (full example)Expression (full example)
The expression: The expression:
))()()(( CBACBACBACBA
000 010 110 101
0
0
0
0
K-map Simplification of K-map Simplification of POS ExpressionPOS Expression
))()()()(( CBACBACBACBACBA
CC
ABAB00 11
0000
0101
1111
1010 BA
0 0
0 0
0AC
CB
A
1
11
)( CBA
ACBA
Rules of Boolean AlgebraRules of Boolean Algebra
1.6
.5
1.4
00.3
11.2
0.1
AA
AAA
AA
A
A
AA
BCACABA
BABAA
AABA
AA
AA
AAA
))(.(12
.11
.10
.9
0.8
.7
___________________________________________________________A, B, and C can represent a single variable or a combination of variables.