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.

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
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.
Boolean Algebra and Logic Gate
Gates and Circuits. Three Main Gates  AND  OR  NOT.
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 Math 306 Foundations of Mathematics I Math 306 Foundations of Mathematics I Goals of this class Introduction to important mathematical concepts Development.
MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR
1 CSE 20: Lecture 8 Boolean Postulates and Theorems CK Cheng 4/26/2011.
Discussion #10 1/16 Discussion #10 Logical Equivalences.
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,
The Logic of Compound Statements
Truth Tables for Negation, Conjunction, and Disjunction.
3.2 – Truth Tables and Equivalent Statements
Boolean Algebra Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
Lecture 8 Introduction to Logic CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.
Section 1-4 Logic Katelyn Donovan MAT 202 Dr. Marinas January 19, 2006.
Course Outline Book: Discrete Mathematics by K. P. Bogart Topics:
CS 285- Discrete Mathematics Lecture 2. Section 1.1 Propositional Logic Propositions Conditional Statements Truth Tables of Compound Propositions Translating.
Chapter 1 The Logic of Compound Statements. Section 1.1 Logical Form and Logical Equivalence.
© Jalal Kawash 2010 Logic Peeking into Computer Science.
MATH 102 Contemporary Math S. Rook
Computer Science 210 Computer Organization Introduction to Boolean Algebra.
Math 240: Transition to Advanced Math Deductive reasoning: logic is used to draw conclusions based on statements accepted as true. Thus conclusions are.
Fall 2002CMSC Discrete Structures1 Let’s get started with... Logic !
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
Boolean Algebra. Boolean algebra (or Boolean logic) is a logical calculus of truth values, developed by George Boole in the late 1830s. It created a notation.
Discrete Mathematics Lecture1 Miss.Amal Alshardy.
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.
CSS 342 DATA STRUCTURES, ALGORITHMS, AND DISCRETE MATHEMATICS I LECTURE CUSACK CHAPT 4.
LOGIC Lesson 2.1. What is an on-the-spot Quiz  This quiz is defined by me.  While I’m having my lectures, you have to be alert.  Because there are.
Chapter 7 Logic, Sets, and Counting
How do I show that two compound propositions are logically equivalent?
Chapter 7 Logic, Sets, and Counting Section 1 Logic.
6.1 Logic Logic is not only the foundation of mathematics, but also is important in numerous fields including law, medicine, and science. Although the.
Logical Form and Logical Equivalence Lecture 1 Section 1.1 Wed, Jan 12, 2005.
Logical Form and Logical Equivalence M Logical Form Example 1 If the syntax is faulty or execution results in division by zero, then the program.
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.
1 Propositional Logic Introduction. 2 What is propositional logic? Propositional Logic is concerned with propositions and their interrelationships. 
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.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
CEC 220 Digital Circuit Design Boolean Algebra I Wed, Sept 2 CEC 220 Digital Circuit Design Slide 1 of 13.
CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22.
Bits and Bytes Boolean Algebra ( ) Boolean algebra Expressing in C.
Laws of Boolean Algebra Commutative Law Associative Law Distributive Law Identity Law De Morgan's Theorem.
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,
UNIT 01 – LESSON 10 - LOGIC ESSENTIAL QUESTION HOW DO YOU USE LOGICAL REASONING TO PROVE STATEMENTS ARE TRUE? SCHOLARS WILL DETERMINE TRUTH VALUES OF NEGATIONS,
C.S. Choy21 BOOLEAN ALGEGRA The Mathematics of logic Boolean variables have only two possible values (binary) Operators:. Product+ SumComplement A.B A+B.
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
CSS342: Propositions1 Professor: Munehiro Fukuda.
Section 1.1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: a) The Moon is made of green.
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.
Spring 2003CMSC Discrete Structures1 Let’s get started with... Logic !
3/6/20161 Let’s get started with... Logic !. 3/6/20162 Logic Crucial for mathematical reasoningCrucial for mathematical reasoning Used for designing electronic.
Reasoning and Proof Chapter Use Inductive Reasoning Conjecture- an unproven statement based on an observation Inductive reasoning- finding a pattern.
Chapter 1 Logic and proofs
Logical Operators (Connectives) We will examine the following logical operators: Negation (NOT,  ) Negation (NOT,  ) Conjunction (AND,  ) Conjunction.
Hoda Roodaki Boolean Algebra Hoda Roodaki
Boolean Algebra.
Logic Gates and Boolean Algebra
Bits and Bytes Boolean algebra Expressing in C
Boolean Algebra Introduction CSCI 240
CSE 20: Lecture 8 Boolean Postulates and Theorems CK Cheng
Presentation transcript:

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 the lights in the house are turned off”  Mathematical statements  “If side AB is equal to side BC and BC is equal to side CA, then the triangle ABC is equilateral”  “If a shape is both a rombus and a rectangle then it is a square”  “This triangle is rectangle”  Are called logic statements  Statements are either TRUE or FALSE

What is logic  Logic is a branch of mathematics that studies statements.  It helps organize mathematicians on proofs and theorems.  Statements “A”, “B” can be combined as follows:  “A or B” is called (inclusive) logical disjunction  “A and B” is called logical conjunction  “not A” is called logical negation or complement  These are called logic operations

Truth Tables ABA and B (A  B) fff ftf tff ttt ABA or B (A  B) fff ftt tft ttt  To see the effect of these operation we draw their truth tables. Anot A (A) ft tf

A few more operations…  Implication  Exclusive disjunction (exclusive or - XOR) ABA then B (A  B) fft ftt tff ttt ABA xor B (A  B) fff ftt tft ttf

Boolean Algebra  Boolean algebra combines two math fields  Algebra (operations, associative laws, etc)  Binary logic: 0,1 (or True, False)  Developed by George Boole, 1815 – 1864  Has three operators  And (ab), OR (a+b), NOT (a’)  Basic binary operation theorems  Identity: a1=a, a+0=a  Null element: a0=0, a+1=1  Idempotency: aa=a, a+a=a  Complements: a+a’=1, aa’=0  Basic algebraic theorems:  Commutativity: ab=ba, a+b=b+a  Associativity: (ab)c=a(bc), (a+b)+c=a+(b+c)  Distributivity: (a+b)c=(ac)+(bc), (ab)+c=(ac)+(bc)  Covering: a(a+b) = a, a+(ab) = a

Examples  Prove that:  (a+b)b’ = ab’  (ab)+b’ = a+b’  (a+b)’ = a’ b’  (ab)’ =a’ + b’

Use of Boolean Algebra: Logic (i.e. digital) circuits

Honestants and Swindlecants  There are two kinds of people (aborigines) on a mysterious island. There are so-called Honestants who speak always the truth, and the others are Swindlecants who always lie  An outside visitor, on his way to the pub, he met three aborigines. One made this statement: "We are all Swindlecants." The second one concluded: "Just one of us is an Honestant." Who are they?  [Hint: use truth tables]

Pandora’s Box  Once upon a time, there was a girl named Pandora, who wanted a bright groom so she made up a few logic problems for the wannabe. This is one of them.  Based upon the inscriptions on the boxes (none or just one of them is true), choose one box where the wedding ring is hidden.  Golden box: "The ring is in this box."  Silver box: "The ring is not in this box."  Lead box: "The ring is not in the golden box."  [Hint: use truth tables]

Pandora’s Box II  And here is the second test. At least one inscription is true and at least one is false. Which means the ring is in the...  Golden box: "The ring is not in the silver box."  Silver box: "The ring is not in this box."  Lead box: "The ring is in this box."  [Hint: use truth tables]