You are on page 1of 44

Logic Reduction Techniques

• Algebraic Manipulation
– Using identities and theorems of Boolean Algebra

• Graphical
– Karnaugh Map (K-Map)

• Algorithmic
– Quine-McCluskey Method

1

Karnaugh Map
• A systematic and graphical way of simplifying Boolean expressions • May be used for up to 6 variables, but often restricted to 4 or 5 • An array of cells in which each cell represents a Minterm or Maxterm of the given Boolean function • Number of cells is equal to total number of possible input combinations
2

Karnaugh Map Cell Adjacency
• Only a single variable change allowed between adjacent cells • Physically, each cell is adjacent to the cells that are immediately next to it on any of its four sides wrap-around adjacency • Cells in the top row are adjacent to the corresponding cells in the bottom row • Cells in the outer left column are adjacent to the corresponding cells in the outer right column • A cell is not adjacent to the cells that diagonally touch any of its corners 3

Karnaugh Map
• 2 variable K-map
– The value of a given cell is the binary value of A in the left column and the value of B in the top row. A\B 0 0 1

1

0 2

1 3

4

combined with value of C in the top row.Karnaugh Map • 3 variable K-map – The value of a given cell is the binary value of A and B in the left column. AB\C 00 01 0 1 11 10 0 2 6 4 1 3 7 5 5 .

Karnaugh Map • 4-variable K-map – An array of sixteen cells AB CD 00 01 11 10 00 01 11 10 0 4 12 8 1 5 13 9 3 7 15 11 2 6 14 10 6 .

Mapping Standard SOP Expressions • Place a 1 in the K-map for each product term in the expression. in the cell corresponding to the binary value of the product term • Number of 1s in the K-map is equal to number of product terms in the standard SOP 7 .

Mapping Standard SOP Expressions • 3-Variable example: AB C  AB C  AB C AB\C 0 1 00 01 11 10 0 1 1 1 0 0 0 0 8 .

C.D  A.B.C.C.B.B.C.D  A.D  A.D  A.D  A.D  A.Mapping Standard SOP Expressions • 4-Variable example: A.B.D AB\ CD 00 01 11 10 00 01 11 10 0 1 0 1 1 1 1 0 0 0 0 0 0 1 1 0 9 .C.B.B.B.C. C.

Mapping Non-Standard SOP Expressions • Convert non-standard SOP to Standard Form • Follow previous procedure • Draw appropriate variable K-map Shortcut • Mark 1 in all cells where the non-standard product term is present • Mark remaining cells with 0 10 .

Mapping Non-Standard SOP Expressions • Non-standard SOP expression A  BC A\BC 00 01 11 10 0 1 1 1 1 1 A\BC 0 1 1 1 1 00 01 11 10 1 1 11 .

Mapping Non-Standard SOP Expressions • Non-standard SOP expression D  AC  BC AB\CD AB\CD 00 00 01 01 11 11 10 10 00 0 0 1 1 01 1 1 1 1 11 1 1 1 1 10 0 1 1 0 12 .

column. 2.K-Map Simplification of SOP • Form groups of 1s: – – – – – – A group must contain 1. square or rectangular. cells (powers of 2) Groups can be row. Groups of diagonal cells are not allowed Start with the biggest groups Each 1 on the map must be included in at least one group Try to cover each 1 on the map in fewest possible groups • Form product terms: – Each group creates one product term composed of all variables that occur in only one form (original or complemented) within that group – Variables within the group that occur in both original and 13 complemented form are eliminated (contradictory variables) . 4. 8 etc.

C  A.C  B.K-Map Simplification of SOP • Ex 1: AB C  AB C  A B C  ABC  AB C AB\C 00 01 0 1 0 1 1 0 1 0 1 1 11 10 B.C 14 .

C 15 .K-Map Simplification of SOP • Ex 2: AB  ABC  ABC  ABC AB\C 00 01 11 10 0 1 0 1 1 0 0 1 1 1 B  A.

