SlideShare a Scribd company logo
Computer Logic
Logical Operators
 Logical operators are ways in which
we can create more complex
conditional statements.
 More efficient code
 Computer ranges of values
 A logical operator is formed by
usually combining 2 conditional
statements utilizing
 and
 or
 not
Logical Operators
 The computer evaluates the 1st statement and
then the 2nd statement
 Question: Why is this a more efficient way? Think
of the and/or situations separately?
 Fist statement And Second statement
 For a True-response both statements have to be true
 Fist statement Or Second statement
 For a true response only 1 statement has to be true
 They can even include more than 2 conditional
statements. 3, 4, or however many as you like.
 You can work with or’s or and’s in a statement.
 Question: Which Operator takes precedence and
why? Think order of Ops
Exercise
 Exploring logical values and truth tables
 Truth Tables Exercise
 Assume p = driving fast q = w/o a seat belt
 Chances of getting a ticket
p q p And q
1 1 1
0 1 0
1 0 0
0 0 0
Checkpoint
 1. (True and False )  _____
 2. (False or True)  ______
 3. (True and True) and (True or False)  ____
 4. !(False or True)  ____

More Related Content

DOCX
Ms excel formulas
PPTX
conditional statements and operators
DOCX
Factorial Investigation
PPTX
"A short and knowledgeable concept about Algorithm "
PPT
Real numbers and their properties
PDF
Basic Foundations of Automata Theory
DOC
Logical expression and logical operators
PPTX
Using decision statements
Ms excel formulas
conditional statements and operators
Factorial Investigation
"A short and knowledgeable concept about Algorithm "
Real numbers and their properties
Basic Foundations of Automata Theory
Logical expression and logical operators
Using decision statements

What's hot (10)

PPTX
PDF
A Simple Guide to the Item Response Theory (IRT) and Rasch Modeling
PPTX
Selection sorting
PDF
Discrete Mathematics Lecture Notes
PPT
Selection Sort - Vipin Ramola
PPTX
Problem solving using truth table
PPT
expressions
PPTX
PDF
CIS 1403 lab 4 selection
PPTX
Pa1 session 1_recap
A Simple Guide to the Item Response Theory (IRT) and Rasch Modeling
Selection sorting
Discrete Mathematics Lecture Notes
Selection Sort - Vipin Ramola
Problem solving using truth table
expressions
CIS 1403 lab 4 selection
Pa1 session 1_recap
Ad

Viewers also liked (20)

PPT
Conditional Loops Python
PDF
Connect all your customers on one multichannel platform!
PPTX
Variables and Expressions
PPT
PPTX
Logical Operators
PPT
Intro to Python
DOC
20 C programs
PPTX
Python in raspberry pi
PPTX
C programming language tutorial
PDF
Socket Programming In Python
PDF
Cloud Computing to Internet of Things
PPT
Formatting Output
PPTX
Got Python I/O: IoT Develoment in Python via GPIO
DOC
CS2309 JAVA LAB MANUAL
PDF
Internet of Things for Libraries
PPTX
For Loops and Nesting in Python
DOCX
C programs
PPT
Multidimensional array in C
PPTX
Mastering Python lesson3b_for_loops
Conditional Loops Python
Connect all your customers on one multichannel platform!
Variables and Expressions
Logical Operators
Intro to Python
20 C programs
Python in raspberry pi
C programming language tutorial
Socket Programming In Python
Cloud Computing to Internet of Things
Formatting Output
Got Python I/O: IoT Develoment in Python via GPIO
CS2309 JAVA LAB MANUAL
Internet of Things for Libraries
For Loops and Nesting in Python
C programs
Multidimensional array in C
Mastering Python lesson3b_for_loops
Ad

Similar to Computer Logic (20)

PPTX
Lecture 07.pptx
PPTX
logical-op.pptx for C++ for Students in TLE 9
PPTX
Mathematical and logical operators
PPTX
ppt on logical/arthimatical/conditional operators
PPTX
Presentation on Logical Operators
PPTX
Lecture - Operators in C++ (Book: Tony Gaddis).pptx
PDF
c# operators
PPT
Fundamentals of Programming Chapter 5
PPT
Mathematical Logic Part 2
PPT
Chaptfffffuuer05.PPT
PPTX
Presentation on logical_operators
 
PPTX
Operators and expressions in c language
PPTX
Operators inc c language
PPTX
OPERATORS OF C++
PPT
4 logic circuit optimisation
PPTX
Verilog operators.pptx
PPTX
Data Types and Operators in Python2.pptx
PPT
4535092.ppt
PPT
PPTX
Logical Operations and Truth Tables.pptx
Lecture 07.pptx
logical-op.pptx for C++ for Students in TLE 9
Mathematical and logical operators
ppt on logical/arthimatical/conditional operators
Presentation on Logical Operators
Lecture - Operators in C++ (Book: Tony Gaddis).pptx
c# operators
Fundamentals of Programming Chapter 5
Mathematical Logic Part 2
Chaptfffffuuer05.PPT
Presentation on logical_operators
 
Operators and expressions in c language
Operators inc c language
OPERATORS OF C++
4 logic circuit optimisation
Verilog operators.pptx
Data Types and Operators in Python2.pptx
4535092.ppt
Logical Operations and Truth Tables.pptx

