1 / 37

Lect # 2 Boolean Algebra and Logic Gates

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  )

perezleslie
Download Presentation

Lect # 2 Boolean Algebra and Logic Gates

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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. 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

  3. 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)

  4. 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

  5. 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

  6. 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.

  7. 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.

  8. BOOLEAN FUNCTIONS

  9. 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 2n, where n is the number of variables in the function.

  10. LOGIC CKT DIAGRAM OF BOOLEAN FUNCTION

  11. 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

  12. Algebraic Manipulation • Consider function

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

  14. 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

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

  16. Fewer Gates Fewer Gates

  17. 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`)

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

  19. NAND is Universal • Can express any Boolean Function • Equivalents below

  20. Using NAND as Invert-OR

  21. Sum of Products with NAND

  22. AND-OR Circuit Easy to Convert

  23. Extension to Multiple Inputs • Inverter and buffer cannot be extended to multiple inputs • AND and OR are cummutative x+y = y+x, x•y = y•x and associative (x+y)+z = x+(y+z) = x+y+z (x•y) • z = x•(y•z) = x•y•z • 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 = (x•y•z)’

  24. 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.

More Related