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

Slides:



Advertisements
Similar presentations
Constructing a Truth Table
Advertisements

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.
Tutorial 1: Logic Peter Poon. Self Introduction You can call me Peter Office: SHB117 Office hour:
1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: The Moon is made of green cheese. Trenton.
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.
Basic Logical Operations (fascinating)
Hardware Implementations Gates and Circuits. Three Main Gates  AND  OR  NOT.
Basic Logical Operations (Fascinating)
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.
The Logic of Compound Statements
Homework 3.
3.2 – Truth Tables and Equivalent Statements
TRUTH TABLES. Introduction Statements have truth values They are either true or false but not both Statements may be simple or compound Compound statements.
Logic ChAPTER 3.
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 3.2 Truth Tables for Negation, Conjunction, and Disjunction.
Conjunctions, Disjunctions, and Negations Symbolic Logic 2/12/2001.
CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.
CS1Q Computer Systems Lecture 5 Simon Gay. Lecture 5CS1Q Computer Systems - Simon Gay2 Where we are Global computing: the Internet Networks and distributed.
Gates and Circuits Monday/Wednesday Week 7. Electronic Circuits  Two types of circuit diagrams See pp. 238 in The Analytical Engine by Decker and Hirshfield.
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.
MATH 102 Contemporary Math S. Rook
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
Discrete Mathematics Lecture1 Miss.Amal Alshardy.
VBScript Language. What is VBScript Based on the Visual Basic family of languages Supports object oriented features Interpreted Loosely Typed Implicitly.
CSNB143 – Discrete Structure LOGIC. Learning Outcomes Student should be able to know what is it means by statement. Students should be able to identify.
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.
1 CS 106 Computing Fundamentals II Chapter 32 “Boolean Expressions” Herbert G. Mayer, PSU CS Status 7/14/2013 Initial content copied verbatim from CS 106.
Chapter 7 Logic, Sets, and Counting
MLS 570 Critical Thinking Reading Notes for Fogelin: Propositional Logic Fall Term 2006 North Central College.
CS1022 Computer Programming & Principles Lecture 1 Logic and Proof.
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.
How do I show that two compound propositions are logically equivalent?
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.
Introduction to Programming Lecture Note - 2 Visual Basic Programming Fundamentals.
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
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.
Logic and Boolean Algebra. Logic statements  Real life statements  “I use public transportation when the car is broken and I have to go to work”  “All.
CEC 220 Digital Circuit Design Boolean Algebra I Wed, Sept 2 CEC 220 Digital Circuit Design Slide 1 of 13.
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,
1 Boolean Logic CS/APMA 202, Spring 2005 Rosen, section 1.1 Aaron Bloomfield.
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.
Ms. Andrejko 2-2 Logic. Real World Legally Blonde.
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)
Logic Gates and Boolean Algebra Introduction to Logic II.
Aim 1.4: To work with conditionals and biconditionals Do Now: Determine the truth value of the following sentences: 1.9 is a prime number and New York.
Logic Gates Review. Logic Gates OR gate – 1 if either input is 1 – 0 if they both are 0.
Section 3.2: Truth Tables for Negation, Conjunction, and Disjunction
EI205 Lecture 5 Dianguang Ma Fall 2008.
Boolean logic Taken from notes by Dr. Neil Moore
Boolean logic Taken from notes by Dr. Neil Moore
Truth tables Mrs. Palmer.
Presentation transcript:

Boolean Logic

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

More Boolean Operators (1/0) xyx NAND y xyx NOR y xyx XOR y NAND = NOT(x AND y) NOR = NOT(x OR y) XOR = EXCLUSIVE OR

Boolean Expressions Follows a logical order of operations 1. NOT operators 2. Parentheses 3. AND 4. OR Examples: x OR y AND z x OR (y AND z)  Do it this way just in case

Truth Tables Write out table of all possible combinations of truth values Evaluate the boolean expression for all combinations Example x OR y AND z xyzx OR (y AND z) FFFF FFTF FTFF FTTT TFFT TFTT TTFT TTTT

Example What is the truth table for: NOT x OR y? xyNOT x OR y FF FT TF TT

Another Example What is the truth table for: x AND NOT y? xyx AND NOT y FF FT TF TT

Your Turn What is the truth table for the Boolean expression: x OR NOT y OR z?

Your Turn What is the truth table for the Boolean expression: x NAND y OR NOT z

Your turn What is the truth table for the Boolean expression: a AND (b XOR c)

Partner Practice 1. Write a Boolean expression with no more than 3 variables (you can have multiple Boolean operators) 2. Swap boards with somebody else in the room 3. Write the truth table for the expression

Problem Scenarios 1. You will be given a scenario 2. Identify the input variables 3. Write the Boolean expression 4. Construct the truth table

Scenario #1 Either the sun is shining or rain is falling 1. Identify the input variables 2. Write the Boolean expression 3. Construct the truth table

Scenario #2 Maria won’t go to school if it is cold and raining or she has not done her homework. 1. Identify the input variables 2. Write the Boolean expression 3. Construct the truth table

Scenario #3 Your car has 4 wheel drive, which turns on when the temperature is freezing or when you hit the manual override, but you cannot turn on the override when you are going over 60 mph. 1. Identify the input variables 2. Write the Boolean expression 3. Construct the truth table

Scenario #4 You are ordering dinner, and your options are a burger, fries, and vegetables. You cannot get a burger and a side of fries together. The healthy option of steamed vegetables is allowed with your burger.