08-LogicSimplification

16
2/7/2012 1 Logic Simplification Logic Simplification Simplification Using Boolean Algebra Simplification Using Boolean Algebra A simplified Boolean expression uses the fewest A simplified Boolean expression uses the fewest gates possible to implement a given expression. gates possible to implement a given expression. A B C AB+A(B+C)+B(B+C) Simplification Using Boolean Algebra Simplification Using Boolean Algebra AB+A(B+C)+B(B+C) AB+A(B+C)+B(B+C) (distributive law) (distributive law) AB+AB+AC+BB+BC AB+AB+AC+BB+BC (rule 7; BB=B) (rule 7; BB=B) AB+AB+AC+ AB+AB+AC+B+BC +BC (rule 5; AB+AB=AB) (rule 5; AB+AB=AB) AB AB+AC+B+BC +AC+B+BC (rule 10; B+BC=B) (rule 10; B+BC=B) AB+AC+ AB+AC+B (rule 10; AB+B=B) (rule 10; AB+B=B) B+AC +AC A B C B+AC A B C AB+A(B+C)+B(B+C) Simplification Using Boolean Algebra Simplification Using Boolean Algebra Try these: Try these: C B A AC AB ABC C B A C B A C B A BC A C B A BD C B A ] ) ( [ 8

description

Logic Simplification

Transcript of 08-LogicSimplification

Page 1: 08-LogicSimplification

2/7/2012

1

Logic SimplificationLogic Simplification

Simplification Using Boolean AlgebraSimplification Using Boolean Algebra

A simplified Boolean expression uses the fewest A simplified Boolean expression uses the fewest gates possible to implement a given expression.gates possible to implement a given expression.

A

B

C

AB+A(B+C)+B(B+C)

Simplification Using Boolean AlgebraSimplification Using Boolean Algebra

AB+A(B+C)+B(B+C)AB+A(B+C)+B(B+C)

(distributive law)(distributive law)

AB+AB+AC+BB+BCAB+AB+AC+BB+BC

(rule 7; BB=B)(rule 7; BB=B)

AB+AB+AC+AB+AB+AC+BB+BC+BC

(rule 5; AB+AB=AB)(rule 5; AB+AB=AB)

ABAB+AC+B+BC+AC+B+BC

(rule 10; B+BC=B)(rule 10; B+BC=B)

AB+AC+AB+AC+BB

(rule 10; AB+B=B)(rule 10; AB+B=B)

BB+AC+AC

A

B

C

B+AC

A

BC AB+A(B+C)+B(B+C)

Simplification Using Boolean AlgebraSimplification Using Boolean Algebra

Try these:Try these:

CBAACAB

ABCCBACBACBABCA

CBABDCBA

])([

8

Page 2: 08-LogicSimplification

2/7/2012

2

Standard Forms of Boolean ExpressionsStandard Forms of Boolean Expressions

All Boolean expressions, regardless of their All Boolean expressions, regardless of their form, can be converted into either of two form, can be converted into either of two standard forms:standard forms:

The sumThe sum--ofof--products (SOP) formproducts (SOP) form

The productThe product--ofof--sums (POS) formsums (POS) form

Standardization makes the evaluation, Standardization makes the evaluation, simplification, and implementation of Boolean simplification, and implementation of Boolean expressions much more systematic and easier.expressions much more systematic and easier.

SumSum--ofof--Products (SOP)Products (SOP)

The SumThe Sum--ofof--Products (SOP) FormProducts (SOP) Form

An SOP expression An SOP expression when two or more when two or more product terms are product terms are summed by Boolean summed by Boolean addition.addition.

Examples:Examples:

Also:Also:ACCBABA

DCBCDEABC

ABCAB

DBCCBAA

In an SOP form, a In an SOP form, a single overbar cannot single overbar cannot extend over more than extend over more than one variable; however, one variable; however, more than one variable more than one variable in a termin a term can have an can have an overbar:overbar:

example: is OK!example: is OK!

But notBut not::

CBA

ABC

Implementation of an SOPImplementation of an SOP

AND/OR implementationAND/OR implementation NAND/NAND implementationNAND/NAND implementation

X=AB+BCD+AC

A

B

BCD

A

C

X

A

B

BCD

A

C

X

Page 3: 08-LogicSimplification

2/7/2012

3

CBCACBACBACBA

BDBCBBADACABDCBBA

BEFBCDABEFCDBAB

ACDABCDBA

)()()(

))((

)(

)(

General Expression General Expression SOPSOP

Any logic expression can be changed into SOP form Any logic expression can be changed into SOP form by applying Boolean algebra techniques.by applying Boolean algebra techniques.

ex: ex:

The Standard SOP FormThe Standard SOP Form

A standard SOP expression is one in which A standard SOP expression is one in which all all the the variables in the variables in the domaindomain appear appear in each product termin each product termin the expression.in the expression.

Example: Example:

Standard SOP expressions are important in: Standard SOP expressions are important in:

Constructing truth tablesConstructing truth tables

The Karnaugh map simplification methodThe Karnaugh map simplification method

DCABDCBACDBA

Converting Product Terms to Converting Product Terms to Standard SOPStandard SOP

Step 1:Step 1: Multiply each nonstandard product term by a Multiply each nonstandard product term by a term made up of the sum of a missing variable and its term made up of the sum of a missing variable and its complement. This results in two product terms. complement. This results in two product terms. As you know, you can multiply anything by 1 without As you know, you can multiply anything by 1 without

changing its value.changing its value.

Step 2:Step 2: Repeat step 1 until all resulting product term Repeat step 1 until all resulting product term contains all variables in the domain in either contains all variables in the domain in either complemented or uncomplemented form. In complemented or uncomplemented form. In converting a product term to standard form, the converting a product term to standard form, the number of product terms is doubled for each missing number of product terms is doubled for each missing variable.variable.

Converting Product Terms to Converting Product Terms to Standard SOP (example)Standard SOP (example)

Convert the following Boolean expression into Convert the following Boolean expression into standard SOP form:standard SOP form:

DCABBACBA

DCABDCBADCBADCBACDBADCBACDBADCABBACBA

DCBADCBADCBACDBADDCBADDCBA

CBACBACCBABA

DCBACDBADDCBACBA

)()(

)(

)(

8

Page 4: 08-LogicSimplification

2/7/2012

4

Binary Representation of a Standard Binary Representation of a Standard Product TermProduct Term

A standard product term is equal to 1 for only one A standard product term is equal to 1 for only one combination of variable values.combination of variable values.

Example: is equal to 1 when A=1, B=0, C=1, Example: is equal to 1 when A=1, B=0, C=1, and D=0 as shown belowand D=0 as shown below

And this term is 0 for all other combinations of values for And this term is 0 for all other combinations of values for the variables.the variables.

111110101 DCBA

DCBA

ProductProduct--ofof--Sums (POS)Sums (POS)

The ProductThe Product--ofof--Sums (POS) FormSums (POS) Form

When two or more sum When two or more sum terms are multiplied, the terms are multiplied, the result expression is a result expression is a productproduct--ofof--sums (POS):sums (POS):

Examples:Examples:

Also:Also:

In a POS form, a single In a POS form, a single overbar cannot extend overbar cannot extend over more than one over more than one variable; however, more variable; however, more than one variable than one variable in a in a termterm can have an can have an overbar:overbar:

example: is OK!example: is OK!

But notBut not::

CBA

CBA

))()((

))()((

))((

CACBABA

DCBEDCCBA

CBABA

))(( DCBCBAA

Implementation of a POSImplementation of a POS

OR/AND implementationOR/AND implementation

X=(A+B)(B+C+D)(A+C)

A

B

BCD

A

C

X

Page 5: 08-LogicSimplification

2/7/2012

5

The Standard POS FormThe Standard POS Form

A standard POS expression is one in which A standard POS expression is one in which all all the the variables in the domain appear variables in the domain appear in each sum termin each sum term in in the expression.the expression.

Example: Example:

Standard POS expressions are important in: Standard POS expressions are important in:

Constructing truth tablesConstructing truth tables

The Karnaugh map simplification methodThe Karnaugh map simplification method

))()(( DCBADCBADCBA

Converting a Sum Term to Standard Converting a Sum Term to Standard POSPOS

Step 1:Step 1: Add to each nonstandard product term a Add to each nonstandard product term a term made up of the product of the missing term made up of the product of the missing variable and its complement. This results in two variable and its complement. This results in two sum terms.sum terms. As you know, you can add 0 to anything without As you know, you can add 0 to anything without

changing its value.changing its value.

Step 2:Step 2: Apply rule 12 Apply rule 12 A+BC=(A+B)(A+C)A+BC=(A+B)(A+C)..

Step 3:Step 3: Repeat step 1 until all resulting sum Repeat step 1 until all resulting sum terms contain all variable in the domain in either terms contain all variable in the domain in either complemented or uncomplemented form.complemented or uncomplemented form.

Converting a Sum Term to Standard Converting a Sum Term to Standard POS (example)POS (example)

Convert the following Boolean expression into Convert the following Boolean expression into standard POS form:standard POS form:

))()(( DCBADCBCBA

))()()()((

))()((

))((

))((

DCBADCBADCBADCBADCBA

DCBADCBCBA

DCBADCBAAADCBDCB

DCBADCBADDCBACBA

Binary Representation of a Standard Binary Representation of a Standard Sum TermSum Term

A standard sum term is equal to 0 for only one A standard sum term is equal to 0 for only one combination of variable values.combination of variable values.

Example: is equal to 0 when A=0, B=1, C=0, Example: is equal to 0 when A=0, B=1, C=0, and D=1 as shown belowand D=1 as shown below

And this term is 1 for all other combinations of values for And this term is 1 for all other combinations of values for the variables.the variables.

000001010 DCBA

DCBA

Page 6: 08-LogicSimplification

2/7/2012

6

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 in a given The binary values of the product terms in a given standard SOP expression are not present in the standard SOP expression are not present in the equivalent standard POS expression.equivalent standard POS expression.

The binary values that The binary values that are notare not represented in the represented in the SOP expression are present in the equivalent POS SOP expression are 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 POS.Convert from standard SOP to standard POS.

How?How? Step 1:Step 1: Evaluate each product term in the SOP Evaluate each product term in the SOP

expression. That is, determine the binary numbers expression. That is, determine the binary numbers that represent the product terms.that represent the product terms.

Step 2:Step 2: Determine all of the binary numbers not Determine all of the binary numbers not included in the evaluation in Step 1.included in the evaluation in Step 1.

Step 3:Step 3: Write the equivalent sum term for each Write the equivalent sum term for each binary number from Step 2 and express in POS binary number from Step 2 and express in POS form.form.

Converting Standard SOP to Converting Standard SOP to Standard POS (example)Standard POS (example)

Convert the SOP expression to an equivalent POS Convert the SOP expression to an equivalent POS expression:expression:

The evaluation is as follows:The evaluation is as follows:

There are 8 possible combinations. The SOP expression There are 8 possible combinations. The SOP expression contains five of these, so the POS must contain the other 3 contains five of these, so the POS must contain the other 3 which are: 001, 100, and 110.which are: 001, 100, and 110.

))()((

111101011010000

CBACBACBA

ABCCBABCACBACBA

Page 7: 08-LogicSimplification

2/7/2012

7

Boolean Expressions & Truth TablesBoolean Expressions & Truth Tables

All All standard Boolean expressionstandard Boolean expression can be easily can be easily converted into truth table format using binary converted into truth table format using binary values for each term in the expression.values for each term in the expression.

Also, Also, standard SOP or POSstandard SOP or POS expression can be expression can be determined from the truth table. determined from the truth table.

Converting SOP Expressions to Converting SOP Expressions to Truth Table FormatTruth Table Format

Recall the fact:Recall the fact:

An SOP expression is equal to 1 only if at least one of the An SOP expression is equal to 1 only if at least one of the product term is equal to 1.product term is equal to 1.

Constructing a truth table:Constructing a truth table:

Step 1:Step 1: List all possible combinations of binary values of the List all possible combinations of binary values of the variables in the expression.variables in the expression.

Step 2:Step 2: Convert the SOP expression to standard form if it is Convert the SOP expression to standard form if it is not already.not already.

Step 3:Step 3: Place a 1 in the output column (X) for each binary Place a 1 in the output column (X) for each binary value that makes the value that makes the standard SOPstandard SOP expression a 1 and place 0 expression a 1 and place 0 for all the remaining binary values. for all the remaining binary values.

Converting SOP Expressions to Converting SOP Expressions to Truth Table Format (example)Truth Table Format (example)

Develop a truth table for Develop a truth table for the standard SOP the 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 Expressions to Converting POS Expressions to Truth Table FormatTruth Table Format

Recall the fact:Recall the fact:

A POS expression is equal to 0 only if at least one of the A POS expression is equal to 0 only if at least one of the product term is equal to 0.product term is equal to 0.

Constructing a truth table:Constructing a truth table:

Step 1:Step 1: List all possible combinations of binary values of the List all possible combinations of binary values of the variables in the expression.variables in the expression.

Step 2:Step 2: Convert the POS expression to standard form if it is Convert the POS expression to standard form if it is not already.not already.

Step 3:Step 3: Place a 0 in the output column (X) for each binary Place a 0 in the output column (X) for each binary value that makes the value that makes the standard POSstandard POS expression a 0 and place 1 expression a 0 and place 1 for all the remaining binary values. for all the remaining binary values.

Page 8: 08-LogicSimplification

2/7/2012

8

Converting POS Expressions to Converting POS Expressions to Truth Table Format (example)Truth Table Format (example)

Develop a truth table for Develop a truth table for the standard SOP the 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 Expression Determining Standard Expression from a Truth Tablefrom a Truth Table

To determine the standard To determine the standard SOP expressionSOP expressionrepresented by a truth table.represented by a truth table.

Instructions:Instructions:

Step 1:Step 1: List the binary values of the input variables for List the binary values of the input variables for which the output is 1.which the output is 1.

Step 2:Step 2: Convert each binary value to the corresponding Convert each binary value to the corresponding product term by replacing:product term by replacing: each 1 with the corresponding variable, and each 1 with the corresponding variable, and

each 0 with the corresponding variable complement.each 0 with the corresponding variable complement.

Example: 1010 Example: 1010 DCBA

Determining Standard Expression Determining Standard Expression from a Truth Tablefrom a Truth Table

To determine the standard To determine the standard POS expressionPOS expressionrepresented by a truth table.represented by a truth table.

Instructions:Instructions:

Step 1:Step 1: List the binary values of the input variables for List the binary values of the input variables for which the output is 0.which the output is 0.

Step 2:Step 2: Convert each binary value to the corresponding Convert each binary value to the corresponding product term by replacing:product term by replacing: each 1 with the corresponding variable complement, and each 1 with the corresponding variable complement, and

each 0 with the corresponding variable.each 0 with the corresponding variable.

Example: 1001 Example: 1001 DCBA

POSSOP

Determining Standard Expression Determining Standard Expression from a Truth Table (example)from a Truth 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 1sfour 1s in in the output and the the output and the corresponding corresponding binary value are 011, binary value are 011, 100, 110, and 111.100, 110, and 111.

ABC

CAB

CBA

BCA

111

110

100

011

There are There are four 0sfour 0s in in the output and the the output and the corresponding corresponding binary value are 000, binary value are 000, 001, 010, and 101.001, 010, and 101.

CBA

CBA

CBA

CBA

101

010

001

000

ABCCABCBABCAX

))()()(( CBACBACBACBAX

Page 9: 08-LogicSimplification

2/7/2012

9

The Karnaugh MapThe Karnaugh Map

The Karnaugh MapThe Karnaugh Map

Feel a little difficult using Boolean algebra laws, Feel a little difficult using Boolean algebra laws, rules, and theorems to simplify logic?rules, and theorems to simplify logic?

A KA K--map provides a systematic method for map provides a systematic method for simplifying Boolean expressions and, if properly simplifying Boolean expressions and, if properly used, will produce the simplest SOP or POS used, will produce the simplest SOP or POS expression possible, known as the expression possible, known as the minimum minimum expressionexpression..

What is KWhat is K--MapMap

It’s similar to truth table; instead of being organized It’s similar to truth table; instead of being organized (i/p and o/p) into columns and rows, the K(i/p and o/p) into columns and rows, the K--map is an map is an array of cells in which each cell represents a binary array of cells in which each cell represents a binary value of the input variables.value of the input variables.

The cells are arranged in a way so that simplification of The cells are arranged in a way so that simplification of a given expression is simply a matter of properly a given expression is simply a matter of properly grouping the cells.grouping the cells.

KK--maps can be used for expressions with 2, 3, 4, and 5 maps can be used for expressions with 2, 3, 4, and 5 variables.variables.

3 and 4 variables will be discussed to illustrate the principles.3 and 4 variables will be discussed to illustrate the principles.

The 3 Variable KThe 3 Variable K--MapMap

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

Page 10: 08-LogicSimplification

2/7/2012

10

The 4The 4--Variable KVariable K--MapMap

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

CDCD

ABAB0000 0101 1111 1010

0000

0101

1111

1010

Cell AdjacencyCell Adjacency

KK--Map SOP MinimizationMap SOP Minimization

The KThe K--Map is used for simplifying Boolean Map is used for simplifying Boolean expressions to their minimal form.expressions to their minimal form.

A minimized SOP expression contains the A minimized SOP expression contains the fewest possible terms with fewest possible fewest possible terms with fewest possible variables per term.variables per term.

Generally, a minimum SOP expression can be Generally, a minimum SOP expression can be implemented with fewer logic gates than a implemented with fewer logic gates than a standard expression.standard expression.

Mapping a Standard SOP ExpressionMapping a Standard SOP Expression

For an SOP expression For an SOP expression in standard form:in standard form: A 1 is placed on the KA 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 cell Each 1 is placed in a cell corresponding to the corresponding to the value of a product term.value of a product term.

Example: for the product Example: for the product term , a 1 goes in the term , a 1 goes in the 101 cell on a 3101 cell on a 3--variable variable map.map.

CC

ABAB00 11

0000

0101

1111

1010

CBA CBA

CBA BCA

CAB ABC

CBA CBACBA

1

Page 11: 08-LogicSimplification

2/7/2012

11

CC

ABAB00 11

0000

0101

1111

1010

Mapping a Standard SOP Expression Mapping a Standard SOP Expression (full example)(full example)

The expression: The expression:

CBACABCBACBA

000 001 110 100

1 1

1

1DCBADCBADCABABCDDCABDCBACDBA

CBACBABCA

ABCCABCBACBA

Practice:

Mapping a Nonstandard SOP Mapping a Nonstandard SOP ExpressionExpression

A Boolean expression must be in standard form A Boolean expression must be in standard form before you use a Kbefore you use a K--map.map.

If one is not in standard form, it must be converted.If one is not in standard form, it must be converted.

You may use the procedure mentioned You may use the procedure mentioned earlierearlier or or use numerical expansion.use numerical expansion.

Mapping a Nonstandard SOP Mapping a Nonstandard SOP ExpressionExpression

Numerical Expansion of a Nonstandard product termNumerical Expansion of a Nonstandard product term

Assume that one of the product terms in a certain 3Assume that one of the product terms in a certain 3--variable variable SOP expression is .SOP expression is .

It can be expanded numerically to standard form as follows:It can be expanded numerically to standard form as follows: Step 1:Step 1: Write the binary value of the two variables and attach a 0 for Write the binary value of the two variables and attach a 0 for

the missing variable : 100.the missing variable : 100.

Step 2:Step 2: Write the binary value of the two variables and attach a 1 for Write the binary value of the two variables and attach a 1 for the missing variable : 101. the missing variable : 101.

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 a 3If the assumption that one of the product term in a 3--variable expression is B. variable expression is B. How can we do this? How can we do this?

C

BA

C

CBA CBA

Mapping a Nonstandard SOP Mapping a Nonstandard SOP ExpressionExpression

Map the following SOP expressions on KMap the following SOP expressions on K--maps:maps:

DBCADACDCA

CDBADCBADCBACABBACB

CABC

CABBAA

Page 12: 08-LogicSimplification

2/7/2012

12

KK--Map Simplification of SOP Map Simplification of SOP ExpressionsExpressions

After an SOP expression has been mapped, we After an SOP expression has been mapped, we can do the process of can do the process of minimization:minimization:

Grouping the 1sGrouping the 1s

Determining the minimum SOP expression from the Determining the minimum SOP expression from the mapmap

Grouping the 1sGrouping the 1s

You can group 1s on the KYou can group 1s on the K--map according to map according to the following rules by enclosing those adjacent the following rules by enclosing those adjacent cells containing 1s.cells containing 1s.

The goalThe goal is to maximize the size of the groups is to maximize the size of the groups and to minimize the number of groups.and to minimize the number of groups.

Grouping the 1s (rules)Grouping the 1s (rules)

1.1. A group must contain either 1,2,4,8,or 16 cells A group must contain either 1,2,4,8,or 16 cells (depending on number of variables in the expression)(depending on number of variables in the expression)

2.2. Each cell in a group must be adjacent to one or more Each cell in a group must be adjacent to one or more cells in that same group, but all cells in the group do cells in that same group, but all cells in the group do not have to be adjacent to each other.not have to be adjacent to each other.

3.3. Always include the largest possible number of 1s in a Always include the largest possible number of 1s in a group in accordance with rule 1.group in accordance with rule 1.

4.4. Each 1 on the map must be included in at least one Each 1 on the map must be included in at least one group. The 1s already in a group can be included in group. The 1s already in a group can be included in another group as long as the overlapping groups another group as long as the overlapping groups include noncommon 1s.include noncommon 1s.

Grouping the 1s (example)Grouping the 1s (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

Page 13: 08-LogicSimplification

2/7/2012

13

Grouping the 1s (example)Grouping the 1s (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 SOP Determining the Minimum SOP Expression from the MapExpression from the Map

The following rules are applied to find the The following rules are applied to find the minimum product terms and the minimum minimum product terms and the minimum SOP expression:SOP expression:

1.1. Group the cells that have 1s. Each group of cell Group the cells that have 1s. Each group of cell containing 1s creates one product term composed containing 1s creates one product term composed of all variables that occur in only one form (either of all variables that occur in only one form (either complemented or complemented) within the complemented or complemented) within the group. Variables that occur both complemented group. Variables that occur both complemented and uncomplemented within the group are and uncomplemented within the group are eliminated eliminated called called contradictory variablescontradictory variables..

Determining the Minimum SOP Determining the Minimum SOP Expression from the MapExpression from the Map

2.2. Determine the minimum product term for each Determine the minimum product term for each group.group. For a 3For a 3--variable map:variable map:

1.1. A 1A 1--cell group yields a 3cell group yields a 3--variable product termvariable product term

2.2. A 2A 2--cell group yields a 2cell group yields a 2--variable product termvariable product term

3.3. A 4A 4--cell group yields a 1cell group yields a 1--variable product termvariable product term

4.4. An 8An 8--cell group yields a value of 1 for the expression.cell group yields a value of 1 for the expression.

For a 4For a 4--variable map:variable map:1.1. A 1A 1--cell group yields a 4cell group yields a 4--variable product termvariable product term

2.2. A 2A 2--cell group yields a 3cell group yields a 3--variable product termvariable product term

3.3. A 4A 4--cell group yields a 2cell group yields a 2--variable product termvariable product term

4.4. An 8An 8--cell group yields a a 1cell group yields a a 1--variable product termvariable product term

5.5. A 16A 16--cell group yields a value of 1 for the expression.cell group yields a value of 1 for the expression.

Determining the Minimum SOP Determining the Minimum SOP Expression from the MapExpression from the Map

3.3. When all the minimum product terms are derived When all the minimum product terms are derived from the Kfrom the K--map, they are summed to form the map, they are summed to form the minimum SOP expression.minimum SOP expression.

Page 14: 08-LogicSimplification

2/7/2012

14

Determining the Minimum SOP Determining the Minimum SOP Expression from the Map (example)Expression from the 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 SOP Determining the Minimum SOP Expression from the Map (exercises)Expression from the 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 SOP Determining the Minimum SOP Expression from the Map (exercises)Expression from the 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 KPracticing K--Map (SOP)Map (SOP)

DCBADABCDBCADCBA

CDBACDBADCABDCBADCB

CBACBACBABCACBA

CAB

CBD

Page 15: 08-LogicSimplification

2/7/2012

15

Mapping Directly from a Truth Mapping Directly from a Truth TableTable

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

“Don’t Care” Conditions“Don’t Care” Conditions

Sometimes a situation arises in which some input Sometimes a situation arises in which some input variable combinations are not allowed, i.e. BCD code:variable combinations are not allowed, i.e. BCD code:

There are six invalid combinations: 1010, 1011, 1100, 1101, There are six invalid combinations: 1010, 1011, 1100, 1101, 1110, and 1111.1110, and 1111.

Since these unallowed states will never occur in an Since these unallowed states will never occur in an application involving the BCD code application involving the BCD code they can be they can be treated as “don’t care” terms with respect to their effect treated as “don’t care” terms with respect to their effect on the output.on the output.

The “don’t care” terms can be used to advantage on the The “don’t care” terms can be used to advantage on the KK--map (how? see the next slide).map (how? see the next slide).

“Don’t Care” Conditions“Don’t Care” Conditions

INPUTSINPUTS O/PO/P

AA BB CC DD YY

00 00 00 00 0

00 00 00 11 0

00 00 11 00 0

00 00 11 11 0

00 11 00 00 0

00 11 00 11 0

00 11 11 00 0

00 11 11 11 1

11 00 00 00 1

11 00 00 11 1

11 00 11 00 X

11 00 11 11 X

11 11 00 00 X

11 11 00 11 X

11 11 11 00 X

11 11 11 11 X

CDCD

ABAB0000 0101 1111 1010

0000

0101 11

1111 xx xx xx xx

1010 11 11 xx xx

BCDACBAY Without “don’t care”

BCDAY With “don’t care”

KK--Map POS MinimizationMap POS Minimization

The approaches are much the same (as SOP) The approaches are much the same (as SOP) except that with POS expression, 0s except that with POS expression, 0s representing the standard sum terms are placed representing the standard sum terms are placed on the Kon the K--map instead of 1s.map instead of 1s.

Page 16: 08-LogicSimplification

2/7/2012

16

CC

ABAB00 11

0000

0101

1111

1010

Mapping a Standard POS Expression Mapping a Standard POS Expression (full example)(full example)

The expression: The expression:

))()()(( CBACBACBACBA

000 010 110 101

0

0

0

0

KK--map Simplification of POS map Simplification of POS ExpressionExpression

))()()()(( CBACBACBACBACBA

CC

ABAB00 11

0000

0101

1111

1010 BA

0 0

0 0

0 AC

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. 7