K-Map Simplification of SOP • Ex 3: AB\CD 00 01 11 00 01 11 10 0 0 1 1 0 1 1 1 1 0 1 1 10 1 1 1 0 A.D  B.C  B.C 16 .

C.C 17 .D  C.D  B.K-Map Simplification of SOP • Ex 4: AB\CD 00 01 11 10 00 01 11 10 0 0 1 1 0 0 0 0 1 1 1 1 0 1 1 0 A.

D  A.B.C.K-Map Simplification of SOP • Ex 5: AB\CD 00 01 11 10 00 01 11 10 1 0 0 1 0 0 1 0 1 0 1 1 1 1 0 1 B.C  A.D  B.D 18 .

K-Map Simplification of SOP • Mapping directly from a truth-table Inputs Output Inputs Output A B C D F A B C D F 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 1 0 0 1 0 1 0 1 1 1 1 1 0 0 0 0 1 0 0 1 1 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 1 1 0 1 1 1 0 1 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 1 0 0 19 .

K-Map Simplification of SOP AB\CD 00 01 00 01 11 10 0 0 1 1 1 1 0 0 11 10 0 0 1 0 0 1 0 0 AD  B C D  B CD 20 .

Mapping Standard POS Expressions • Place a 0 in the K-map for each sum term in the expression. in the cell corresponding to the binary value of the sum term • Number of 0s in the K-map is equal to number of sum terms in the standard POS 21 .

Mapping Standard POS Expressions • 3-Variable example: (A  B  C)(A  B  C )(A  B  C )( A  B  C )( A  B  C ) AB\C 0 1 00 01 11 10 0 1 1 1 0 0 0 0 22 .

Mapping Standard POS Expressions • 4-Variable example: (A  B  C  D )(A  B  C  D)( A  B  C  D)( A  B  C  D ) AB\ CD 00 01 11 10 00 01 11 10 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 23 .

Mapping Non-Standard POS Expressions • Convert non-standard POS to Standard Form • Follow previous procedure • Draw appropriate variable K-map Shortcut • Mark 0 in all cells where the non-standard sum term is present • Mark remaining cells with 1 24 .

Mapping Non-Standard POS Expressions • Non-standard POS expression A\BC 00 01 11 10 (A  B) C 0 1 0 0 A\BC 0 1 0 00 01 0 0 11 0 0 25 10 .

Mapping Non-Standard POS Expressions • Non-standard POS expression (A  B  C)( A  C )(C  D) AB\CD 00 01 11 10 00 0 0 0 0 01 1 1 1 0 11 1 1 0 0 10 1 1 0 0 26 .

Groups of diagonal cells are not allowed Start with the biggest groups Each 0 on the map must be included in at least one group Try to cover each 0 on the map in fewest possible groups • Form sum terms: – Each group creates one sum term composed of all variables that occur in only one form (original or complemented) within that group – Variables within the group that occur in both original and 27 complemented form are eliminated (contradictory variables) . column. cells (powers of 2) Groups can be row. 8 etc.K-Map Simplification of POS • Form groups of 0s: – – – – – – A group must contain 1. 4. 2. square or rectangular.

(A  B  C) AB\C 00 01 11 10 0 1 0 1 1 0 1 0 1 1 (B  C)( A  B  C ) 28 .K-Map Simplification of POS • Ex 1: (B  C).

K-Map Simplification of POS • Ex 2: AB\CD 00 01 11 10 00 01 11 10 0 0 1 1 0 0 0 0 1 1 1 1 0 1 1 0 (A  C)( C  D)( B  C  D) 29 .

(A  C  D).(B  C  D) 30 .K-Map Simplification of POS • Ex 3: AB\CD 00 00 01 11 10 0 1 1 0 01 11 10 0 1 1 0 1 1 1 1 1 1 1 0 (A  B  C).

(A  B  D).(A  B  C  D) 31 .(B  C  D).K-Map Simplification of POS • Ex 4: AB\CD 00 00 01 11 10 1 0 1 1 01 11 10 0 1 1 0 1 0 0 1 1 1 0 1 (A  B  C).

