SlideServe
Menu
Préférences
© SlideServe · v2026

Chapter 9: Boolean Algebra

eydie avatar
11 diapositives · 402 Views · Apr 02, 2014

Chapter 9: Boolean Algebra. Disjunction and Conjunction:. 0 1. 0 1. ∨. ∧. 0 0 1. 0 0 0. 1 1 1. 1 0 1. Our Boolean expressions will use ' to represent negation. Reasoning Laws:.

Chapter 9: Boolean Algebra - slide 1
01 / 11Chapter 9: Boolean Algebra
1 / 17

Télécharger la présentation

Chapter 9: Boolean Algebra
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Chapter 9: Boolean Algebra Discrete Math for CS

  2. Discrete Math for CS Disjunction and Conjunction: 0 1 0 1 ∨ ∧ 0 0 1 0 0 0 1 1 1 1 0 1 Our Boolean expressions will use ' to represent negation.

  3. Discrete Math for CS Reasoning Laws: • Commutative: p ∧ q = q ∧ p and p ∨ q = q ∨ p • Associative: p ∧ ( q ∧ r ) = ( p ∧ q ) ∧ r p ∨ ( q ∨ r ) = ( p ∨ q ) ∨ r • Distributive: p ∧ ( q ∨ r ) = ( p ∧ q ) ∨(p ∧ r ) p ∨ ( q ∧ r ) = ( p ∨ q ) ∧(p ∨ r )‏ • Idempotent: p ∧ p = p and p ∨ p = p • Absorption: p ∧ ( p ∨ q ) = p and p ∨ ( p ∧ q ) = p • De Morgan: (p ∧ q ) ' = p' ∨ q' and (p ∨ q' ) = p' ∧ q'

  4. Discrete Math for CS Exercise: • Prove the Distributive Law p ∧ ( q ∨ r ) = ( p ∧ q ) ∨(p ∧ r )‏

  5. Discrete Math for CS Exercise: • Show that (p' ∧ q)' ∧ (p ∨ q) == p (p' ∧ q)' ∧ (p ∨ q) = (p'' ∨ q') ∧ (p ∨ q)‏ = (p ∨ q') ∧ (p ∨ q)‏ = p ∨ (q' ∧ q)‏ = p ∨ 0 = p

  6. Discrete Math for CS Boolean Function: • A boolean function, f, on n variables p1, p2, ..., pn is a function f: Bn --> B such that f(p1, p2, ..., pn) is a Boolean expression

  7. Discrete Math for CS Minterm: • Suppose a Boolean expression of 3 variables, p, q and r, has only one 1 in its columns of a truth table. This expression is therefore equivalent to a conjunction of p. p', q, q', r and r' that is true for the same row and false elsewhere. p q r f(p,q,r) ... 0 0 1 1 1 ... 0 So f(p,q,r) is equivalent to p' ∧ q ∧ r. Def: A minterm is a Boolean expression that has precisely one 1 in the final column of its truth table. The conjunction taht is equivalent to the minterm is called the product representation of the minterm.

  8. Discrete Math for CS Observation: • Any minterm m(p1, p2, ..., pn) can be represented as a conjunction of the variables pi or their negations. • A Boolean expression can be thought of as a disjunction of minterms. Writing it so is putting it in Disjunctive Normal Form.

  9. Discrete Math for CS Exercise: • Write the following in Disjunctive Normal Form f(p,q,r) = (p ∧ q) ∨ (q' ∧ r)‏ p q r f 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 p' ∧ q' ∧ r p ∧ q' ∧ r p ∧ q ∧ r' p ∧ q ∧ r f(p,q,r) = (p'∧q'∧r) ∨ (p∧q'∧r) ∨ (p∧q∧r') ∨ (p∧q∧r)

  10. Discrete Math for CS Complete Set of Operators • A Complete Set of Operators is a set of operators in which you can express every Boolean Expression. • The Disjunctive Normal Form construction shows us that (∨,∧,' ) is a Complete Set of Operators. • Show (∧,' ) is a Complete Set of Operators.

  11. Discrete Math for CS • Show NAND is a Complete Set of Operators. • It suffices to show we can write p', p ∨ q and p ∧ q using only NAND. p' = (p ∧ p)' = p NAND p p ∨ q = (p' ∧ q')' = ((p NAND p) ∧ (q NAND q))' = ((p NAND p) NAND (q NAND q))p ∧ q = ((p q)')' = (p NAND q) ' = (p NAND q) NAND (p NAND q)‏