490 likes | 545 Views
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. Boolean Operations and Expressions. Addition 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 1.
E N D
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
Boolean Operations and Expressions • Addition 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 1 • Multiplication 0 * 0 = 0 0 * 1 = 0 1 * 0 = 0 1 * 1 = 1
Laws of Boolean Algebra • Commutative Laws • Associative Laws • Distributive Law
Laws of Boolean Algebra • Commutative Law of Addition: A + B = B + A
Laws of Boolean Algebra • Commutative Law of Multiplication: A * B = B * A
Laws of Boolean Algebra • Associative Law of Addition: A + (B + C) = (A + B) + C
Laws of Boolean Algebra • Associative Law of Multiplication: A * (B * C) = (A * B) * C
Laws of Boolean Algebra • Distributive Law: A(B + C) = AB + AC
OR Truth Table Rules of Boolean Algebra • Rule 1
OR Truth Table Rules of Boolean Algebra • Rule 2
AND Truth Table Rules of Boolean Algebra • Rule 3
AND Truth Table Rules of Boolean Algebra • Rule 4
OR Truth Table Rules of Boolean Algebra • Rule 5
OR Truth Table Rules of Boolean Algebra • Rule 6
AND Truth Table Rules of Boolean Algebra • Rule 7
AND Truth Table Rules of Boolean Algebra • Rule 8
Rules of Boolean Algebra • Rule 9
OR Truth Table AND Truth Table Rules of Boolean Algebra • Rule 10: A + AB = A
OR Truth Table AND Truth Table Rules of Boolean Algebra • Rule 11:
OR Truth Table AND Truth Table Rules of Boolean Algebra • Rule 12: (A + B)(A + C) = A + BC
Theorem 1 Theorem 2 DeMorgan’s Theorems • Remember: • “Break the bar, change the sign”
Examples: (on blackboard class examples • Proving rules 10, 11, and 12. • Applying DeMorgan’s theorems. • The Boolean expression of a logic circuit • The truth table of a logic circuit. • Simplifying expressions using Boolean algebra.
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)
Conversion of a General Expression to SOP form • A(B+CD) = AB +ACD • On blackboard class example.
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 . 0’ = 1 . 1 . 1 . 1 = 1 Note: a prime (‘) used in these slides is used instead of the bar (‾).
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. Step1: Add to each nonstandard product term a term made up of the product of a missing variable and its complement. Step2: 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 . 0 = 0 Note: a prime (‘) used in these slides is used instead of the bar (‾).
Converting a standard SOP to a standard POS • Follow the following steps: • Evaluate each product term in the SOP expression. • Determine all of the binary numbers not included in the evaluation in Step 1. • Write the equivalent sum term for each binary number from Step 2 and express in POS form. • Example: • On blackboard class example.
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.
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.
3-Variable Karnaugh Map 3-variable Karnaugh Map • 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. • Binary values of A and B are along the left side • The values of C are across the top. • 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 Example 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.
4-variable Karnaugh Map • 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. • Binary values of A and B are along the left side • The values of C and are across the top. • 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.
4-Variable Example 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.
Simplification (Minimization) of SOP Expressions Using Karnaugh Map • Minimization is the process that results in an expression containing the fewest possible terms with the fewest possible variables. • There are 4 steps in the process of minimization: • Drawing the required K-map suitable to the expression based on the no. of variables • Mapping the expression terms to the map. • Grouping the 1s • Determining the product term for each group and summing the resulting product terms. Steps 1 and 2 were covered in the previous slides.
Simplification of SOP Expressions Using K-map: Step 3 Grouping 1s • Enclose those adjacent cells containing 1s. The goals is to maximize the size of the groups and minimize the numbers of groups. • A group must contain either 1, 2, 4, 8, or 16 cells based on the number of variables in the expression. • Each cell in the group must be adjacent to one or more cells in that same group. • Always include the largest possible number of 1s in a group in accordance to rule 1. • Each 1 on the map must be included in at least one group. The 1s already in a group can be included in another group as long as the overlapping groups include non-common 1s.
Simplification of SOP Expressions Using K-map: Step 4 Determining the Minimum SOP Expression • Find the minimum product terms and minimum SOP expression using the following rules: • Group the cells that have 1s. Each group of cells containing 1s 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. • Determine the minimum product term for each group. • For a 3-variable map: • A 1-cell group yields a 3-variable product term. • A 2-cell group yields a 2-variable product term. • A 4-cell group yields a 1-variable term. • An 8-cell group yields a value of 1 for the expression. • For a 4-variable map: • A 1-cell group yields a 4-variable product term. • A 2-cell group yields a 3-variable product term. • A 4-cell group yields a 2-variable product term. • An 8-cell group yields a 1-variable term. • A 16-cell group yields a value of 1 for the expression. • When all minimum product terms are derived from the K-map, they are summed to form the minimum SOP expression.
Examples: (solutions will be illustrated on the class) Example 1: Use K-map to minimize the following standard SOP expression: AB’C + A’BC + A’B’C + A’B’C’ + AB’C’ Example 2: Use K-map to minimize the following SOP expression: B’C’D’ + A’BC’D’ + ABC’D’ + A’B’CD + AB’CD + A’B’CD’ + A’BCD’ + ABCD’ + AB’CD’ The Don’t care conditions
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’) (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)
5- variable Karnaugh Map • A 5-Variable (ABCDE) K-map can be constructed using two 4-vriables maps. • Each map contains 16 cells with all combinations of variables B, C, D, and E. • One map is for A=0 and the other is for A=1 as shown. Cell Adjacencies • Imagine that the A=0 map is placed on top of the A=1 map • Each cell in the A=0 map is adjacent to the cell directly below it in the A=1 map. • We apply the same steps: mapping, grouping and term determination that we applied for the 3-variables and 4-variables expressions.
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’BCD’E’ + A’BC’D’E’ + A’B’C’D’E + A’BCD’E + A’BCDE + AB’C’D’E’ + AB’C’D’E + ABCD’E + ABCDE + AB’CDE
Digital System Application Self Study!
These slides are based on Digital Fundamentals 9th ed. By Thomas Floyd