Copyright © 2007-2010 Curt Hill Truth Tables A way to show Boolean Operations.

Slides:



Advertisements
Similar presentations
Logic & Critical Reasoning
Advertisements

Computer Science 210 Computer Organization Introduction to Logic Circuits.
PROOF BY CONTRADICTION
Sahar Mosleh PageCalifornia State University San Marcos 1 Introductory Concepts This section of the course introduces the concept of digital circuits and.
Introduction to Theorem Proving
CSE 311: Foundations of Computing Fall 2013 Lecture 3: Logic and Boolean algebra.
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 3.2 Truth Tables for Negation, Conjunction, and Disjunction.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 3 Syntax of Propositional Logic Parse trees revised Construction of parse trees Semantics of propositional.
Uses for Truth Tables Determine the truth conditions for any compound statementDetermine the truth conditions for any compound statement Determine whether.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
1 Inference Rules and Proofs Z: Inference Rules and Proofs.
Chapter 9: Boolean Algebra
Copyright © Cengage Learning. All rights reserved. CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS THE LOGIC OF COMPOUND STATEMENTS.
Introduction to Logic Logical Form: general rules
The Language of Propositional Logic The Syntax and Semantics of PL.
3.2 – Truth Tables and Equivalent Statements
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 3.2 Truth Tables for Negation, Conjunction, and Disjunction.
Discrete Math – Logic Unit
XOR and XNOR Logic Gates. XOR Function Output Y is TRUE if input A OR input B are TRUE Exclusively, else it is FALSE. Logic Symbol  Description  Truth.
Chapter 1 The Logic of Compound Statements. Section 1.1 Logical Form and Logical Equivalence.
Copyright © Curt Hill Using Propositional Logic Several applications.
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7.1 – 7.2 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean.
Copyright © Curt Hill Mathematical Logic An Introduction.
Module Code MA1032N: Logic Lecture for Week Autumn.
Chapter 7 Logic, Sets, and Counting
Truth Tables Geometry Unit 11, Lesson 6 Mrs. King.
Thinking Mathematically
Chapter 7 Logic, Sets, and Counting Section 1 Logic.
Logical Form and Logical Equivalence Lecture 1 Section 1.1 Wed, Jan 12, 2005.
Disjunctive Normal Form CS 270: Math Foundation of CS Jeremy Johnson.
The Foundations: Logic and Proof, Sets, and Foundations PROPOSITIONS A proposition is a declarative sentence that is either True or False, but not the.
Logic UNIT 1.
Copyright © Curt Hill Proofs An Introduction.
Propositional Equivalence A needed step towards proofs Copyright © 2014 Curt Hill.
Joan Ridgway. If a proposition is not indeterminate then it is either true (T) or false (F). True and False are complementary events. For two propositions,
Copyright Curt Hill Euler Circles With Venn Diagrams Thrown in for Good Measure.
Copyright © Curt Hill Minimization Arbitrary Truth Table to Minimal Function.
Thinking Mathematically Logic 3.4 Truth Tables for the Conditional and Biconditional.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
 Statement - sentence that can be proven true or false  Truth value – true or false  Statements are often represented using letters such as p and q.
Section 3.2: Truth Tables for Negation, Conjunction, and Disjunction
 Conjunctive Normal Form: A logic form must satisfy one of the following conditions 1) It must be a single variable (A) 2) It must be the negation of.
Propositional Logic (a.k.a. Sentential Logic)
Truth Table to Statement Form
Computer Science 210 Computer Organization
The Foundations: Logic and Proofs
Propositional Equivalence
AND.
DISCRETE MATHEMATICS CHAPTER I.
Thinking Mathematically
CHAPTER 3 Logic.
Truth Tables for Negation, Conjunction, and Disjunction
Classwork/Homework Classwork – Page 90 (11 – 49 odd)
Boolean logic Taken from notes by Dr. Neil Moore
Computer Science 210 Computer Organization
1.2 Propositional Equivalences
Propositional Equivalences
Information Technology Department
TRUTH TABLES.
Logical Truth To show a statement A is a logic truth (tautology) ...
1.2 Propositional Equivalences
Lecture 5 Binary Operation Boolean Logic. Binary Operations Addition Subtraction Multiplication Division.
Statements of Symbolic Logic
Foundations of Discrete Mathematics
Section 3.2 Truth Tables for Negation, Conjunction, and Disjunction
Copyright © Cengage Learning. All rights reserved.
CHAPTER 3 Logic.
Logical truths, contradictions and disjunctive normal form
Presentation transcript:

Copyright © Curt Hill Truth Tables A way to show Boolean Operations

Copyright © Curt Hill Definition A table that contains the output of a function for every possible input A unary function may only have two possible inputs so needs only two rows A binary function has four

Copyright © Curt Hill Example p q T T T T F F F F p  q T T T FF F F T p  qp  q T T T F ¬p  q T F F F

Copyright © Curt Hill Uses We use truth tables to define our functions –Then they have one column for each input and one column for output We also use them to construct our complicated functions

Copyright © Curt Hill Construction of Complicated Truth Tables For the most part we can write down simple conjunction and disjunction functions Larger functions turn out to be harder We just create separate columns for the smaller parts Thus our table is created left to right

Copyright © Curt Hill Consider p  ¬(q  p) First write the table of inputs Next write q  p Then ¬(q  p) –Use the previous column as input Finally the whole expression –Use the last column and the p as inputs

Copyright © Curt Hill Table of Inputs p q T T T T F F F F

Copyright © Curt Hill (q  p) p q T T T T F F F FF F F T q  p

Copyright © Curt Hill ¬(q  p) p q T T T T F F F FF F F T q  p¬(q  p) F T T T

Copyright © Curt Hill p  ¬(q  p) p q T T T T F F F FF F F T q  p¬(q  p) F T T T p  ¬(q  p) T T T T

Copyright © Curt Hill Discussion A truth table column with all True is called a tautology A truth table column with all False is a contradiction The problem with truth tables is the size: –3 variables 8 rows –4 variables 16 rows –5 variables 32 rows

Example Lets try a big one on the board (p  r  ¬s)  ¬(q  r) Copyright © Curt Hill

Generation Generating a truth table from an expression may be tedious but certainly possible What about the reverse? Suppose we have a truth table and we would like the logical expression: how is this done? Copyright © Curt Hill

Finding the expression Look only at rows that have a true for the expression Create an expression for each variable in the row –The expression is just the variable if the variable is true –The expression is negated if false –All of these are ANDed together Or the resulting expressions Copyright © Curt Hill

Example Two rows have trues First row needs q  p Last row needs ¬q  ¬p Final expression is (q  p)  (¬q  ¬p) This could be simplified, but it is a start Copyright © Curt Hill p q T T T T F F F FT F F T

One more Lets try this on a four variable On the board Copyright © Curt Hill

Proofs The truth table may be the basis of a proof It is often quite cumbersome One column for sub-expressions An equivalence should end up with two columns the same Let try the converse p  q  q  p What we want are two different columns Copyright © Curt Hill