1 / 41

Boolean Algebra

Boolean Algebra. Outline. Laws and theorems of Boolean Algebra Switching functions Logic functions: NOT, AND, OR, NAND, XOR, XNOR Switching function representations Canonical forms. Axiomatic of Boolean Algebra.

Télécharger la présentation

Boolean Algebra

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

  2. Outline • Laws and theorems of Boolean Algebra • Switching functions • Logic functions: NOT, AND, OR, NAND, XOR, XNOR • Switching function representations • Canonical forms Boolean Algebra

  3. Axiomatic of Boolean Algebra A Boolean algebra consists of a set B with two binary operations (  “AND”,  “OR”) and a unary operation ( ¯ or  “NOT”), such that the following axioms satisfy: • Set B contains at least two distinct elements a and b. • Closure: For every a, b B, • a + b  B • a  b  B • Commutative Laws: For every a, b B, • a + b = b + a • a  b = b  a Boolean Algebra

  4. Axiomatic of Boolean Algebra • Associative Laws: For every a, b, c B, • (a + b) + c = a + (b + c) • (a  b) c = a (b  c) • Identities: For every aB, •  an identity element 0, such that a + 0= a •  an identity element 1, such that a 1= a • Distributive Laws: For every a, b, c B, • a (b + c)= (a  b) + (a  c) • Complement: For each aB,  an such that • a + =1 • a  =0 Boolean Algebra

  5. Boolean function • A Boolean function uniquely maps Bn to B. • A Boolean expression is an algebraic statement containing Boolean (binary) variables and operators (, +, and ), that is (AND, OR, and NOT) • A literal is a variable itself or its complement. When a Boolean function is implemented with logic gates, each literal represents an input to a gate, and each term is implemented a gate. Boolean Algebra

  6. Examples • F = XYZ • F = X + Y Z • F = X Y Z + X YZ + XZ • Z = A B (C + D) • Z = (A(B (C + D))) Boolean Algebra

  7. Laws and Theorems of Boolean Algebra Duality Every Boolean expression is deducible from the postulates of Boolean algebra remains valid if the operators and the identity elements are interchanged. That is interchange OR and AND operators and replace 1's by 0's and 0's by 1's. Boolean Algebra

  8. Examples • X + 1 = 1  X 0 = 0 • X + XY = X X(X + Y) Boolean Algebra

  9. Laws and Theorems Boolean Algebra

  10. Examples Simplify the following Boolean expressions to a minimum number of literals • X + X Y  X + Y • XY + X Y  Y • X (X + Y )  XY • X Y Z + X YZ + XY  X Z + XY • XY + X Z + YZ XY + X Z • (X+Y)(X+Z)(Y+Z) X Y + XZ Boolean Algebra

  11. Switching Functions • A switching algebra is a Boolean algebra whose set B contains only two values 0 and 1. • A switching function uniquely maps Bn to B. f (X, Y, Z) = XY + X Z + YZ If X = 0, Y = 1, Z = 0, then f (X, Y, Z) = 0. If X = 0, Y = 1, Z = 1, then f (X, Y, Z) = 1. Boolean Algebra

  12. Truth Tables A switching function can be represented as a Boolean function or in a tabular form called truth table. A truth table is a list of possible combinations of inputs that correspond to the values of the switching function (output). Boolean Algebra

  13. Example Truth table of f (X, Y, Z) = XY + X Z + YZ Boolean Algebra

  14. Switching Functions There are 16 possible switching functions of two variables: Boolean Algebra

  15. Canonical and Standard Forms • Minterms • Maxterms Boolean Algebra

  16. Minterms For two binary variables A and B combined with an AND operation, the minterms or standard products are: AB, AB, AB, and AB. That is, two binary variables provide 22 = 4 possible combinations (minterms.) n variables have 2nminterms. Each minterm has each variable being primed if the corresponding bit of the binary number is a 0 and unprimed if a 1. Boolean Algebra

  17. Maxterms Similarly, two binary variables A and B combined with an OR operation, the maxterms or standard sums are: A+B, A+B, A+B, and A+B. That is, two binary variables provide 22 = 4 possible combinations (maxterms.) nvariables have 2nmaxterms. Each maxterm has each variable being primed if the corresponding bit of the binary number is a 1 and unprimed if a 0. A maxterm is the complement of its corresponding minterm, and vice versa. Boolean Algebra

  18. Boolean function • Sum of Products (or Minterms) • A Boolean function can be expressed as a sum of minterms. The minterms whose sum defines the Boolean function are those that give the 1's of the function in a truth table. • Product of Sums (or Maxterms) • A Boolean function can be expressed as a product of maxterms. The maxterms whose sum defines the Boolean function are those that give the 0's of the function in a truth table. Boolean Algebra

  19. Minterms and Maxterms for Three Binary Variables Boolean Algebra

  20. Examples Boolean Algebra

  21. Examples F1 and F2 can be expressed as a sum of products as follows: F1 = XYZ+XYZ+XYZ = m1+ m4+m7 F2 = XYZ+XYZ+XYZ +XYZ = m3+ m5+m6 +m7 F1 and F2can also be expressed as a product of sums as follows: F1 = (X+Y+Z)(X+Y+Z)(X+Y+Z)(X+Y+Z)(X+Y+Z) = M0 M2 M3 M5 M6 F2 = (X+Y+Z)(X+Y+Z)(X+Y+Z)(X+Y+Z) = M0 M1 M2 M4 Boolean Algebra

  22. Notation Boolean functions expressed as a sum of products or product of sums are said to be in canonical form A convenient way to express these function is by using a short notation, decimal form: F1(X, Y, Z) = m(1,4,7) F2(X, Y, Z) = m(3,5,6,7) or F1(X, Y, Z) =  M(0,2,3,5,6) F2(X, Y, Z) =  M(0,1,2,4) Boolean Algebra

  23. Standard forms A Boolean function is said to be in standard form if the function contains one, two or any number of literals. For example: F1 = Y+XY+XYZ or F2 = X(Y+Z)(X+Y+Z+W) A Boolean function may be expressed in a nonstandard form. For example, the function F = (WX+YZ)(WX+YZ) Boolean Algebra

  24. Example 1 1. Given the following truth table. Express F in a canonical minterms and maxterms. Boolean Algebra

  25. Example 2 2. Design a digital logic circuit that will activate an alarm if a door or window is open during non-business hours. Assume that Boolean Algebra

  26. Conversion between canonical form • To convert from a sum of products to a product of sums: rewrite the minterm canonical form in a shorthand notation then replace the existing term numbers by the missing numbers. For example: F1(X, Y, Z) = m(1,3,6,7) =  M(0,2,4,5) Boolean Algebra

  27. Conversion between canonical form • To convert from a product of sums to a sum of products: rewrite the maxterm canonical form in a shorthand notation then replace the existing term numbers by the missing numbers. For example: F1(X, Y, Z) =  M(0,2,4,5)= m(1,3,6,7) Boolean Algebra

  28. Conversion between canonical form • To obtain the minterm (or maxterm) canonical form of the complement, given the Boolean function in a sum of products (or product of sums) form : list the term numbers that are missing in For example: F(X, Y, Z) = m(0,2,4,5)F(X, Y, Z) = m (1,3,6,7) F(X, Y, Z) = M(1,3,6,7) F(X, Y, Z) = M(0,2,4,5) Boolean Algebra

  29. Don't Care Conditions • F(A,B,C,D) = m(1,3,7,11,13,15) + d(0,2,5) • F(A,B,C,D) = m(4,5,6,7,8,9,10,13) + d(0,7,15) • BCD increment by 1 function. Boolean Algebra

  30. Logic Functions AND Operation Z = X  Y Boolean Algebra

  31. Logic Functions OR Operation Z = X + Y Boolean Algebra

  32. Logic Functions NOT Operation Z = X  Boolean Algebra

  33. Logic Functions NAND Operation Z = (X  Y) Boolean Algebra

  34. Logic Functions NOR Operation Z = (X + Y) Boolean Algebra

  35. Logic Functions XOR Operation Z = X  Y Boolean Algebra

  36. Logic Functions XNOR Operation Z = (X  Y) Boolean Algebra

  37. Switching function representations There are 3 ways to represent a switching function: • Boolean expression • Truth table • Logic diagram Boolean Algebra

  38. Positive and Negative Logic Boolean Algebra

  39. Positive and Negative Logic Boolean Algebra

  40. Positive and Negative Logic Boolean Algebra

  41. Example Example: Traffic lights -- to define three signals Boolean Algebra

More Related