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.

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.
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.
Tutorial 1: Logic Peter Poon. Self Introduction You can call me Peter Office: SHB117 Office hour:
Logic ChAPTER 3 1. Truth Tables and Validity of Arguments
Snick  snack CPSC 121: Models of Computation 2011 Winter Term 1 Propositional Logic, Continued Steve Wolfman, based on notes by Patrice Belleville and.
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 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
The Logic of Compound Statements
Boolean Algebra and Logic Simplification. Boolean Addition & Multiplication Boolean Addition performed by OR gate Sum Term describes Boolean Addition.
Logic Truth Tables, Propositions, Implications. Statements Logic is the tool for reasoning about the truth or falsity of statements. –Propositional logic.
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.
Boolean Algebra Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
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.
Conditional Statements M Deductive Reasoning Proceeds from a hypothesis to a conclusion. If p then q. p  q hypothesis  conclusion.
CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.
Chapter 1 The Logic of Compound Statements. Section 1.1 Logical Form and Logical Equivalence.
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
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.
Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures.
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
Boolean Algebra & Logic Prepared by Dr P Marais (Modified by D Burford)
The Foundations Logic and Proofs by raedRASHEED 2014.
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.
4. Computer Maths and Logic 4.2 Boolean Logic Simplifying Boolean Expressions.
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
Conditional Statements
Propositional Logic. Propositions Any statement that is either True (T) or False (F) is a proposition Propositional variables: a variable that can assume.
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.
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.
CS203 Discrete Mathematical Structures
Formal Test for Validity. EVALUATIONS Evaluations An evaluation is an assignment of truth-values to sentence letters. For example: A = T B = T C = F.
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.
CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22.
Laws of Boolean Algebra Commutative Law Associative Law Distributive Law Identity Law De Morgan's Theorem.
Boolean Algebra Computer Architecture. Digital Representation Digital is an abstraction of analog voltage –Voltage is a continuous, physical unit Typically.
Fundamental Logic Gates And, Or, Not. Logic Gates: The Basics Regulate the flow of electricity within circuits to perform desired functionalities Each.
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
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.
CSE 461. Binary Logic Binary logic consists of binary variables and logical operations. Variables are designated by letters such as A, B, C, x, y, z etc.
Introduction to Discrete Mathematics Lecture 1: Sep 6 AB C a = qb+r gcd(a,b) = gcd(b,r)
Hoda Roodaki Boolean Algebra Hoda Roodaki
Logic Gates and Boolean Algebra
Boolean Algebra.
Logic Gates and Boolean Algebra
Boolean Algebra & Logic Circuits
Basic Logic Gates 1.
Boolean Algebra.
Boolean Algebra How gates get picked.
Truth tables Mrs. Palmer.
Presentation transcript:

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 is sunny. Today is Monday OR it is raining. Today is Friday OR it is NOT raining.

A More Challenging Example Are these two statements the same? It is NOT Friday OR it is raining. It is NOT the case that it is Friday AND it is NOT raining.

Boolean Algebra Boolean Algebra allows us to formalize this sort of reasoning. Boolean variables may take one of only two possible values: TRUE or FALSE Algebraic operators: + - * / Logical operators - AND, OR, NOT, XOR, NOR, NAND

Logical Operators A AND B is True when both A and B are true. A OR B is always True unless both A and B are false. NOT A changes the value from True to False or False to True. XOR = either a or b but not both NOR = NOT OR NAND = NOT AND

Writing AND, OR, NOT A AND B = A ^ B = AB A OR B = A v B = A+B NOT A = ~A = A’ TRUE = T = 1 FALSE = F = 0

Exercise AB + AB’ A AND B OR A AND NOT B (A + B)’(B) NOT (A OR B) AND B

Boolean Algebra The = in Boolean Algebra means equivalent Two statements are equivalent if they have the same truth table. For example,  True = True,  A = A,

Truth Tables Provide an exhaustive approach to describing when some statement is true (or false)

Truth Table MR M’R’MRM + R TT TF FT FF

Truth Table MRM’R’MRM + R TTFF TFFT FTTF FFTT

Truth Table MRM’R’MRM + R TTFFT TFFTF FTTFF FFTTF

Truth Table MRM’R’MRM +R TTFFTT TFFTFT FTTFFT FFTTFF

Example Write the truth table for A(A’ + B) + AB’ (p 266, exercise #3a) First, write in words: A AND (NOT A OR B) OR (A AND NOT B) Then do a truth table with the following columns: A, B, A’, B’, A’ + B, AB’, A (A’ + B), whole expression.

A (A’ + B) + AB’ AB A’ B’ A’ + BA B’A(A’+B)Whole TTFFTFTT TFFTFTFT FTTFTFFF FFTTTFFF

Exercise Write the truth table for (A + A’) B First, write in words. Then do a truth table.

Solution to (A + A’) B ABA’A + A’ (A + A’) B TTFTT TFFTF FTTTT FFTTF

Boolean Algebra - Identities A OR True = True A OR False = A A OR A = A A + B = B + A (commutative) A AND True = A A AND False = False A AND A = A AB = BA (commutative)

Associative and Distributive Identities A(BC) = (AB)C A + (B + C) = (A + B) + C A + (BC) = (A + B) (A + C) A (B + C) = (AB)+(AC) Exercise: using truth tables prove -  A(A + B) = A

Solution: A AND (A OR B) = A ABA + BA (A + B) TTTT TFTT FTTF FFFF

Using Identities A + (BC) = (A + B)(A + C) A(B + C) = (AB) +(AC) A(A + B) = A A + A = A Exercise - using identities prove:  A + (AB) = A  A +(AB) = (A +A)(A + B)  = A (A + B) = A

Identities with NOT (A’)’ = A A + A’ = True AA’ = False On and on and on and on …

DeMorgan’s Laws (A + B)’ = A’B’ (AB)’ = A’ + B’ Exercise - Simplify the following with identities  (A’B)’

Solving a Truth Table ABXWhen you see a True value in the X column, you must have a term in the expression. Each term consists of the variables AB. A will be NOT A when the truth value of A is False, B will be NOT B when the truth value of B is false. They will be connected by OR. TTT TFT FTF FFF For example, X = AB + AB’ = (A AND B) OR ( A AND NOT B)

Exercise: Solving a Truth Table ABXWhen you see a True value in the X column, you must have a term in the expression. Each term consists of the variables AB. A will be NOT A when the truth value of A is False, B will be NOT B when the truth value of B is false. They will be connected by OR. TTT TFF FTT FFF Solve the Truth Table given above.

Exercise: Solving a Truth Table ABXWhen you see a True value in the X column, you must have a term in the expression. Each term consists of the variables AB. A will be NOT A when the truth value of A is False, B will be NOT B when the truth value of B is false. They will be connected by OR. TTT TFF FTT FFF Solution is, X = AB + A’B = (A AND B) OR ( NOT A AND B)