This presentation includes custom animations. To view the animations, you must view the presentation in Slide Show mode and activeX controls must be allowed.

Slides:



Advertisements
Similar presentations
Computer Science 210 Computer Organization Introduction to Logic Circuits.
Advertisements

INTRODUCTION LOGICAL OPERATIONS TRUTH TABLE AND RULES.
This presentation includes custom animations. To view the animations, you must view the presentation in Slide Show mode and activeX controls must be allowed.
This presentation includes custom animations. To view the animations, you must view the presentation in Slide Show mode and activeX controls must be allowed.
This presentation includes custom animations. To view the animations, you must view the presentation in Slide Show mode and activeX controls must be allowed.
This presentation includes custom animations. To view the animations, you must view the presentation in Slide Show mode and activeX controls must be allowed.
This presentation includes custom animations. To view the animations, you must view the presentation in Slide Show mode and activeX controls must be allowed.
This presentation includes custom animations. To view the animations, you must view the presentation in Slide Show mode and activeX controls must be allowed.
This presentation includes custom animations. To view the animations, you must view the presentation in Slide Show mode and activeX controls must be allowed.
Lecture 2 Dr Richard Reilly Dept. of Electronic & Electrical Engineering Room 153, Engineering Building To insert your company logo on this slide From.
This presentation includes custom animations. To view the animations, you must view the presentation in Slide Show mode and activeX controls must be allowed.
This presentation includes custom animations. To view the animations, you must view the presentation in Slide Show mode and activeX controls must be allowed.
This presentation includes custom animations. To view the animations, you must view the presentation in Slide Show mode and activeX controls must be allowed.
This presentation includes custom animations. To view the animations, you must view the presentation in Slide Show mode and activeX controls must be allowed.
BOOLEAN LOGIC CSC 171 FALL 2004 LECTURE 7. ASSIGNMENT Review Quiz # 2 Start reading Chapter 5.
This presentation includes custom animations. To view the animations, you must view the presentation in Slide Show mode and activeX controls must be allowed.
This presentation includes custom animations. To view the animations, you must view the presentation in Slide Show mode and activeX controls must be allowed.
Boolean Logic & Truth Tables In today’s lesson we will look at: a reminder about truth values and NOT, AND, OR and EOR truth tables operator precedence.
Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley. All rights reserved.
Logic Gates Circuits to manipulate 0’s and 1’s. 0’s and 1’s used for numbers Also to make decisions within the computer. In that context, 1 corresponds.
3.2 – Truth Tables and Equivalent Statements
True or False Unit 3 Lesson 7 Building Blocks of Decision Making With Additions & Modifications by Mr. Dave Clausen True or False.
Digital Systems Presented by Prof Tim Johnson
Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.
Computer Science 101 The Boolean System. George Boole British mathematician ( ) Boolean algebra –Logic –Set theory –Circuits –Conditions in if.
Lecture 7 Topics –Boolean Algebra 1. Logic and Bits Operation Computers represent information by bit A bit has two possible values, namely zero and one.
MATH 102 Contemporary Math S. Rook
1 Boolean Algebra & Logic Gates. 2 Objectives Understand the relationship between Boolean logic and digital computer circuits. Learn how to design simple.
An Introduction to Programming Using Alice Boolean Logic.
Computer Science 210 Computer Organization Introduction to Boolean Algebra.
Introduction to Chapter 3  Now that we understand the concept of binary numbers, we will study ways of describing how systems using binary logic levels.
Thinking Mathematically
Section 3.4 Boolean Algebra. A link between:  Section 1.3: Logic Systems  Section 3.3: Set Systems Application:  Section 3.5: Logic Circuits in Computer.
CEC 220 Digital Circuit Design Boolean Algebra I Wed, Sept 2 CEC 220 Digital Circuit Design Slide 1 of 13.
Logical Thinking CS 104 9/12/11. Agenda Today  College Board survey reminder  Note: Simple “how to” guide on Scratch posted on eLearning  Review HW.
 2012 Pearson Education, Inc. Slide Chapter 3 Introduction to Logic.
