1 / 14

Boolean Algebra

Boolean Algebra. Supplementary material. A Boolean algebra. B is a boolean algebra means B is a set with elements in it a,b,…,0,1Є B and operators * (and), + (or) and ‘ (not) following the axioms Closure: if a,b Є B then a+b Є B , a*b Є B and a’ Є B

vern
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 Supplementary material

  2. A Boolean algebra • B is a boolean algebra means B is a set with elements in it a,b,…,0,1Є B and operators * (and), + (or) and ‘ (not) following the axioms • Closure: if a,b Є B then a+b Є B , a*b Є B and a’ Є B • Commutative: if a,b Є B then a+b=b+a and a*b=b*a • Distributive: if a,b,c Є B thena*(b+c)=a*b+a*c and a+(b*c) =(a+b)*(a+c) • Identitity elements: there are elements 0,1 Є B such that 1*a=a and 0+a=a • Complementary Law: for aЄ B a+a’=1 and a*a’=0

  3. Theorems (to prove) • Associative law. For a,b,c Є B a*(b*c)=(a*b)*c and a+(b+c)=(a+b)+c • Idempotent property: for a Є B, a+a=a and a*a=a • Identity elements act as null elements: For a Є B, a+1=1 and a*0=0 • Involution: For a Є B, (a’)’ =a • Absorption: for a,b Є B, a+(a*b)=a and a*(a+b)=a • DeMorgan’s Laws: for a,b Є B, (a*b)’=a’+b’ and (a+b)’=a’*b’

  4. Some sample proofs • a+a=a • Proof: • a=0+a • =a*a’+a • =a+a*a’ • (a+a)*(a+a’) • (a+a)*1 • a+a

  5. More sample proofs • a+1=1 • Proof: • 1=a+a’ • =a+1*a’ • =(a+1)*(a+a’) • =(a+1)*1 • 1*(a+1) • a+1

  6. Sample proofs continued • a*0=0 • Proof • a*0=0+a*0 • a*a’+a*0 • a*(a’+0) • a*(0+a’) • a*a’ • 0

  7. Absorption: proof of one of them • a+a*b=a • Proof • a+a*b=1*a+a*b • =a*1+a*b • =a*(1+b) • =a*1 • =1*a • =a

  8. DeMorgan • (a*b)’=a’+b’ • proof: • This is a complicated proof that requires two parts. • Notice that the theorem seems to say that if you negate the parenthesized expression on the LHS you wind up with the RHS, sort of like x’=z, (which is something like saying the negation of x is z). We might use this idea. First, x and z should behave like “opposites”, that is, if we take x and + it with z we should get 1 and x*z should be 0. • Also, we’ll need to show that if two booleans behave this way, then they are “opposites”, that is, if x+z=1 and x*z=0 then x’=z

  9. DeMorgan continued • Show if x+z=1 and x*z=0 then x’=z. • (proof) • x’ =1*x’ • =(x+z)*x’ • =x’*(x+z) • =x’*x+x’*z • =0+x’*z • x*z+x’*z • z*(x+x’) • z

  10. Completeness • A set of operators is complete iff all switching functions of n variables can be written using only that set. • The set {*,+,’} is complete. • DNF==SOP and CNF==POS are canonical representations of switching functions. They use the idea of Duals – one is the dual of the other.

  11. Generating switching functions using DNF • Start with the table for f • For each row in f which has a value of 1, generate one term in the DNF and put an ‘or’ symbol (+) between each term. • Generate the terms as follows, if the variable v is a 0 in this row, put v’ into the product, if v is a 1 in this row, put v in the product.

  12. Example f(a,b,c)

  13. DNF (or POS) for f • f’s DNF has 4 terms, corresponding to the numerical values – rows - 0, 4, 5, 6 • f=a’*b’*c’+a*b’*c’+a*b’*c+a*b*c’

  14. CNF • To get the cnf use the dual concept. Generate a term (a sum, though) for each 0-valued row of f. For variable v a 0 add v to the sum, if v is a 1 add v’ to the sum. Conjunct all terms.

More Related