More from primeteacher32 (20)

PPT
Software Development Life Cycle
PPTX
Variable Scope
PPTX
Returning Data
PPTX
Intro to Functions
PPTX
Introduction to GUIs with guizero
PPTX
Function Parameters
PPTX
Nested Loops
PPT
Conditional Loops
PPTX
Introduction to Repetition Structures
PPTX
Input Validation
PPTX
Windows File Systems
PPTX
Nesting Conditionals
PPTX
Conditionals
PPT
Intro to Python with GPIO
PPTX
Variables and Statements
PPTX
Variables and User Input
PPT
Intro to Python
PPTX
Raspberry Pi
PPT
Hardware vs. Software Presentations
PPTX
Block chain security
Software Development Life Cycle
Variable Scope
Returning Data
Intro to Functions
Introduction to GUIs with guizero
Function Parameters
Nested Loops
Conditional Loops
Introduction to Repetition Structures
Input Validation
Windows File Systems
Nesting Conditionals
Conditionals
Intro to Python with GPIO
Variables and Statements
Variables and User Input
Intro to Python
Raspberry Pi
Hardware vs. Software Presentations
Block chain security

Recently uploaded (20)

PDF
esg-supply-chain-webinar-nov2018hkhkkh.pdf
PPT
2- CELL INJURY L1 Medical (2) gggggggggg
PPTX
Your Guide to a Winning Interview Aug 2025.
PPTX
AREAS OF SPECIALIZATION AND CAREER OPPORTUNITIES FOR COMMUNICATORS AND JOURNA...
PDF
313302 DBMS UNIT 1 PPT for diploma Computer Eng Unit 2
PPTX
microtomy kkk. presenting to cryst in gl
PPTX
Theory of Change. AFH-FRDP OCEAN ToCpptx
PPTX
DPT-MAY24.pptx for review and ucploading
PPTX
FINAL PPT.pptx cfyufuyfuyuy8ioyoiuvy ituyc utdfm v
DOC
field study for teachers graduating samplr
PPTX
Job-opportunities lecture about it skills
PPTX
CYBER SECURITY PPT.pptx CYBER SECURITY APPLICATION AND USAGE
PDF
APNCET2025RESULT Result Result 2025 2025
PPTX
Surgical thesis protocol formation ppt.pptx
PPTX
Prokaryotes v Eukaryotes PowerPoint.pptx
PDF
Understanding the Rhetorical Situation Presentation in Blue Orange Muted Il_2...
PPTX
STS CHAP 4 human development as reflected
PPTX
Slideham presentation for the students a
PDF
Biography of Mohammad Anamul Haque Nayan
PPTX
Principles of Inheritance and variation class 12.pptx
esg-supply-chain-webinar-nov2018hkhkkh.pdf
2- CELL INJURY L1 Medical (2) gggggggggg
Your Guide to a Winning Interview Aug 2025.
AREAS OF SPECIALIZATION AND CAREER OPPORTUNITIES FOR COMMUNICATORS AND JOURNA...
313302 DBMS UNIT 1 PPT for diploma Computer Eng Unit 2
microtomy kkk. presenting to cryst in gl
Theory of Change. AFH-FRDP OCEAN ToCpptx
DPT-MAY24.pptx for review and ucploading
FINAL PPT.pptx cfyufuyfuyuy8ioyoiuvy ituyc utdfm v
field study for teachers graduating samplr
Job-opportunities lecture about it skills
CYBER SECURITY PPT.pptx CYBER SECURITY APPLICATION AND USAGE
APNCET2025RESULT Result Result 2025 2025
Surgical thesis protocol formation ppt.pptx
Prokaryotes v Eukaryotes PowerPoint.pptx
Understanding the Rhetorical Situation Presentation in Blue Orange Muted Il_2...
STS CHAP 4 human development as reflected
Slideham presentation for the students a
Biography of Mohammad Anamul Haque Nayan
Principles of Inheritance and variation class 12.pptx

Computer Logic

  • 2. Logical Operators  Logical operators are ways in which we can create more complex conditional statements.  More efficient code  Computer ranges of values  A logical operator is formed by usually combining 2 conditional statements utilizing  and  or  not
  • 3. Logical Operators  The computer evaluates the 1st statement and then the 2nd statement  Question: Why is this a more efficient way? Think of the and/or situations separately?  Fist statement And Second statement  For a True-response both statements have to be true  Fist statement Or Second statement  For a true response only 1 statement has to be true  They can even include more than 2 conditional statements. 3, 4, or however many as you like.  You can work with or’s or and’s in a statement.  Question: Which Operator takes precedence and why? Think order of Ops
  • 4. Exercise  Exploring logical values and truth tables  Truth Tables Exercise  Assume p = driving fast q = w/o a seat belt  Chances of getting a ticket p q p And q 1 1 1 0 1 0 1 0 0 0 0 0
  • 5. Checkpoint  1. (True and False )  _____  2. (False or True)  ______  3. (True and True) and (True or False)  ____  4. !(False or True)  ____

Editor's Notes

  • #3: I like when you tries to incorporate these even even you syntactically got it wrong but logically were correct. These are the people I help before the topic is taught not people that don’t even try or take the leap of faith.