
Switching Algebra Objectives The great advantage of using logical expressions to represent the behavior of gate networks is that there are mathematical tools available to manipulate these expressions. These tools are based on the theory of Boolean algebra, so this section will: Define Boolean algebras and derive those properties most useful for the design of gate networks. Illustrate the use of the theorems of Boolean algebra to simplify logical expressions. Establish the connection between the two main behavioral models for gate networks, namely logical expressions and truth tables, using the two standard canonical forms of logical expressions. EE/CoE 0132 1 Switching Algebra Reading Assignment Boolean algebra is introduced in section 2.5 of the latest edition of Brown and Vranesic. The classic approaches restrict the presentation to the 2-valued Boolean algebra and start with axioms and theorems involving the operations AND, OR, and NOT. An alternate approach, that does not assume that the Boolean algebra has only two elements, is also presented here. It starts from a set of axioms using only the operations AND and XOR. It is provided at the end of these notes. EE/CoE 0132 2 Switching Algebra 1 Boolean Algebra •Huntington’s Postulates •Proofs •Basic Theorems • Operator Precedence Boolean Algebra In 1845, George Boole introduced a systematic treatment of logic now called Boolean algebra. Logical statements are built up from: Variables: a, x, etc. Variables can be used to represent propositions (statements that are either true or false) or signals in digital circuits (voltages that are either high or low, representing 0 or 1). Operators: The two operators (+, x) are used to combine variables to produce more complex statements or logic functions. These operators must satisfy certain properties. The most well-known form of Boolean algebra is a two-valued system, in which all variables take values on the set {0, 1} and the operators (+,x) correspond to (OR, AND) respectively. In 1904, E. V. Huntington defined Boolean algebra by providing 6 postulates that must be satisfied, called Huntington’s Postulates: • Closure with respect to the operators: any logical operation yields a value in the set {0, 1}. • Identity elements with respect to the operators: x + 0 = xxx 1 = x • Commutativity with respect to the operators: x + y = y + xxx y = y x x • Distributivity: x x (y + z) = (x x y) + (x x z) x + (y x z) = (x + y) x (x + z) • Complements exist for all the elements: x + x' = 1 x x x' = 0 • Distinct elements: 0 z 1 In 1938, Claude Shannon showed that a two-valued Boolean Algebra, which he called switching algebra, could be used to describe digital circuits. •Two elements: {0,1} •Two binary operators: + (OR), x (AND) •One unary operator, the complement ' x y x + y x y x x y x x' 0 0 0 00 0 01 0 1 1 01 0 10 1 0 1 10 0 1 1 1 11 1 Is this really a Boolean algebra? Does it satisfy Huntington’s Postulates? • Closure with respect to +, x: Yes, both operations produce 0 or 1 for all input combinations. • Identity elements with respect to +, x: Yes, from truth tables, x + 0 = x, x x 1 = x. • Commutativity with respect to +, x: Yes, if x and y columns are swapped, results are unchanged. • Distributivity: Yes (proof to follow). • Complements exist for all the elements: Yes, 0' = 1, 1' = 0. • Distinct Elements: Yes, by definition: 0 z 1. Proofs: What are they? Proofs are a tool for establishing new results or theorems in Boolean algebra. The kinds of things we need to prove usually fall into one of several categories. •Prove that two logical expressions are equivalent. •Prove that two logic networks are functionally equivalent. •Prove that one logical expression is the complement of another. OK, so prove it! Hmmm, how do we do that? Here are four ways to prove that two expressions are equivalent. • Perfect Induction: show that the two expressions have identical truth tables. If there are n input variables, this requires 2n input combinations. This is a bad idea if there are more than 3 or 4 variables. • Axiomatic Proof: apply Huntington’s postulates (or other theorems that have already been proven) to the expressions, until the two expressions are identical. • Duality Principle:every theorem in Boolean algebra remains valid if we interchange all AND’s and OR’s, and interchange all 0’s and 1’s. • Proof by contradiction:assume that the hypothesis is false and then prove that the resulting equation can never be true. Proof of Distributivity of x Over +, by Perfect Induction. xyzy + zx x (y + z) x x yx x z (x x y) + (x x z) 000 0 0 0 0 0 001 1 0 0 0 0 010 1 0 0 0 0 011 1 0 0 0 0 100 0 0 0 0 0 101 1 1 0 1 1 110 1 1 1 0 1 111 1 1 1 1 1 Proof of Distributivity of + Over x, by Perfect Induction. xyzy x zx + (y x z) x + yx + z (x + y) x (x + z) 000 0 0 0 0 0 001 0 0 0 1 0 010 0 0 1 0 0 011 1 1 1 1 1 100 0 1 1 1 1 101 0 1 1 1 1 110 0 1 1 1 1 111 1 1 1 1 1 OK, where are we so far? So far, we have only shown (through 1 rigorous proof and several less formal arguments) that Huntington’s postulates are satisfied. Therefore, the two valued system with the operations (x, +) as defined above is a Boolean algebra. Why do we care? Armed with these 6 postulates, we can now go on to establish other theorems that will help us analyze logic circuits. Basic Theorems These theorems can be verified by examining the truth tables for {+, x, '}. •Theorem 1 a) x + x = x b) x x x = x •Theorem 2 a) x + 1 = 1 b) x x 0 = 0 •Theorem 3 (x') ' = x •Associativity a) (x + y) + z = x + (y + z) b) (x x y) x z = x x (y x z) Theorem: DeMorgan’s Law a) (x + y) ' = x ' x y ' Proof: by Perfect Induction. xy(x + y)(x + y)' x' y' x' x y' 00 0 1 11 1 01 1 0 10 0 10 1 0 01 0 11 1 0 00 0 b) (x x y) ' = x '+ y ' Proof: apply the duality principle to the expression in part a. If we interchange all x and + operators, we obtain the expression in part b. Theorem: Absorption a) x + (x x y) = x Axiomatic Proof: x + (x x y)= (x x 1) + (x x y) by x x 1 = x = x x (1 + y)by distributivity = x x (y + 1) by commutativity = x x 1by x + 1 = x = x by x x 1 = x b) x x (x + y) = x Proof: apply the duality principle to the expression in part a. If we interchange all x and + operators, we obtain the expression in part b. Two More Theorems •Theorem 7 a) x + (x' x y) = x + y b) x x (x' + y) = x x y •Theorem 8 a) (x x y) + (y x z) + (x' x z) = (x x y) + (x' x z) b) (x + y) x (y + z) x (x'+ z) = (x + y) x (x'+ z) Try to prove these theorems on your own. Note that each pair of equations are related through the duality principle. Theorem 7b is probably the easiest to prove. So now we have all these theorems. What good are they? Example 1: Find the compliment of the logical function f. § · § · f xx¨ yz¸x¨ x yz¸ © ¹ © ¹ Solution: by repeated application of DeMorgan’s Law. f xx yz x x yz xx yz x yz x yz x yz x(yxz)(xx yxz) So now we have all these theorems. What good are they? Example 2: Simplify the previous expression. f x(yxz)(xx yxz) Solution: by algebraic manipulation. Apply the theorems of Boolean algebra. f x(xx yxz)(yxz) by Commutativity x(yxz)(yxz) by Theorem 7a x(y y)xz by Distributivity x1xz by Postulate 5a xz by Postulate 2b Precedence of Boolean Operators To avoid confusion or incorrect evaluation, the operators in Boolean expressions are applied according to the following order of precedence: 1. Expressions in parentheses: () 2. NOT: ' 3. AND: x 4. OR: + Also, it is conventional to omit the x symbol for AND where convenient. As a result, many Boolean expressions can be written in a compact form, often eliminating extraneous parentheses. (xx y) xy xx(yz) x(yz) (xxz)(yxz) xz y z Reference Sheet: Postulates and Theorems •Postulate 1: Closure •Theorem 3: Involution (x')' = x •Postulate 2: Identity a) x + 0 = x •Theorem 4: Associativity b) x x 1 = x a) x + (y + z) = (x + y) + z b) x(yz) = (xy)z •Postulate 3: Commutativity a) x + y = y + x •Theorem 5: DeMorgan’s Law b) xy = yx a) (x + y)' = x'y' •Postulate 4: Distributivity b) (xy)' = x' + y' a) x(y + z) = xy + xz •Theorem 6: Absorption b) x + yz = (x + y)(x + z) a) x + xy = x •Postulate 5: Complement b) x(x + y) = x a) x + x' = 1 •Theorem 7: Common Identities b) x x x' = 0 a) x + x'y = x + y b) x(x' + y) = xy •Theorem 1: Idempotency a) x + x = x •Theorem 8: Consensus b) x x x = x a) xy + yz + x'z = xy + x'z b) (x + y)(y + z)(x'+ z) = (x + y)(x'+ z) •Theorem 2: Tautology and Contradiction a) x + 1 = 1 b) x x 0 = 0 Algebraic Simplification Example 1 ( (A B)•(A•C) )•( (A•B)' (A B) ) = ( (A•B'+A'•B)•(A•C) )•( (A'+B')+(A•B'+A'•B) ) = ( A•B'•A•C + A'•B•A•C ) • ( A'+B'+A•B'+A'•B ) = ( A•B'•C ) • ( A'+B' + A•B'+A'•B ) = ( A•B'•C ) • (A' + A'•B + B' + A•B' ) = (A•B'•C) • (A'+B') = A•B'•C•A' + A•B'•C•B' = A•B'•C EE/CoE 0132 3 Switching Algebra Example 2 (X•Y' Y•Z)•(Y•Z'X•Z) = X•Y'•Y•Z' + X•Y'•X•Z + Y•Z•Y•Z' + Y•Z•X•Z = X•Y'•Z + X•Y•Z = X•Z•(Y'+Y) = X•Z•1 = X•Z EE/CoE 0132 4 Switching Algebra 2 Example 3 ( ( (X•Y')' + Z•X')' • (X•Y'•Z') )' = ( ( (X•Y')' + Z•X')' )' + (X•Y'•Z')' = (X•Y')' + Z•X') + (X'+Y+Z) = (X'+Y + Z•X') + (X'+Y+Z) = (X'+Y) + (X'+Y+Z) = X'+Y+Z EE/CoE 0132 5 Switching Algebra Canonical Forms Definitions (SOP) Literal: Variable or complement of a variable.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages23 Page
-
File Size-