1 / 69

Boolean Algebra

Boolean Algebra. Presented by: Ms. Maria Estrellita D. Hechanova , ECE. Objectives of this Course. Define Boolean algebra Identify axioms, theorems, corollaries, and laws pertaining to the manipulation of Boolean expressions Compute and manipulate or simplify given Boolean expressions

howe
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 Presented by: Ms. Maria Estrellita D. Hechanova, ECE

  2. Objectives of this Course • Define Boolean algebra • Identify axioms, theorems, corollaries, and laws pertaining to the manipulation of Boolean expressions • Compute and manipulate or simplify given Boolean expressions • Properly use Karnaugh Map (K-map) in simplification of Boolean expressions • Relate this lesson to existing applications in computer • Simplify digital circuits

  3. Contents • Introduction to Boolean Algebra • Basic Definitions and Axioms in Boolean Algebra • Basic Theorems • Product-of-sums and Sum-of-products • Minimal Boolean Expressions and Prime Implicants • Applications and other means of simplification: • Logic gate and circuits • Truth tables and Boolean functions • Karnaugh map (K-map)

  4. Have you ever wondered... • How can we communicate with our computers or laptops? • How is it possible that my SMS from my mobile phone be sent hundreds of miles from my location? • How does televisions be able to project images on a screen? • Why does robots be able to do specific (and even complicated) tasks?

  5. An introduction • A statement is true if it agrees with reality, false if it doesn’t. • Two-state logic assumes that each statement is either true or false. • The Greeks, especially Aristotle, worked out the theory of two-state logic in great detail. • In 1854, George Boole came up with symbolic logic, better known as the Boolean Algebra.

  6. An introduction • Boolean algebra uses letters and symbols to represent statements and their logical connections. • Each variable in Boolean algebra has either of two values: true or false. (this is why it is called a two-state or binary algebra) • Boolean algebra was a far-out subject until 1938, when Claude Shannon used it to analyze and design telephone switching circuits. • “He let the variables represents closed and open relays.

  7. An introduction • Boolean algebra has become one of the major design tools of digital and computer electronics. LOGIC CIRCUITS!!!

  8. When to use Boolean Algebra? • At least one (1) or more inputs of either logic 1 (true) or logic 0 (false) and a single desired output (either a 1 or a 0, depending on the inputs) Examples: • F = a+b • F = a*b • F = (a+b)*c’ • F = abc’+(bd)’+ab+a’cd Note that inputs a, b, c, and d should have a value either a logic 1 or logic 0 and the output F should acquire a value either 1 and 0.

  9. Axioms in Boolean Algebra • a+b = b+a • a*b = b*a • a+0 = a • a*1 = a Commutative Law Identity Law Distributive Law Complement Law • a+(b*c) = (a+b)*(a+c) • a*(b+c) = (a*b)+(a*c) • a+a’ = 1 • a*a’ = 0

  10. To give us a clearer view... Let a be the values on the column side and b be the values on the row side. + 0 1 Column 0 0 1 1 1 1 Row

  11. What is the output if we have *? Let a be the values on the column side and b be the values on the row side. 0 1 * 0 0 0 1 0 1

  12. What is the result of the unary operation? Simply change the input 0 to an output of 1 and the input 1 to an output 0!! ‘ 0 1 1 0

  13. Base on the outputs of the truth tables, what did you notice? + or * and ‘ not

  14. Duality • The dual of any statement in a Boolean algebra B is the statement obtained in interchanging the operations + and *, and interchanging their identity elements 0 and 1 in the original statement. • Example: The dual of (1+a) * (b+0) = b is... • Theorem 1. Principle of Duality (0*a) + (b*1) = b

  15. Basic Theorems Theorem 2: Idempotent Laws: a+a = aa*a = a Theorem 3: Boundedness Laws: a+1 = 1a*0 = 0 Theorem 4: Absorption Laws: a+(a*b) = a a*(a+b) = a Theorem 5: Associative Laws: (a+b)+c = a+(b+c) (a*b)*c = a*(b*c)

  16. Other special theorems Let a be any element of a Boolean algebra B. Theorem 6: Uniqueness of compliment: If a+x = 1 and a*x = 0, then x = a’ Theorem 7: Involution Law: (a’)’ = a Theorem 8: *Inversion Law: 0’ = 1 1’ = 0 Theorem 9: DeMorgan’s Laws: (a+b)’ = a’ * b’ (a*b)’ = a’ + b’

  17. Boolean Algebra as Lattices • By the basic theorems and the commutative axiom, every Boolean algebra B satisfies the associative, commutative, and absorption laws and hence is a lattice where + and * are the join and meet operations, respectively. • With respect to this, a+1 = 1 implies a ≤ 1 and a*0 = 0 implies 0 ≤ a, for any element a ЄB. Thus B is a bounded lattice. • Distributive and complement axioms show that B is also distributive and complemented.

  18. Boolean Algebra as Lattices • So, we could say that, every bounded, distributive, and complemented lattice L satisfies the four (4) axioms. Alternative Definition: A Boolean algebra B is a bounded, distributive, and complemented lattice.

  19. Boolean Algebra as Lattices • Since Boolean algebra is a lattice, it has a natural partial ordering. • In the discussion of ordered sets and lattices, it was defined that a≤b if the equivalent conditions a+b = b and a*b = a are satisfied.

  20. Boolean Algebra as Lattices • The following are equivalent in Boolean algebra: a+b = b a*b = a a’+b = 1 a*b’ = 0 Therefore, in a Boolean algebra, we can define a≤b if all of the above conditions is known to be true.

  21. Representation Theorem • Let B be a finite Boolean algebra. From the discussion of bounded lattices, an element a in B is an atom if a immediately succeeds 0, that is if 0<<a. Let A be the set of atoms of B and let P(A) be the Boolean algebra of all subsets of the set A of atoms. By theorem 14.8 in distributed lattices, Let L be a finite distributive lattice. Then every a in L can be written uniquely (except for order) as the join of irredundant join irreducible elements, each x≠0 can be expressed uniquely (except for order) as the sum (join) of atoms, i.e., elements of A.

  22. Representation Theorem Say, x = a1 + a2 + ... + ar is such a representation. Consider the function f: B  P(A) defined by f(x) = {a1 , a2 , ... , ar} The mapping is well defined since the representation is unique.

  23. Representation Theorem Theorem 10: The above mapping f: B  P(A) is an isomorphism. Thus we see the intimate relationship between the set theory and abstract Boolean algebra in the sense that every finite Boolean algebra is structurally the same as a Boolean algebra of sets. If a set A has n elements, then its power set P(A) has 2n elements. Corollary 1: A finite Boolean algebra has 2n elements for some positive integer n.

  24. Sum-of-Products Form for Sets • E will represent some area in the figure and hence will uniquely equal the union of one or more of the eight sets. • Let’s interpret union as a sum and an intersection as a product. Therefore, the eight sets are products, and the unique representation of E will be the sum (union) of products.

  25. Sum-of-Products Form in Boolean Algebra • Boolean expression E is any variable or any expression built up from the variables using the Boolean operations. Naturally, the expression E must be well-formed, that is, where + and * are used as binary operations, and ‘ is used as a unary operation. • Literal is a variable or complemented variable, such as x, x’, y, y’, and so on. • Fundamental product is a literal or a product of two or more literals in which no two literals involve the same variable.

  26. Sum-of-Products Form in Boolean Algebra • Note that, any product of literals can be reduced to either 0 or a fundamental product. • A fundamental product P1 is said to be contained in (or included in) another fundamental product P2 if the literals of P1 are also literals of P2.

  27. Sum-of-Products Form in Boolean Algebra Definition: A Boolean expression E is called a sum-of-products expression if E is a fundamental product or the sum of two or more fundamental products none of which is contained in another. Definition: Let E be any Boolean expression. A sum-of-products form of E is an equivalent Boolean sum-of-products expression.

  28. Sum-of-Products Form in Boolean Algebra Consider the expressions E1 = xz’ + y’z + xyz’ and E2 = xz’ + x’yz’ + xy’z!! E1 = xz’ + y’z + xyz’ E1 = xz’ + xyz’ + y’z by absorption law, a + ab = a, E1 = xz’ +y’z

  29. Algorithm for Finding SOP Forms Algorithm 1A: The input is a Boolean expression E. The output is a sum-of-products expression equivalent to E. • Use DeMorgan’s law and involution to move the complement operation into any parenthesis until finally the complement operation only applies to variables. Then E will consists only of sum of products of literals. • Use the distributive operation to next transform E into a sum of products.

  30. Algorithm for Finding SOP Forms • Use the commutative, idempotent, and complement laws to transform each product in E into 0 or a fundamental product. • Use the absorption and identity laws to finally transform E into a sum-of-products expression.

  31. Let’s try to simplify this expression... E = ((xy)’z)’((x’+z)(y’+z’))’ Answer: E = xyz +xz’

  32. Complete Sum-of-Products Forms • A Boolean expression E = E(x1, x2, ... , xn) is said to be a complete sum-of-products expression if E is a sum-of-products expression where each product P involves all the n variables. Such a fundamental product P which involves all the variables is called a minterm, and there is a maximum of 2n such products of n variables. Theorem 11: Every nonzero Boolean expression E=E(x1, x2, ... , xn) is equivalent to a complete sum-of-products expression and such a representation is unique. This is called the complete sum-of-product form of E.

  33. Algorithm to transform SOP to complete SOP form Algorithm 1B: The input is a Boolean sum-of-products expression E=E(x1, x2, ..., xn). The output is a complete sum-of-products expression equivalent to E. • Find a product P in E which does not involve the variable xi, and then multiply P by xi+xi’, deleting any repeated products. • Repeat step 1 until every product P in E is a minterm, i.e., every product P involves all the variables.

  34. Let’s get the complete sum-of-product form of this expression... E(x,y,z) = x(y’z)’ Answer: E = xyz + xyz’ + xy’z’

  35. Other terminologies • Sum-of-product form • = Disjunctive normal form (DNF) • Complete sum-of-product form • = Full disjunctive normal form • = Disjunctive canonical form • = Minterm canonical form

  36. Minimal Boolean Expression and Prime Implicants • Minimal Sum-of-Products • Prime Implicants • Consensus of Fundamental Products • Consensus Method of Finding Prime Implicants • Finding a Minimal Sum-of-Products Form

  37. Minimal Sum-of-Products • Consider a Boolean sum-of-products expression E. Let EL denote the number of literals in E (counted according to multiplicity), and let ES denote the number of summands in E. Example: E = xyz’ + x’y’t + xy’z’t +x’yzt EL = 3 + 3 + 4 + 4 = 14 ES = 4

  38. Minimal Sum-of-Products • Assuming that E and F are equivalent Boolean sum-of-products expression, E is simpler than F if: • EL < FL and ES ≤ FL • EL ≤ FL and ES < FL • E is minimal if there is no equivalent sum-of-products expression which is simpler than E. Note that there can be more than one equivalent minimal sum-of-products expressions.

  39. Prime Implicants • A fundamental product P is called prime implicant of a Boolean expression E if, P + E = E but no other fundamental product contained in P has this property. Example: E = xy’ + xyz’ + x’yz’ Therefore, xz’ is a prime implicant of E.

  40. Prime Implicants Theorem 12: A minimal sum-of-products form of a Boolean expression E is a sum of prime implicants of E. (The following topics discuss on the methods of finding the prime implicants of E based on the notion of the consensus of fundamental products. This method can be used to find the minimal sum-of-products form for E. Geometric methods for finding prime implicants will also be discussed later...)

  41. Consensus of Fundamental Products • Let P1and P2 be fundamental products such that exactly one variable, xk, appears uncomplemented in one of the fundamental products and complemented in the other. Then the consensus of P1 and P2 is the product (without repetitions) of the literals of P1 and the literals of P2 after xk and xk’ are deleted. Note that, it is not proper to define the consensus of P1 = x and P2 = x’. Lemma 1: Suppose Q is the consensus of P1 and P2. Then P1 + P2 + Q = P1 + P2.

  42. Consensus of Fundamental Products Example: Find the consensus Q of P1and P2. • P1 = xyz’sand P2 = xy’t Q = xz’s * xt Q = xz’st • P1 = xy’ and P2 = y Q = x * 1 Q = x

  43. Consensus Method for Finding Prime Implicants Algorithm 2A (Consensus Method): The input is a Boolean expression E = P1 + P2 + ... + Pm where the Ps are fundamental products. The output expresses E as a sum of its prime implicants(Theorem 13). • Delete any fundamental product Pi which includes any other fundamental product Pj. (Permissible by the absorption law) • Add the consensus of any Pi and Pj providing Q does not include any of the Ps. (Permissible by Lemma 1) • Repeat 1 and/or 2 until neither can be applied.

  44. Consensus Method for Finding Prime Implicants Theorem 13: The consensus method will eventually stop, and then E will be the sum of its prime implicants. Example: E = xyz + x’z’ + xyz’ + x’y’z + x’yz’ Answer: E = x’z’ + xy + x’y’ + yz’ Therefore E is a sum of prime implicants, that is, x’z’ + xy + x’y’ + yz’

  45. Finding a Minimal Sum-of-Products Form Algorithm 2B: The input is a Boolean expression E = P1 + P2 + ... + Pm where the Ps are all the prime implicants of E. The output expresses E as a minimal sum-of-products. • Express each prime implicantP as a complete sum-of-products. • Delete one by one those prime implicants whose summands appear among the summands of the remaining prime implicants.

  46. Finding a Minimal Sum-of-Products Form Example: E = x’z’ + xy + x’y’ + yz’ Answer: E = xy + x’y’ + yz’

  47. Now, it’s time for the application part of the presentation... And at this point on, please bear with us because the discussion will be more technical... (@v@)

  48. Logic Gates and Circuits • Logic circuits (also known as logic networks) are structures which are built up from certain elementary circuits called logic gates. • Each logic circuit may be viewed as a machine L which contains one or more input devices and exactly one output device. • Each input device in L sends a signal, specifically a bit (binary digit), 0 or 1, to the circuit L, and L processes the set of bits to yield an output bit.

  49. Block Diagram Logic Circuit L Input/s Output

  50. Logic Gates • There are three basic logic gates: • OR gate • Denoted by a plus sign (addition) • The output of an OR gate is logic high (1) if at least one of the inputs is logic high (1), else the output is logic low (0). • AND gate • Denoted by an asterisk sign (multiplication) • The output of an AND gate is logic high (1) if all of the inputs are logic high (1), else the output is logic low (0). • NOT gate • Denoted by the prime (or a bar on top of the variable) • The output is logic high if the input is logic low and the output is logic low if the input if logic high.

More Related