SOP and POS Conversion using K-map • Previous POS example: AB\CD 00 00 01 11 10 1 0 1 1 01 11 10 0 1 1 0 1 0 0 1 1 1 0 1 BD  BC  ABC  ABD  ACD 32 .

larger groups yield smaller terms .“Don’t Care” Conditions for K-Map • Some input combinations never occur • Or. the X’s can be treated as 1’s to make larger groups or as 0’s to minimize number of terms for SOP cases • Or opposite for POS cases 33 • Remember. we don’t care if they occur • Outputs corresponding to such inputs are assumed to be don’t care (since they are of no concern) • Don’t care terms can be used to advantage on Kmap by placing an “X” in the cell • When grouping 1’s.

BCD • BCD code use six invalid codes • 1010. 1011.1110.r.1100.t to their effect on the output • Either 1 or 0 may be assigned to the output • It really does not matter 34 .111 • These unallowed states will never occur in the application involving BCD code • These can be treated as “don’t care” terms w.1101.

Don’t Care Conditions for K-Map In BCD Inputs A 0 0 0 0 0 0 0 0 B 0 0 0 0 1 1 1 1 C 0 0 1 1 0 0 1 1 D 0 1 0 1 0 1 0 1 Output F 0 0 0 0 0 0 0 1 Inputs A 1 1 1 1 B 0 0 0 0 C 0 0 1 1 D 0 1 0 1 Output F 1 1 X X 1 1 1 1 1 1 1 1 0 0 1 1 0 1 0 1 X X X X 35 .

Don’t Care Conditions for K-Map AB\CD 00 00 0 01 0 11 0 10 0 01 11 10 0 x 1 0 X 1 1 x x 0 X X AB’C’ + A’BCD 36 .

Don’t Care Conditions for K-Map AB\CD 00 00 0 01 0 11 0 10 0 01 11 10 0 x 1 0 X 1 1 x x 0 X X A + BCD 37 .

Don’t Care Conditions for K-Map Inputs A 0 0 0 0 0 0 0 0 B 0 0 0 0 1 1 1 1 C 0 0 1 1 0 0 1 1 D 0 1 0 1 0 1 0 1 Output F 0 1 0 1 0 1 0 1 Inputs A 1 1 1 1 B 0 0 0 0 C 0 0 1 1 D 0 1 0 1 Output F 0 X 0 X 1 1 1 1 1 1 1 1 0 0 1 1 0 1 0 1 X 1 X X 38 .

Don’t Care Conditions for K-Map AB\C D 00 01 11 00 0 0 x 01 1 1 1 11 1 1 x 10 0 0 x 10 0 x x 0 A.D  BC D 39 .

Don’t Care Conditions for K-Map AB\CD 00 01 11 10 00 0 0 x 0 01 1 1 1 x 11 1 1 x x 10 0 0 x 0 D 40 .

5-Variable Karnaugh Map • Constructed with two 4-variable K-maps on top of each other • Each cell in the top K-map is adjacent to a cell exactly below it in the bottom K-map 41 .

5-Variable Karnaugh Map BC\DE 00 01 11 10 00 01 11 0 4 12 1 5 13 3 7 2 6 BC\DE 00 01 11 10 00 01 11 15 14 A 1 10 10 8 9 11 10 A0 16 20 28 24 17 21 29 25 19 18 23 22 31 30 27 26 42 .

Simplifying 5-Variable K-Map BC\DE 00 01 00 01 11 10 0 1 0 1 A 1 BC\DE 00 01 11 10 0 0 0 1 0 0 0 0 1 0 1 1 11 10 00 01 11 10 A0 1 1 0 0 1 1 0 0 0 0 0 1 0 0 1 1 B C D  AB D  B D E  BD E  A C D E 44 .

Extraneous Terms in Karnaugh Map AB/ CD 00 01 00 0 0 01 1 1 11 0 1 10 0 1 11 10 1 0 1 0 1 1 0 0 ABC* + ACD + A*BC + A*C*D 45 .