# 1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.

## Presentation on theme: "1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression."— Presentation transcript:

1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression consists of binary variables and the operators AND, OR and NOT (e.g. A+B  C) The possible values for any Boolean expression can be tabulated in a truth table. Can define circuit for expression by combining gates.

2

3 Common axioms (or postulates): 1. Closure: A set S is closed with respect to a binary operator,if the operator specifies a rule for obtaining an element of S. For example, the set of natural numbers is closed w.r.t binary operator (+) but not close w.r.t. binary operator (-). 2. Associative: A binary operator. on a set S is said to be associative if (x. y). z = x. (y. z) 3. Commutative: A binary operator. on a set S is said to be commutative if x. y = y. x

4 4. Identity element: Set S is said to have an identity element with respect to binary operation. on S if there exists an element e member of S such that e. x = x.e = x for every x member of S » Example: The element 0 is an identity element w.r.t. operation + on the set of integers I since x + 0 = 0 + x = x, x member of I 5. Inverse: A set S having the identity element e with respect to a binary operator. is said to have an inverse whenever, for every x member of S, there exists an element y member of S such that x. y = e » Example: The inverse of an element a is (-a) such that a + (-a) = 0 6. Distributivity: If. and ¤ are two binary operators on a set S,. is said to be distributive over ¤ whenever x. (y ¤ z) = (x. y) ¤ (x. z)

5 Boolean Algebra: Algebra for binary values. Developed by George Boole in 1854. Huntington postulates for Boolean algebra (1904): Closure with respect to operator + and operator · x @ y → B, @ = {+ ‘ } for ∀ x,y ∈ B Identity element 0 for operator + and 1 for operator · Commutativity with respect to + and · x+y = y+x, x·y = y·x Distributivity of · over +, and + over · x·(y+z) = (x·y)+(x·z) and x+(y·z) = (x+y)·(x+z) Complement for every element x is x’ with x+x’=1, x·x’=0 There are at least two elements x,y member of B such that x is not y

6 Boolean vs. Ordinary Algebra Postulates do not include associativity Distributivity of + over · holds for Boolean, not for ordinary algebra » x+(y·z) = (x+y)·(x+z) Boolean does not have inverse elements for + or · » Thus, no subtraction or division operators Complement is not defined in ordinary algebra Set of elements in Boolean algebra not yet defined » But there must be at least two elements Boolean 0 and 1 represent the state of a voltage variable (logic level) and is used to express the effects that various digital circuits have on logic inputs

7 Basic Theorems of Boolean Algebra Theorem 1 (Idempotency) (a) x + x = x ; (b) x x = x. Theorem 2 (a) x + 1 = 1 ; (b) x. 0 = 0. Theorem 3 (Absorption) (a) yx + x = x ; (b) (y + x)x = x. Theorem 4 (Involution) (x`)` = x. Duality Property To obtain a dual of a given expression: Interchange + and operators Replace all 0s with 1s with and all 1s and with 0s.

8 Theorem 5 (De Morgan) (a) (x + y)` = x`. y`; (b) (xy)` = x` + y`. Theorem 6 (De Morgan (generalized)) The theorems usually are proved algebraically (i.e., by transformations based on axioms and theorems) or by truth table.

9

10

11

12 BOOLEAN FUNCTIONS

13 BOOLEAN FUNCTIONS Boolean algebra deals with binary variables and logic operations Boolean function is an algebraic expression that consists of: Binary variables Constants 0 and 1 Logic operation symbols The number of rows in the table is 2 n, where n is the number of variables in the function.

14 LOGIC CKT DIAGRAM OF BOOLEAN FUNCTION

15 A literal is a variable or its complement in a boolean expression, e.g., F1 has 8 literals, 1 OR term (sum term), and 3 AND terms (product terms). The complement of any function F is F0, which can be obtained by De Morgan’s theorem: 1) take the dual of F (Interchange AND and OR, and 1s & 0s), and 2) complement each literal in F. NOTE for next slide see boole.pdf page 5 of 21

16

17

18 Algebraic Manipulation Consider function

19 Simplify Function Apply X(Y + Z) = XY + XZ X + X` = 1 X. 1 = X

20 Canonical form is algebraic representation of truth table. Uses minterms as basic component. A minterm is a product (ANDing) of all variables. Each variable of function appears in minterm. A maxterm is a sum (OR) of all variables in respective polarities Maxterm contains every variable in the function All the variables are OR-ed together in a maxterm

21

22 Both function (F1 & F2) = sum of all minterms where truth table is 1.

23 Fewer Gates

24 Standard Forms Sum-of-products (sop) Product-of-sums (pos) Product terms (or implicants) are the AND terms, which can have fewer literals than the minterms. Sum terms are the OR terms, which can have fewer literals than the maxterms. Standard forms are not unique! Standard forms can be derived from canonical forms by combining terms that differ in one variable, i.e., terms with distance 1. Sop form: F = w`x`yz + wxy`z`. Pos form: F = (w + x`)(w` + y`)(y + z`)(z + x) Non-Standard Form: (AB + CD) (A`B` + C`D`)

25

26 Other Logic Operations There are 2 2n different boolean functions for n binary variables. There are 16 different boolean functions if n = 2.

27

28

29

30 NAND is Universal Can express any Boolean Function Equivalents below

31 Using NAND as Invert-OR

32 Sum of Products with NAND

33 AND-OR Circuit Easy to Convert

34 Inverter and buffer cannot be extended to multiple inputs AND and OR are cummutative x+y = y+x, xy = yx and associative (x+y)+z = x+(y+z) = x+y+z (xy) z = x(yz) = xyz NAND and NOR are cummutative, but not associative. They are redefined as complemented OR and AND gates: x ↓ y ↓ z = (x+y+z)’, x ↑ y ↑ z = (xyz)’ Extension to Multiple Inputs

35 The final function is the XOR - Exclusive OR. Verbally it can be stated as ‘Either A or B, but not both’. For the 2 input XOR gate, a HIGH o/p will occur when one and only one i/p is logic HIGH.

36

37

Download ppt "1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression."

Similar presentations