Warmup Answer the following True/False questions in your head: I have brown hair AND I am wearing glasses I am male OR I am wearing sneakers I am NOT male.

Slides:



Advertisements
Similar presentations
TRUTH TABLES Section 1.3.
Advertisements

TRUTH TABLES The general truth tables for each of the connectives tell you the value of any possible statement for each of the connectives. Negation.
Constructing a Truth Table
Logic & Critical Reasoning
Chapter 3 section 2. Please form your groups The 1 st column represents all possibilities for the statement that can be either True or False. The 2 nd.
Software Testing Logic Coverage. Introduction to Software Testing (Ch 3) © Ammann & Offutt 2 Logic Coverage Four Structures for Modeling Software Graphs.
Logic ChAPTER 3 1. Truth Tables and Validity of Arguments
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 3.2 Truth Tables for Negation, Conjunction, and Disjunction.
DEDUCTIVE REASONING: PROPOSITIONAL LOGIC Purposes: To analyze complex claims and deductive argument forms To determine what arguments are valid or not.
Gates and Circuits. Three Main Gates  AND  OR  NOT.
2/17/2008Sultan Almuhammadi1 ICS Logic & Sets (An Overview) Week 1.
Boolean Algebra Computer Science AND (today is Monday) AND (it is raining) (today is Monday) AND (it is not raining) (today is Friday) AND (it is.
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
1. 2 Day 1Intro Day 2Chapter 1 Day 3Chapter 2 Day 4Chapter 3 Day 5Chapter 4 Day 6Chapter 4 Day 7Chapter 4 Day 8EXAM #1 40% of Exam 1 60% of Exam 1 warm-up.
Introduction to Software Testing Chapter 8.2
Propositional Logic 7/16/ Propositional Logic A proposition is a statement that is either true or false. We give propositions names such as p, q,
Homework 3.
Truth Tables for Negation, Conjunction, and Disjunction.
3.2 – Truth Tables and Equivalent Statements
Logic ChAPTER 3.
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 3.2 Truth Tables for Negation, Conjunction, and Disjunction.
Chapter 1 Section 1.4 More on Conditionals. There are three statements that are related to a conditional statement. They are called the converse, inverse.
Section 1-4 Logic Katelyn Donovan MAT 202 Dr. Marinas January 19, 2006.
CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.
BUILDING COMPUTER CIRCUITS prepared by Burak Galip ASLAN September, 2006 BOOLEAN LOGIC AND GATES CONTROL CIRCUITS.
Chapter 1 The Logic of Compound Statements. Section 1.1 Logical Form and Logical Equivalence.
Today’s Agenda  Quick Review  Finish Graph-Based Testing  Predicate Testing Software Testing and Maintenance 1.
Conditional Control Flow By Muhammad Ahsan Qadar SACS Programming Fundamentals Workshop 1.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Chapter 5 Decisions. Outline and Objectives Relational and Logical Operators If Blocks Select Case Blocks.
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
CSNB143 – Discrete Structure LOGIC. Learning Outcomes Student should be able to know what is it means by statement. Students should be able to identify.
Introduction to Software Testing Chapter 3.6 Disjunctive Normal Form Criteria Paul Ammann & Jeff Offutt
3.3: Truth Tables. Types of Statements Negation: ~p Conjunction: p ˄ q (p and q) Disjunction: p V q (p or q, or both) Conditional: p → q (if p, then q)
Boolean Algebra. Logical Statements A proposition that may or may not be true:  Today is Monday  Today is Sunday  It is raining.
Boolean Logic. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF.
Chapter 7 Logic, Sets, and Counting
Conditional Statements
CS1022 Computer Programming & Principles Lecture 1 Logic and Proof.
How do I show that two compound propositions are logically equivalent?
Review Given p: Today is Thursday q: Tomorrow is Friday
Truth Tables Geometry Unit 11, Lesson 6 Mrs. King.
Chapter 7 Logic, Sets, and Counting Section 1 Logic.
Logical Form and Logical Equivalence Lecture 1 Section 1.1 Wed, Jan 12, 2005.
Boolean Algebra Monday/Wednesday 7th Week. Logical Statements Today is Friday AND it is sunny. Today is Friday AND it is rainy. Today is Monday OR it.
IB Computer Science – Logic
Boolean Logic.
Simplifying Boolean Expressions. Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xyx XOR y FFF FTT TFT TTF xNOT x FT TF.
TRUTH TABLES. Introduction The truth value of a statement is the classification as true or false which denoted by T or F. A truth table is a listing of.
Notes - Truth Tables fun, fun, and more fun!!!!. A compound statement is created by combining two or more statements, p and q.
Introduction to Software Testing Chapter 3.6 Disjunctive Normal Form Criteria Paul Ammann & Jeff Offutt
CEC 220 Digital Circuit Design Boolean Algebra I Wed, Sept 2 CEC 220 Digital Circuit Design Slide 1 of 13.
Statement Forms and Material Equivalence Kareem Khalifa Department of Philosophy Middlebury College.
Introduction to Software Testing Chapter 3.6 Disjunctive Normal Form Criteria Paul Ammann & Jeff Offutt
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,
Fundamental Logic Gates And, Or, Not. Logic Gates: The Basics Regulate the flow of electricity within circuits to perform desired functionalities Each.
MATH 110 Sec 12-1 Lecture: Intro to Counting Introduction to Counting: Just how many are there?
Conditional Statements Lecture 2 Section 1.2 Fri, Jan 20, 2006.
Mathematics for Computing Lecture 2: Computer Logic and Truth Tables Dr Andrew Purkiss-Trew Cancer Research UK
TRUTH TABLES Edited from the original by: Mimi Opkins CECS 100 Fall 2011 Thanks for the ppt.
Welcome to Interactive Chalkboard Glencoe Geometry Interactive Chalkboard Copyright © by The McGraw-Hill Companies, Inc. Developed by FSCreations, Inc.,
CS 106 Logic and Conditionals (Boolean Expressions)
Aspatial Selection. Table Queries Table queries are a very common GIS aspatial operation Selects a subset of records based on values of specific attributes.
Section 3.2: Truth Tables for Negation, Conjunction, and Disjunction
Test #2 Practice MGF 1106 Summer 2011.
Logical Operators (Connectives) We will examine the following logical operators: Negation (NOT,  ) Negation (NOT,  ) Conjunction (AND,  ) Conjunction.
Introduction to Software Testing Chapter 8.2
Boolean logic Taken from notes by Dr. Neil Moore
Boolean logic Taken from notes by Dr. Neil Moore
LOGICAL EQUIVALENCES - DISCRETE MATHEMATICS.
Presentation transcript:

Warmup Answer the following True/False questions in your head: I have brown hair AND I am wearing glasses I am male OR I am wearing sneakers I am NOT male OR I am male

Boolean Logic Paul Bui Subject: Computer Science Level: High School

Warmup Extended x = I have brown hair y = I am wearing glasses I have brown hair AND I am wearing glasses x AND y What are all the possible combinations of T/F?

Warmup Extended x = I am male y = I am wearing sneakers I am male OR I am wearing sneakers x OR y What are all the possible combinations of T/F?

Boolean Operators (T/F) xyx AND y FF FT TF TT xyx OR y FF FT TF TT xNOT x F T

Boolean Operators (T/F) xyx AND y FFF FTF TFF TTT xyx OR y FFF FTT TFT TTT xNOT x FT TF

Boolean Operators (1/0) xyx AND y xyx OR y xNOT x 01 10

Warmup Reviewed x = I am male I am NOT male OR I am male (NOT x) OR x What are all the possible combinations of T/F?

Questions?

Boolean Operators Symbols OperatorSymbol NOTā (overbar), a’, ~a AND· (mult. dot) OR+

Boolean Expressions Follows a logical order of operations 1. Parentheses 2. NOT operators 3. AND 4. OR Example: x + y·z

Truth Tables Write out table of all possible combinations of truth values Evaluate the boolean expression for all combinations Example x + y·z xyz FFFF FFTF FTFF FTTT TFFT TFTT TTFT TTTT

Example What is the truth table for: ~x + y? xy~x + y FFT FTT TFF TTT

Another Example What is the truth table for: x · (~y)? xyx·(~y) FFF FTF TFT TTF

Your Turn What is the truth table for the boolean expression: x + ~y + z?