Download presentation

Presentation is loading. Please wait.

Published byZachariah Keyes Modified over 2 years ago

1
**Presented by: Ms. Maria Estrellita D. Hechanova, ECE**

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
**LOGIC CIRCUITS!!! An introduction**

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

8
Wait!! Before everything else, let us first learn how to count using the “non-decimal” number system!!!

9
**We have other number systems other than the counting numbers...**

The counting number we know of is called DECIMAL... Other number systems... BINARY OCTAL HEXADECIMAL

10
Basic Definition Let B be a nonempty set with two binary operations + (or) and * (and), a unary operation ‘(not), and two distinct elements 0 and 1. Then B is called a Boolean algebra if the following axioms hold where a, b, c are any elements in B.

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

12
**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

13
**To give us a clearer view...**

Let a be the values on the column side and b be the values on the row side. + 1 Column 1 1 1 1 Row

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

15
**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!! ‘ 1 1

16
**Base on the outputs of the truth tables, what did you notice?**

+ or * and ‘ not

17
**Subalgebras and Isomorphic Boolean Algebras**

Suppose C is a nonempty subset of a Boolean algebra B. We say C is a subalgebra of B if C itself is a Boolean algebra (with respect to the operations of B). We note that C is a subalgebra of B iff C is closed under the three operations of B, i.e., +,*, and ‘.

18
**Subalgebras and Isomorphic Boolean Algebras**

Two Boolean algebras B and B’ are said to be isomorphic if there is a one-to-one correspondence f:B B’ which preserves the three operations. f(a+b) = f(a) + f(b) f(a*b) = f(a) * f(b) f(a’) = f(a)’ for any elements, a, b, in B

19
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

20
Basic Theorems Theorem 2: Idempotent Laws: a+a = a a*a = a Theorem 3: Boundedness Laws: a+1 = 1 a*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)

21
**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’

22
**Let’s prove these theorems!!! **

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

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

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

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

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

28
**Representation Theorem**

Say, x = a1 + a 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.

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

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

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

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

33
**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. Let E be any Boolean expression. A sum-of-products form of E is an equivalent Boolean sum-of-products expression.

34
**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

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

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

37
**Let’s try to simplify this expression...**

E = ((xy)’z)’((x’+z)(y’+z’))’ Answer: E = xyz +xz’

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

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

40
**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’

41
**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

42
**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

43
**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 = = 14 ES = 4

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

45
**Therefore, xz’ is a prime implicant of E.**

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.

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

47
**Consensus of Fundamental Products**

Let P1 and 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.

48
**Consensus of Fundamental Products**

Example: Find the consensus Q of P1 and P2. P1 = xyz’s and P2 = xy’t Q = xz’s * xt Q = xz’st P1 = xy’ and P2 = y Q = x * 1 Q = x

49
**Consensus Method for Finding Prime Implicants**

Algorithm 2A (Consensus Method): The input is a Boolean expression E = P1 + P 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.

50
**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’

51
**Finding a Minimal Sum-of-Products Form**

Algorithm 2B: The input is a Boolean expression E = P1 + P Pm where the Ps are all the prime implicants of E. The output expresses E as a minimal sum-of-products. Express each prime implicant P as a complete sum-of-products. Delete one by one those prime implicants whose summands appear among the summands of the remaining prime implicants.

52
**Finding a Minimal Sum-of-Products Form**

Example: E = x’z’ + xy + x’y’ + yz’ Answer: E = xy + x’y’ + yz’

53
**Now, it’s time for the application part of the presentation**

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

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

55
Block Diagram Logic Circuit L Input/s Output

56
**Logic Gates There are three basic logic gates: OR gate AND 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.

57
OR Gate If at least one of the inputs has a value of logic high (1) , the output is logic high (1). Else, the output is logic low (0)

58
AND Gate If all of the inputs has a value of logic high (1) , the output is logic high (1). Else, the output is logic low (0)

59
NOT Gate If the input is logic high (1), the output is logic low (0). And, vice versa.

60
**Integration of AND, OR, and NOT gates.**

Logic Circuit Integration of AND, OR, and NOT gates.

61
**Logic Circuits as Boolean Algebra**

Since that the truth tables for the OR, AND, and NOT gates are respectively equal to the truth tables for the propositions disjunction, conjunction, and negation, the logic circuit satisfy the same laws as do propositions and hence form a Boolean algebra. Theorem 14: Logic circuits form a Boolean algebra. Accordingly, all terms used with Boolean algebra may be used with out logic circuits.

62
AND-OR Circuits This logic circuit corresponds to a Boolean sum-of-products. Some of the inputs or their complement are fed into each AND gate. The outputs of all the AND gates are fed into a single OR gate. The output of the OR gate is the output of the circuit.

63
**NAND and NOR Gates NAND Gate NOR Gate**

Equivalent to an AND gate followed by a NOT gate. NOR Gate Equivalent to an OR gate followed by a NOT gate

64
**Truth Tables and Boolean Functions**

2n possible input combinations, where n is the number of inputs of the circuit. Example: Y = abc + ab’c + a’b n = 3 2n = 23 = 8 (there are 8 possible combinations for the input) Y will be having 8 outputs based on the combination of the inputs

65
Truth Tables Algorhm 3: The input is a Boolean sum-of-products expression Y = Y (A1, A2, ..., An). Write down the special sequences for the inputs A1, A2, ..., An and their complements. Find each product appearing in Y. Find the sum Y of the products.

66
Truth Tables

67
Boolean Functions Let E be a Boolean expression with n variables x1, x2, ..., xn. The entire discussion above can be applied to E where now the special sequences are assigned to the variables x1, x2, ..., xn instead of the input devices A1, A2, ..., An. The truth table T = T(E) of E is defined in the same way as the truth table T = T (L) for logic circuit L. Example: E = xyz + xy’z + x’y T ( , , ) = T(E) =

68
Karnaugh Map (K-Map) Pictorial devices for finding prime implicants and minimal forms for Boolean expressions involving at most six (6) variables. Two fundamental products are said to be adjacent if both have the same variables and if they differ in exactly one literal. Therefore, there must be an uncomplemented variable in one product and complemented in the other. The sum of two such adjacent products will be a fundamental product with one less literal.

69
Karnaugh Map (K-Map) Case of Two Variables:

70
Karnaugh Map (K-Map) Case of Three Variables:

71
Karnaugh Map (K-Map) Case of Four Variables:

72
Karnaugh Map (K-Map) Examples: Find the prime implicants and a minimal sum-of-products form for each of the following complete sum-of-products Boolean expressions: E1 = xy + xy’ E2 = xy + x’y + x’y’ E3 = xy + x’y’ E4 = xyz + xyz’ + x’yz’ + x’y’z E5 = xyz + xyz’ + xy’z + x’y’z E6 = xyz + xyz’ + x’yz’ + x’y’z’ + x’y’z E7 = xy’ + xyz + x’y’z’ + x’yzt’

73
Let’s try this one... Problem: Design a three input minimal AND-OR circuit L with the following table: T = [A, B, C; L] = [ , , ; ]

74
**That ends our presentation...**

But wait!! We have included problems for you to practice on with... Thank you for the time... Hope you learned something from our presentation!!

75
Sources: Schaum’s Outlines: Discrete Mathematics 2nd Edition, by Lipschutz and Lipson, 1997. Digital Computer Electronics, by Malvino, 1977. Schaum’s Outline Series: Theory and Problems of Introduction to Computer Science, by Scheid, 1970.

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google