1 / 70

Boolean Algebra

Boolean Algebra. Boolean algebra. Boolean algebra, like any other deductive mathematical system, may be defined with a set of elements , a set of operators , and a number of unproved axioms or postulates. A set of elements.

regis
Download Presentation

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. Boolean algebra • Boolean algebra, like any other deductive mathematical system, may be defined with • a set of elements, • a set of operators, and • a number of unproved axioms or postulates.

  3. A set of elements • A set of elements is any collection of objects having a common property. • If S is a set, and x and y are certain objects, • then xS denotes that x is member of the set S, and • ySdenotes that y is not an element of S. • a set with a denumerable (countable) number of elements is specified by braces: A = {1, 2, 3, 4}, i.e., the elements of set A are the numbers 1, 2, 3, and 4.

  4. operator • A binary operator defined on a set S of elements is a rule that assigns to each pair of elements from Sa unique element from S. • as an example, consider the relation a * b = c. • we say that * is a binary operator if it specifies a rule for finding c from the pair (a, b) and also if a, b, c S . • however, * is not a binary operator if a, b S, whereas the rule finds c  S.

  5. postulates • The postulates of a mathematical system form the basic assumptions from which it is possible to deduce the rules, theorem, and properties of the system. • The postulates are basic axioms of the algebraic structure and need no proof. • The theorem must be proven from the postulates.

  6. common postulates • The most common postulates used to formulate various algebraic structures are: 1. Closure - 2. Associative law - 3. Commutative law - 4. Identity element - 5. Inverse - 6. Distributive law -

  7. Closure • A set S is closed with respect to a binary operator if, for every pair of elements of S, the binary operator specifies a rule for obtaining a unique element of S. • for example, the set of natural numbers N = { 1, 2, 3, …} is closed with respect to the binary operator plus (+) by the rules of arithmetic addition, since for any a, b N we obtain a unique c N by the operation a + b = c. • the set of natural numbers is not closed with respect to the binary operator minus (-) by the rules of arithmetic subtraction because 2-3 = -1 and 2,3 N , while -1N.

  8. Associative law • A binary operator * on a set S is said to be associative whenever (x * y) * z = x * (y * z) for all x, y, z  S associative - causing association. - Independent of the grouping of elements.

  9. Commutative law • A binary operator * on a set S is said to be commutative whenever x * y = y * x for all x, y  S commute - to make substitution or exchange commutative - exchangeable

  10. Identity element • A set S is said to have an identity element with respect to binary operation * on S if there exists an element e  S with the property e * x = x * e = x for every x  S Example: the element 0 is an identity element with respect to operation + on the set of integers I = { …, -2, -1, 0, 1, 2, ….} since x + 0 = 0 + x = x for any x  I The set of natural numbers N has no identity element since 0 is excluded from the set.

  11. 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  S, there exists an element y  S such that x * y = e for every x  S Example: In the set if integers I with e = 0, the inverse of an element a is (-a) since a + (-a) = 0. Example: In the set if biniry digits B with e = 1, the inverse of an element a is (a’) since a + (a’) = 1. Example: In the set if biniry digits B with e = 0, the inverse of an element a is (a’) since a . (a’) = 0.

  12. Distributive law • If * and . are two binary operators on a set S, * is said to be distributive over . whenever x * (y . z) = (x * y) . (y * z)

  13. Axiomatic definition of Boolean Algebra • In 1854 George Boole introduced a systematic treatment of logic and developed for this purpose an algebraic system called Boolean Algebra. • In 1938 C.E. Shanon introduced a two-valued Boolean algebra called Switching Algebra, in which he demonstrated the the properties of bistable electrical switching circuits can be represented by this algebra. • For the formal definition of Boolean algebra, we shall employ the postulates formulated by E. V. Huntington in 1904.

  14. Axiomatic definition of Boolean Algebra • Boolean Algebra is an algebraic structure defined on a set of elements B together with two binary operators + and . Provided the following (Huntington) postulates are satisfied: 1. (a) Closure with respect to the operator + (b) Closure with respect to the operator . 2. (a) An identity element with respect to the operator + , designated by 0: x + 0 = 0 + x = x (b) An identity element with respect to the operator . , designated by 1: x . 1 = 1 . x = x 3. (a) Commutative with respect to +: x + y = y + x (b) Commutative with respect to .: x . y = y . x 4. (a) . is distributive over +: x . (y + z) = (x . y) + (x . z) (b) + is distributive over .: x + (y . z) = (x + y) . (x + z) 5. For every element x B, there exists an element x’ B (called the complement of x) such that (a) x + x’ = 1 and (b) x . x’ = 0 6. There exists at least two elements x,yB such that x  y

  15. Boolean algebra vs. arithmetic algebra • Comparing Boolean algebra with arithmetic and ordinary algebra ( the field of real numbers), we note the following differences: 1. Huntington postulates do not include the associative law. However, this law holds for Boolean algebra and can be derived (theorem, for both operators) from the other postulates. 2. The distributive law of + is distributive over . : x + (y . z) = (x + y) . (x + z), valid for Boolean algebra, but not for ordinary algebra. 3. Boolean algebra does not have additive or multiplicative inverses; therefore, there are no subtraction or division operations. 4. Postulate 5 defines an operator called complement that is not available in ordinary algebra. 5. Ordinary algebra deals with the real numbers, which constitute an infinite set of elements. Boolean algebra deals with the as yet undefined set of elements B, but in the two-valued Boolean algebra, B is defined as a set with only two elements, 0 and 1.

  16. similarity • The choice of symbols + and . is intentional to facilitate Boolean algebraic manipulations.

  17. Requirements • In order to have a Boolean Algebra, one must show: 1. The elements of the set B, 2. the rules of operation for the two binary operators, and 3. that the set of elements B, together with the two operators, satisfies the six Huntington postulates. • One can formulate many Boolean algebras, depending on the choice of elements of B and the rules of operation.

  18. Two-valued Boolean Algebra • A two-valued Boolean algebra is defined on a set of two elements, B = {0, 1}, with rules for the two binary operators + and . As shown in the following operator tables. The rule for the complement operator is for verification of postulate 5: • We are interested in a two-valued Boolean algebra to apply to gate-type circuits.

  19. Switching Algebra

  20. Switching Algebra • The two-valued Boolean algebra is also called “Switching algebra” by engineers and computer scientists.

  21. Two-valued Boolean Algebra 1. Closure is obvious from the tables since the result of each operation(+and .) is either 1 or 0 and 1,0B 2. From the tables we see that (a) 0 + 0 = 0 0 + 1 = 1 + 0 = 1 identity 0 for + (b) 1 . 1 = 1 1 . 0 = 0 . 1 = 0 identity 1 for . 3. (a) Commutative with respect to +: x + y = y + x holds (b) Commutative with respect to .: x . y = y . x holds 4. (a) . is distributive over +: x . (y + z) = (x . y) + (x . z) holds (b) + is distributive over .: x + (y . z) = (x + y) . (x + z) holds 5. For every element x B, there exists an element x’ B (called the complement of x) such that (a) x + x’ = 1 and (b) x . x’ = 0 6. There exists at least two elements x,yB such that x  y Boolean algebra has two distinct elements, 1 and 0 with 10

  22. Switching algebra • “switching algebra” • deals with boolean values -- 0, 1 • Positive-logic convention • analog voltages LOW, HIGH --> 0, 1 • Negative logic -- seldom used • Signal values denoted by variables(X, Y, FRED, etc.)

  23. Boolean operators • Complement: X¢ (opposite of X) • AND: X × Y • OR: X + Y • Axiomatic definition: A1-A5, A1¢-A5¢ binary operators, describedfunctionally by truth table.

  24. More definitions • Literal: a variable or its complement X, X¢, FRED¢, CS_L • Expression: literals combined by AND, OR, parentheses, complementation X+Y P × Q × R A + B × C ((FRED × Z¢) + CS_L × A × B¢× C + Q5) × RESET¢ • Equation: Variable = expression P = ((FRED × Z¢) + CS_L × A × B¢× C + Q5) × RESET¢

  25. Logic symbols

  26. Theorems with one variable • Proofs by perfect induction

  27. Theorems with two or more variables

  28. Theorems

  29. Complement notations ~x x’ x x x’ prime notation is the easiest to type.

  30. The proofs of the theorems or, by other theorems or postulates x + x.y = x x + x.y = x.1+x.y = x.(1+y) = x.1 = x or, by perfect induction x + x.y = x + x .1 = x + x .0 = x + x = x + 0 = x = x

  31. Duality • The Huntington postulates have been listed in pairs and designated by part (a) and part (b). • One part may be obtained from the other if the binary operators and the identity elements are interchanged. • This important property of Boolean algebra is called the duality principle. • Every algebraic expression deductible from the postulates of Boolean algebra remain valid if the operators and identity elements are interchanged • Note: before taking its dual parenthesize an expression fully, otherwise you might end up absurd result.

  32. Duality • Swap 0 and 1, AND and OR • Result: Theorems still true X + 0 = X; X . 1 = X • Counterexample:X + X × Y = X (T9)X × X + Y = X (dual)X + Y = X (T3¢)???????????? X + (X×Y) = X (T9)X× (X + Y) = X (dual)(X× X) + (X× Y) = X (T8)X+ (X× Y) = X (T3¢) parentheses,operator precedence!

  33. Operator precedence 1. Parentheses 2. NOT 3. AND 4. OR

  34. N-variable Theorems • Prove using finite induction • Most important: DeMorgan’s theorems

  35. DeMorgan’s theorem • An n-input AND gate whose output is complementedis equivalent to an n-input OR gate whose inputs are complemented. (x . y)’ = x’ + y’

  36. DeMorgan Symbol Equivalence

  37. Likewise for OR

  38. DeMorgan Symbols

  39. Boolean function • A Boolean function is an expression formed with binary variables, the binary operators OR and AND, and unary operator NOT, parentheses, and an equal sign. • For a given value of the variables, the function can be either 0 or 1. F = x . Y . z’

  40. Simplify a Boolean function F = x.(x’ + y) = x.x’ + x.y = 0 + x.y = x.y F = x.y + x’.z + y.z consensus, T11 = x.y + x’.z + y.z.(x + x’) = x.y + x’.z + y.z.x + y.z.x’ = x.y.(1 + z) + x’.z.(1 + y) = x.y + x’.z

  41. Simplify a Boolean function F = x’.y.(z + y’x) + y’.z distributive . over + = x’.y. z + x’.y.y’.x + y’.z = x’.y. z + 0 + y’.z = z.(x’.y + y’) distributive + over . = z.((x’ + y’).(y + y’)) = z.((x’ + y’). 1) = z.(x’ + y’) = z.x’ + z.y’

  42. Simplify a Boolean function F = a.b.c + a.b.d + a’.b.c’ + c.d + b.d’ = a.b.c + b.(d’ + a.d) + a’.b.c’ + c.d = a.b.c + b.((a+d’).(d’ + d ) + a’.b.c’ + c.d = a.b.c + b.((a+d’).1) + a’.b.c’ + c.d = a.b.c + a.b + bd’ + a’.b.c’ + c.d = a.b.c + a.b + a’.b.c’ + bd’ + c.d = a.b.c + b.(a + a’.c’) + bd’ + c.d = a.b.c + b.(a + c’) + bd’ + c.d = a.b + b.c’ + a.b.c + bd’ + c.d = a.b + b.(c’ + a.c) + bd’ + c.d = a.b + b.(c’ + a) + bd’ + c.d = a.b + b.c’ + a.b + bd’ + c.d = a.b + b.c’ + b.d’ + c.d = a.b + b.(c’ + d’) + c.d = a.b + b.(c.d)’ + c.d = a.b + b + c.d = b + c.d

  43. Truth table • The most basic representation of a logic function is the truth table. • This representation simply lists the output of the circuit for every possible input combination. • Normally, the input combinations are arranged in rows in ascending order, and the corresponding outputs are written in a column next to the rows. • The truth table for an n-variable logic function has 2n rows. • Obviously truth tables are practical for logic functions with small n. • John Wakerly mentioned that for students it is about 10 and for everyone else it is about 4.

  44. Truth table • The information contained in a truth table can also be conveyed algebraically.

  45. Even more definitions (Sec. 4.1.6) • Literal - is a variable or complement of a variable X, X’, Y, Y’, FRED, FRED’ • Product term - a logical product of two or more literals X, X.Y, X.Y.Z’ • Sum-of-products expression -a logical sum of product terms X + X.Y + X.Y.Z’ • Sum term - a logical sum of two or more literals X, X+Y, X+Y+Z’ • Product-of-sums expression - a logical product of sum terms X . X+Y . X+Y+Z’

  46. Even more definitions (Sec. 4.1.6) • Normal term - a product or sum term in which no variables more than once X .Y . X+Y+Z’ normal X.X.Y + X.Y.Z’ not normal • Minterm (n variables) - a normal product term (1s) with n literals; 2n such terms 0 0 0, 0 0 1 truth table rows X’.Y’.Z’, X’.Y’.Z 3-variable minterms (1s) • Maxterm (n variables) - a normal sum term (0s) with n literals; 2n such terms 0 0 0, 0 0 1 truth table rows X+Y+Z, X+Y+Z’ 3-variable maxterms (0s)

  47. Truth table vs. minterms & maxterms

  48. Minterm and Maxterm • Each minterm is obtained from an AND term of the n variables, with each variable being primed if the corresponding bit of the binary number is a 0 and unprimed if a 1. • Each maxterm is obtained from an OR term of the n variables, with each variable being unprimed if the corresponding bit of the binary number is a 0 and primed if a 1.

  49. Boolean function from truth table • A Boolean function may be expressed algebraically from a given truth table by forming a minterm for each combination of the variables that produces a 1in the function, and then taking the OR of all those terms. • Any Boolean function can be expressed as a canonical sum (sum of minterms). • Any Boolean function can be expressed as a canonical product (product of maxterms).

  50. Minterm and maxterm i • Minterm i to denote the minterm corresponding to row i of the truth table. m0 = X’.Y’.Z’ truth table value is 0 0 0 m1 = X’.Y’.Z truth table value is 0 0 1 • Maxterm i to denote the maxterm corresponding to row i of the truth table. M0 = X+Y+Z truth table value is 0 0 0 M1 = X+Y+Z’ truth table value is 0 0 1

More Related