Chapter 3 Boolean Algebra and Digital Logic T103: Computer architecture, logic and information processing.
Random Functions Selection Structure Comparison Operators Logical Operator
Dr. ClincyLecture Slide 1 CS6020- Chapter 3 (3A and ) Dr. Clincy Professor of CS First Exam - Tuesday, September 6th Coverage: All subjects up to.
Introduction to Logic © 2008 Pearson Addison-Wesley.
Boolean Algebra & Logic Gates
CPS120 Introduction to Computer Science
Logic You will learn three common logical operations that will be applied in much of the course (spreadsheets, databases, web searches and both programming.
Morgan Kaufmann Publishers
Computer Science 210 Computer Organization
CS Chapter 3 (3A and ) Part 1 of 8
Logic Gates and Boolean Algebra
Truth Tables and Equivalent Statements
CS Chapter 3 (3A and ) Part 1 of 8
Boolean Algebra.
Boolean algebra Last time we talked about Boolean functions, Boolean expressions, and truth tables. Today we’ll learn how to how use Boolean algebra to.
4-1 LOGIC OPERATIONS In Chapter 3 we discussed the fact that data inside a computer is stored as patterns of bits. Logic operations refer to those operations.
Introduction To Robot Decision Making
Computer Science 210 Computer Organization
Dr. Clincy Professor of CS
Logical Operators & Truth Tables.
Computers & Programming Languages
Agenda – 2/12/18 Questions? Readings: CSI 4, P
3.4 Computer systems Boolean logic Lesson 2.
Logic You will learn three common logical operations that will be applied in much of the course (spreadsheets, databases, web searches and both programming.
Computer Science 210 Computer Organization
Dr. Clincy Professor of CS
Boolean Logic Boolean Logic is considered to be the basic of digital electronics. We know that a computer’s most basic operation is based on digital electronics.
Introduction To Robot Decision Making
ECB2212-Digital Electronics Boolean algebra
Chapter 3 Introduction to Logic 2012 Pearson Education, Inc.
Lab Instructors will overview the MSP430
Section 3.7 Switching Circuits
Truth tables Mrs. Palmer.
boolean Expressions Relational, Equality, and Logical Operators
Presentation transcript:

This presentation includes custom animations. To view the animations, you must view the presentation in Slide Show mode and activeX controls must be allowed. If you have opened this lesson in PowerPoint, use the PowerPoint menus to view it in slide show mode. If you have opened this lesson in a browser and see a bar similar to that below, click on the Slide Show icon A notice similar to the one below may appear warning that ActiveX or other scripts are disabled. Enable the controls for this website in order to see the animations.

Logical (Boolean) Operators This slide show describes the use of logical operators Christine S. Wolfe Ohio University Lancaster 2008-Aug-01 Vocabulary: == < <= > >= ! != || && AND NOT OR True False Boolean case condition logical complement logical logically equivalent negation truth (decision) table

3 Boolean expressions are "The type of an expression with two possible values, 'true' and 'false'. Also, a variable of Boolean type or a function with Boolean arguments or result. The most common Boolean functions are AND, OR and NOT." The Free On-line Dictionary of Computing, © Denis HoweANDORNOT The Free On-line Dictionary of Computing, © Denis Howe In 1854 he [George Boole] published An investigation into the Laws of Thought, on Which are founded the Mathematical Theories of Logic and Probabilities. Boole approached logic in a new way reducing it to a simple algebra, incorporating logic into mathematics. He pointed out the analogy between algebraic symbols and those that represent logical forms. It began the algebra of logic called Boolean algebra which now finds application in computer construction, switching circuits etc. The textbook generally uses the term logical expression when describing expressions that have a value of true or false. More traditionally, these are referred to as Boolean expressions in honor of the man who developed the algebra of logic. Christine S. Wolfe Ohio University Lancaster 01-Aug-2008

4 The Logical (Boolean) Operators EnglishANSI C SYMBOL equivalent to== greater than> less than< greater than or equal to>= less than or equal to<= not equivalent to!= NOT! AND&& OR|| Christine S. Wolfe Ohio University Lancaster 01-Aug-2008

5 Truth tables, also called decision tables, are graphical ways of determining if a complex logical expression is true based upon the logical value of its base conditions. Christine S. Wolfe Ohio University Lancaster 01-Aug-2008 The truth table below represents the complement or negation of a condition. The complement of a condition is "the opposite"; when the condition is True, the complement or negation is False and when the condition is False, the complement or negation is True ConditionATF !ConditionAFT It is rainingTF !(It is raining)FT Age > 21TF !(Age > 21)FT When "It is raining" is True, then "!(It is raining)" is False and when "It is raining" is False, then "!(It is raining)" is True.

6 Christine S. Wolfe Ohio University Lancaster 01-Aug-2008 When drawing a truth table, separate the base conditions from the results with a double horizontal line Include every possible combination of True and False for the base conditions Each column after the conditions represents a case or situation. Case 1: ConditionA is True so !ConditionA must be False Case 2: ConditionA is False so !ConditionA must be True

7 It is sometimes the case that there are more than one conditions and/or more than one result. Remember that the set of conditions are separated from the set of results by the double line. Christine S. Wolfe Ohio University Lancaster 01-Aug-2008 base conditions complex condition (results) Notice that the more conditions you have, the more cases (columns) you have. The truth table must include every possible combination of True and False for the base conditions. base conditions complex condition (results) Click Tip Click Tip

8 When evaluating a case (column). The Truth of the result is determined by the Boolean value of the base conditions. Christine S. Wolfe Ohio University Lancaster 01-Aug-2008 A compound condition in which the base conditions is prefaced with ! (not) is true only when the base condition is false.

9 When evaluating a case (column). The Truth of the result is determined by the Boolean value of the base conditions. Christine S. Wolfe Ohio University Lancaster 01-Aug-2008 A compound condition in which the base conditions are separated by && (and) is True only when ALL base conditions are True.

10 When evaluating a case (column). The Truth of the result is determined by the Boolean value of the base conditions. Christine S. Wolfe Ohio University Lancaster 01-Aug-2008 A compound condition in which the base conditions are separated by || (or) is True whenever any one of the base conditions are True.

11 When evaluating a case (column). The Truth of the result is determined by the Boolean value of the base conditions. Christine S. Wolfe Ohio University Lancaster 01-Aug-2008 A compound condition in which the base conditions are separated by a mix of && (ands) and || (ors) and ! (nots) must be evaluated step by step. ConditionA && !ConditionB is True only when ConditionA is True and !ConditionB is True. ConditionA is True in columns 1 and 2. !ConditionB is True only when Condition B is False (columns 2 and 4) The only column in which both ConditionA and !ConditionB are True is column 2. Click Tip Click Tip You may find it helpful to include intermediate steps in the results section.

T TT 12 In programming, our conditions and results are usually arithmetic expressions. 63 > 15 && 25 < 40 T TT 63 > 15 || 25 < 40 F FT 63 > 15 && 25 > 40 T FT 63 > 15 || 25 > 40

13 Which of the following expressions are TRUE? 10 > 8 10 != 8 10 == >= 2 || 1 < 3 !(3 <= 3) 10 >= 8 10 >= 2 || 3 > 1 ! (10 > 8) Christine S. Wolfe Ohio University Lancaster 01-Aug-2008