Boolean Algebra and Logic Simplification Digital Design Department
Boolean Algebra and Logic Simplification Digital Design Department of Software Development Faculty of Information Technology Islamic University of Gaza Dr. Rebhi Baraka rbaraka@iugaza. edu Digital Design Slide 1
Boolean Operations and Expressions • Addition • Multiplication 0+0=0 0+1=1 1+0=1 1+1=1 0*0=0 0*1=0 1*0=0 1*1 =1 Digital Design Slide 2
Laws of Boolean Algebra • • • Commutative Laws Associative Laws Distributive Law Digital Design Slide 3
Laws of Boolean Algebra • Commutative Law of Addition: A+B=B+A Digital Design Slide 4
Laws of Boolean Algebra • Commutative Law of Multiplication: A*B=B*A Digital Design Slide 5
Laws of Boolean Algebra • Associative Law of Addition: A + (B + C) = (A + B) + C Digital Design Slide 6
Laws of Boolean Algebra • Associative Law of Multiplication: A * (B * C) = (A * B) * C Digital Design Slide 7
Laws of Boolean Algebra • Distributive Law: A(B + C) = AB + AC Digital Design Slide 8
Rules of Boolean Algebra Digital Design Slide 9
Rules of Boolean Algebra • Rule 1 OR Truth Table Digital Design Slide 10
Rules of Boolean Algebra • Rule 2 OR Truth Table Digital Design Slide 11
Rules of Boolean Algebra • Rule 3 AND Truth Table Digital Design Slide 12
Rules of Boolean Algebra • Rule 4 AND Truth Table Digital Design Slide 13
Rules of Boolean Algebra • Rule 5 OR Truth Table Digital Design Slide 14
Rules of Boolean Algebra • Rule 6 OR Truth Table Digital Design Slide 15
Rules of Boolean Algebra • Rule 7 AND Truth Table Digital Design Slide 16
Rules of Boolean Algebra • Rule 8 AND Truth Table Digital Design Slide 17
Rules of Boolean Algebra • Rule 9 Digital Design Slide 18
Rules of Boolean Algebra • Rule 10: A + AB = A AND Truth Table OR Truth Table Digital Design Slide 19
Rules of Boolean Algebra • Rule 11: AND Truth Table OR Truth Table Digital Design Slide 20
Rules of Boolean Algebra • Rule 12: (A + B)(A + C) = A + BC AND Truth Table OR Truth Table Digital Design Slide 21
De. Morgan’s Theorems • Theorem 1 • Theorem 2 Remember: “Break the bar, change the sign” Digital Design Slide 22
Examples: (on blackboard class examples • • • Proving rules 10, 11, and 12. Applying De. Morgan’s theorems. The Boolean expression of a logic circuit The truth table of a logic circuit. Simplifying expressions using Boolean algebra. Digital Design Slide 23
Standard Forms of Boolean Expressions Digital Design Slide 24
Standard Forms of Boolean Expressions • The sum-of-product (SOP) form Example: X = AB + CD + EF • The product of sum (POS) form Example: X = (A + B)(C + D)(E + F) Digital Design Slide 25
Conversion of a General Expression to SOP form • A(B+CD) = AB +ACD • On blackboard class example. Digital Design Slide 26
The standard SOP form • The standard SOP expression is one in which all the variables in the domain appear in each product tem in the expression. – Example: AB’CD + A’B’CD’ + ABC’D’ • Converting product terms to standard SOP – Repeat the following step until all terms contain all variables in the domain either complemented or uncomplemented. (Step) Multiply each nonstandard product term by a term made up of the sum of a missing variable and its complement. • Example: • – On blackboard class example. Binary representation of a SOP term – AB’CD’ = 1. 0’ = 1. 1 = 1 Digital Design Note: a prime (‘) used in these slides is used instead of the bar (‾). Slide 27
The standard POS form • The standard POS expression is one in which all the variables in the domain appear in each sum term in the expression. – Example: (A+B’+C+D) (A’+B’+C+D’) (A+B+C’+D’) • Converting a sum term to standard POS – Repeat the following steps until all terms contain all variables in the domain either complemented or uncomplemented. Step 1: Add to each nonstandard product term a term made up of the product of a missing variable and its complement. Step 2: Apply rule: A + BC = (A + B)(A + C) • Example: • – On blackboard class example. Binary representation of a POS term – A + B’ + C + D’ = 0 + 1’ + 0 + 1’ = 0. 0 = 0 Digital Design Note: a prime (‘) used in these slides is used instead of the bar (‾). Slide 28
Converting a standard SOP to a standard POS • Follow the following steps: 1. Evaluate each product term in the SOP expression. 2. Determine all of the binary numbers not included in the evaluation in Step 1. 3. Write the equivalent sum term for each binary number from Step 2 and express in POS form. • Example: – On blackboard class example. Digital Design Slide 29
Boolean Expression and Truth Tables • Converting SOP expression to truth table – Example: • On blackboard class example. • Converting POS expression to truth table – Example: • On blackboard class example. • Determining Standard Expression from Truth Table – Example: • On blackboard class example. Digital Design Slide 30
The Karnaugh Map Digital Design Slide 31
The Karnaugh Map • The Karnaugh Map is an array of cells in which each cell represents a binary value of the inut variables • Cells are organized such that simplification of expression is a matter of grouping cells together. • They can be used for expressions with 2, 3, 4, 5 and 6 variables. • The number of cells in a K-map equal to the total number of possible input variable combinations (i. e. , to the number of row in the truth table. Digital Design Slide 32
3 -variable Karnaugh Map q. The 3 -variable K-map is an array of eight cells. As shown in the figure, A, B, and C are used for the variables. q. Binary values of A and B are along the left side q. The values of C are across the top. q. The value of a given cell is the binary values of A and B at the left in the same row combined with value of C at the top in the same column. 3 -Variable Karnaugh Map Digital Design Slide 33
3 -variables Karnaugh Map: Mapping a Standard SOP Expression The mapping process is summarized in two steps illustrated in the figure: § Step 1. Determine the binary value of each product term in the standard SOP expression. §As each product term is evaluated, place a 1 on the K-map in the cell having the same value as the product term. Note: Mapping a non-standard SOP exp. is performed by expanding (binary expansion) the expression to a standard SOP form before doing the mapping. 3 -Variable Example Digital Design Slide 34
4 -variable Karnaugh Map q. The 4 -variable K-map is an array of sixteen cells. As shown in the figure, A, B, C and D are used for the variables. q. Binary values of A and B are along the left side q. The values of C and are across the top. q. The value of a given cell is the binary values of A and B at the left in the same row combined with value of C and D at the top in the same column. Digital Design Slide 35
4 -variable Karnaugh Map: Mapping a Standard SOP Expression The mapping process is summarized into two steps as illustrated in the figure: § Step 1. Determine the binary value of each product term in the standard SOP expression. §As each product term is evaluated, place a 1 on the K-map in the cell having the same value as the product term. Note: Mapping a non-standard SOP exp. is performed by expanding the expression (binary expansion) to a standard SOP form before doing the mapping. 4 -Variable Example Digital Design Slide 36
Simplification (Minimization) of SOP Expressions Using Karnaugh Map q. Minimization is the process that results in an expression containing the fewest possible terms with the fewest possible variables. q. There are 4 steps in the process of minimization: 1. Drawing the required K-map suitable to the expression based on the no. of variables 2. Mapping the expression terms to the map. 3. Grouping the 1 s 4. Determining the product term for each group and summing the resulting product terms. Steps 1 and 2 were covered in the previous slides. Digital Design Slide 37
Simplification of SOP Expressions Using K-map: Step 3 Grouping 1 s q. Enclose those adjacent cells containing 1 s. The goals is to maximize the size of the groups and minimize the numbers of groups. 1. A group must contain either 1, 2, 4, 8, or 16 cells based on the number of variables in the expression. 2. Each cell in the group must be adjacent to one or more cells in that same group. 3. Always include the largest possible number of 1 s in a group in accordance to rule 1. 4. Each 1 on the map must be included in at least one group. The 1 s already in a group can be included in another group as long as the overlapping groups include non-common 1 s. Digital Design Slide 38
Simplification of SOP Expressions Using K-map: Step 4 Determining the Minimum SOP Expression q. Find the minimum product terms and minimum SOP expression using the following rules: 1. Group the cells that have 1 s. Each group of cells containing 1 s creates one product term composed of all variables that occur in only one form (either uncomplemented or complemented) within a group. Contradictory variables are eliminated. 2. Determine the minimum product term for each group. A. For a 3 -variable map: 1. A 1 -cell group yields a 3 -variable product term. 2. A 2 -cell group yields a 2 -variable product term. 3. A 4 -cell group yields a 1 -variable term. 4. An 8 -cell group yields a value of 1 for the expression. B. For a 4 -variable map: 1. A 1 -cell group yields a 4 -variable product term. 2. A 2 -cell group yields a 3 -variable product term. 3. A 4 -cell group yields a 2 -variable product term. 4. An 8 -cell group yields a 1 -variable term. 5. A 16 -cell group yields a value of 1 for the expression. 3. When all minimum product terms are derived from the K-map, they are Digital Design summed to form the minimum SOP expression. Slide 39
Examples: (solutions will be illustrated on the class) Example 1: Use K-map to minimize the following standard SOP expression: AB’C + A’B’C’ + AB’C’ Example 2: Use K-map to minimize the following SOP expression: B’C’D’ + A’BC’D’ + A’B’CD’ + A’BCD’ + AB’CD’ The Don’t care conditions Digital Design Slide 40
K-map POS minimization Example 1: Use K-map to minimize the following standard POS expression: (A+B+C) (A+B+C’) (A+B’+C’) (A’+B’+C) Example 2: Use K-map to minimize the following SOP expression: (B+C+D) (A+B+C’+D) (A’+B+C+D’) (A+B’+C+D) (A’+B’+C+D) Digital Design Slide 41
5 - variable Karnaugh Map q A 5 -Variable (ABCDE) K-map can be constructed using two 4 -vriables maps. q Each map contains 16 cells with all combinations of variables B, C, D, and E. q One map is for A=0 and the other is for A=1 as shown. Cell Adjacencies q Imagine that the A=0 map is placed on top of the A=1 map q Each cell in the A=0 map is adjacent to the cell directly below it in the A=1 map. q We apply the same steps: mapping, grouping and term determination that we applied for the 3 -variables and 4 -variables expressions. Digital Design Slide 42
5 - variable K-map POS minimization Example: Use K-map to minimize the following SOP expression: A’B’C’D’E’ + A’B’CD’E’ + A’BC’D’E’ + A’B’C’D’E + A’BCDE + AB’C’D’E’ + AB’C’D’E + ABCDE + AB’CDE Digital Design Slide 43
Digital System Application Self Study! Digital Design Slide 44
These slides are based on Digital Fundamentals 9 th ed. By Thomas Floyd Digital Design Slide 45
- Slides: 45