Chapter 9: Boolean Algebra

Slides:



Advertisements
Similar presentations
Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions + solutions)
Advertisements

CS1022 Computer Programming & Principles
CS2100 Computer Organisation
Disjunctive Normal Form CS 680: Formal Methods Jeremy Johnson.
Logic Gate Level Part 2. Constructing Boolean expression from truth table First method: write nonparenthesized OR of ANDs Each AND is a 1 in the result.
1 Inference Rules and Proofs Z: Inference Rules and Proofs.
Boolean Algebra Module M4.1 Section 5.1. Boolean Algebra and Logic Equations Switching Algebra Theorems Venn Diagrams.
Chapter 4 Logic Gates and Boolean Algebra. Introduction Logic gates are the actual physical implementations of the logical operators. These gates form.
Boolean Algebra Computer Organization 1 © McQuain Boolean Algebra A Boolean algebra is a set B of values together with: -two binary operations,
Chapter 10.1 and 10.2: Boolean Algebra Based on Slides from Discrete Mathematical Structures: Theory and Applications.
Normal or Canonical Forms Rosen 1.2 (exercises). Logical Operators  - Disjunction  - Conjunction  - Negation  - Implication p  q   p  q  - Exclusive.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
Copyright © Curt Hill Truth Tables A way to show Boolean Operations.
CS1502 Formal Methods in Computer Science
Propositional Equivalences
Apr. 3, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 3: Review of Digital Circuits and Logic Design Jeremy R. Johnson Mon. Apr.
CS1Q Computer Systems Lecture 6 Simon Gay. Lecture 6CS1Q Computer Systems - Simon Gay2 Algebraic Notation Writing AND, OR, NOT etc. is long-winded and.
September1999 CMSC 203 / 0201 Fall 2002 Week #1 – 28/30 August 2002 Prof. Marie desJardins.
Discrete Mathematics CS 2610 February 12, Agenda Previously Finished functions Began Boolean algebras And now Continue with Boolean algebras.
Thinking Mathematically
Section 1.2: Propositional Equivalences In the process of reasoning, we often replace a known statement with an equivalent statement that more closely.
Extra slides for Chapter 3: Propositional Calculus & Normal Forms Based on Prof. Lila Kari’s slides For CS2209A, 2009 By Dr. Charles Ling;
Discrete Mathematics CS 2610 September Equal Boolean Functions Two Boolean functions F and G of degree n are equal iff for all (x 1,..x n )  B.
+ CS 325: CS Hardware and Software Organization and Architecture Gates and Boolean Algebra Part 3.
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
CS1Q Computer Systems Lecture 6 Simon Gay. Lecture 6CS1Q Computer Systems - Simon Gay2 Algebraic Notation Writing AND, OR, NOT etc. is long-winded and.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 9 Boolean Algebras and Combinatorial Circuits.
Symbolic Logic The Following slide were written using materials from the Book: The Following slide were written using materials from the Book: Discrete.
The Logic of Boolean Connectives Chapter 4 Language, Proof and Logic.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Introduction to Logic © 2008 Pearson Addison-Wesley.
CS2100 Computer Organisation
2. The Logic of Compound Statements Summary
Logic Gates and Boolean Algebra
De Morgan’s Theorem,.
The Foundations: Logic and Proofs
Propositional Equivalence
AND.
CSE15 Discrete Mathematics 01/23/17
DISCRETE MATHEMATICS CHAPTER I.
Thinking Mathematically
Truth Tables and Equivalent Statements
Logical Equivalence of Propositions
CHAPTER 2 Boolean Algebra
Discussion #10 Logical Equivalences
CSE 2353 – September 4th 2002 Logic.
Boolean Algebra A Boolean algebra is a set B of values together with:
Boolean Algebra A Boolean algebra is a set B of values together with:
Disjunctive Normal Form
Jeremy R. Johnson Wed. Sept. 29, 1999
Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan
CSE 311 Foundations of Computing I
Propositional Calculus: Boolean Algebra and Simplification
Discrete Mathematics CS 2610
Propositional Equivalences
CSE 370 – Winter Combinational Logic - 1
CS 220: Discrete Structures and their Applications
Propositional Equivalences
Chapter 10.1 and 10.2: Boolean Algebra
Chapter 10.1 and 10.2: Boolean Algebra
TRUTH TABLES.
Representing Boolean Functions
TRUTH TABLES continued.
Chapter 2 Introduction to Logic Circuits
Disjunctive Normal Form
Chapter 3 Introduction to Logic 2012 Pearson Education, Inc.
Faculty of Cybernetics, Statistics and Economic Informatics
Foundations of Discrete Mathematics
The Foundations: Logic and Proofs
Boolean Algebra.
Presentation transcript:

Chapter 9: Boolean Algebra 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. Discrete Math for CS

Commutative: p ∧ q = q ∧ p and p ∨ q = q ∨ p 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' Discrete Math for CS

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

Show that (p' ∧ q)' ∧ (p ∨ q) == p 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 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 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. 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. Discrete Math for CS

Write the following in Disjunctive Normal Form 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) 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. 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)‏ Discrete Math for CS