cse 311: foundations of computing Spring 2015 Lecture 3: Logic and Boolean algebra

Size: px
Start display at page:

Download "cse 311: foundations of computing Spring 2015 Lecture 3: Logic and Boolean algebra"

Transcription

1 cse 311: foundations of computing Spring 2015 Lecture 3: Logic and Boolean algebra

2 gradescope Homework #1 is up (and has been since Friday). It is due Friday, October 9 th at 11:59pm. You should have received (i) An invitation from Gradescope [if not, cse311-staff ASAP] (ii) An from me about (i) [if not, go to the course web page and sign up for the class list] Note: Homework and extra credit are separate assignments.

3 1 more gates NAND (X Y) X Y Z X Y Z NOR (X Y) X Y Z X Y Z XOR X Y X Y Z X 0 Y 0 Z XNOR X Y, X = Y X Y Z X Y Z

4 review: logical equivalence Terminology: A compound proposition is a Tautology if it is always true Contradiction if it is always false Contingency if it can be either true or false p p p p (p q) p Tautology! Contradiction! Contingency! (p q) (p q) ( p q) ( p q) Tautology!

5 logical equivalence A and B are logically equivalent if and only if A B is a tautology i.e. A and B have the same truth table The notation A B denotes A and B are logically equivalent. Example: p p p p p p p T F T T F T F T

6 p q p q p q p q review: de Morgan s laws if!(front!= null && value > front.data) front = new ListNode(value, front); else { ListNode current = front; while!(current.next == null current.next.data >= value) current = current.next; current.next = new ListNode(value, current.next); } This code inserts value into a sorted linked list. The first if runs when: front is null or value is smaller than the first item. The while loop stops when: we ve reached the end of the list or the next value is bigger.

7 review: law of implication p q ( p q) p q p q p p q (p q) ( p q) T T T F T T T F F F F T F T T T T T F F T T T T

8 computing equivalence Describe an algorithm for computing if two logical expressions/circuits are equivalent. What is the run time of the algorithm? Compute the entire truth table for both of them! There are 2 n entries in the column for n variables.

9 some familiar properties of arithmetic x + y = y + x p q q p p q q p (commutativity) x y + z = x y + x z p q r p q (p r) p q r p q (p r) (distributivity) x + y + z = x + (y + z) (associativity) p q r p q r p q r p (q r)

10 properties of logical connectives Identity p T p p F p Domination p T T p F F Idempotent p p p p p p You will always get this list. Associative p q r p q r p q r p q r Distributive p q r p q (p r) p q r p q (p r) Absorption p p q p p p q p Commutative p q q p p q q p Negation p p T p p F

11 Reflect basic rules of reasoning and logic Allow manipulation of logical formulas Simplification Testing for equivalence Applications Query optimization Search optimization and caching Artificial intelligence / machine learning Program verification understanding connectives

12 equivalences related to implication p q p q p q q p p q p q (q p) p q p q

13 logical proofs To show P is equivalent to Q Apply a series of logical equivalences to sub-expressions to convert P to Q To show P is a tautology Apply a series of logical equivalences to sub-expressions to convert P to T

14 prove this is a tautology p q (p q)

15 prove this is a tautology (p (p q)) q

16 prove these are equivalent (p q) r p (q r)

17 prove these are not equivalent (p q) r p (q r)

18 Boolean logic Combinational Logic output = F(input) Sequential Logic output t = F(output t-1, input t ) output dependent on history concept of a time step (clock, t) Boolean Algebra consisting of a set of elements B = {0, 1} binary operations { +, } (OR, AND) and a unary operation { } (NOT) George homeopathy Boole

19 a combinatorial logic example Sessions of class: We would like to compute the number of lectures or quiz sections remaining at the start of a given day of the week. Inputs: Day of the Week, Lecture/Section flag Output: Number of sessions left Examples: Input: (Wednesday, Lecture) Output: 2 Input: (Monday, Section) Output: 1

20 implementation in software public int classesleft (weekday, lecture_flag) { switch (day) { case SUNDAY: case MONDAY: return lecture_flag? 3 : 1; case TUESDAY: case WEDNESDAY: return lecture_flag? 2 : 1; case THURSDAY: return lecture_flag? 1 : 1; case FRIDAY: return lecture_flag? 1 : 0; case SATURDAY: return lecture_flag? 0 : 0; } }

21 implementation with combinational logic Encoding: How many bits for each input/output? Binary number for weekday One bit for each possible output Weekday Lecture?

22 defining our inputs public int classesleft (weekday, lecture_flag) { switch (day) { case SUNDAY: case MONDAY: return lecture_flag? 3 : 1; case TUESDAY: case WEDNESDAY: return lecture_flag? 2 : 1; case THURSDAY: return lecture_flag? 1 : 1; case FRIDAY: return lecture_flag? 1 : 0; case SATURDAY: return lecture_flag? 0 : 0; } } Weekday Number Binary Sunday 0 (000) 2 Monday 1 (001) 2 Tuesday 2 (010) 2 Wednesday 3 (011) 2 Thursday 4 (100) 2 Friday 5 (101) 2 Saturday 6 (110) 2

23 converting to a truth table Weekday Number Binary Sunday 0 (000) 2 Monday 1 (001) 2 Tuesday 2 (010) 2 Wednesday 3 (011) 2 Thursday 4 (100) 2 Friday 5 (101) 2 Saturday 6 (110) 2 Weekday Lecture? c0 c1 c2 c

24 truth table logic (part one) DAY d2d1d0 L c0 c1 c2 c3 SunS SunL MonS MonL TueS TueL c3 = (DAY == SUN and LEC) or (DAY == MON and LEC) c3 = (d2 == 0 && d1 == 0 && d0 == 0 && L == 1) (d2 == 0 && d1 == 0 && d0 == 1 && L == 1) c3 = d2 d1 d0 L + d2 d1 d0 L WedS WedL Thu FriS FriL Sat

25 truth table logic (part two) DAY d2d1d0 L c0 c1 c2 c3 SunS SunL MonS MonL TueS TueL c3 = d2 d1 d0 L + d2 d1 d0 L WedS WedL c2 = (DAY == TUE and LEC) or (DAY == WED and LEC) c2 = d2 d1 d0 L + d2 d1 d0 L Thu FriS FriL Sat

26 truth table logic (part three) DAY d2d1d0 L c0 c1 c2 c3 SunS SunL MonS MonL TueS c3 = d2 d1 d0 L + d2 d1 d0 L c2 = d2 d1 d0 L + d2 d1 d0 L TueL WedS WedL c1 = [you do this one] Thu FriS FriL c0 = d2 d1 d0 L + d2 d1 d0 Sat

27 logic gates d2 d1 d0 L c3 = d2 d1 d0 L + d2 d1 d0 L NOT NOT NOT AND AND (multiple input AND gates) [LEVEL UP] OR DAY d2d1d0 L c0 c1 c2 c3 SunS SunL MonS MonL TueS TueL WedS WedL Thu FriS FriL Sat

CSE 311: Foundations of Computing. Lecture 2: More Logic, Equivalence & Digital Circuits

CSE 311: Foundations of Computing. Lecture 2: More Logic, Equivalence & Digital Circuits CSE 311: Foundations of Computing Lecture 2: More Logic, Equivalence & Digital Circuits Last class: Some Connectives & Truth Tables Negation (not) p p T F F T Disjunction (or) p q p q T T T T F T F T T

More information

CSE 311: Foundations of Computing. Lecture 2: More Logic, Equivalence & Digital Circuits

CSE 311: Foundations of Computing. Lecture 2: More Logic, Equivalence & Digital Circuits CSE 311: Foundations of Computing Lecture 2: More Logic, Equivalence & Digital Circuits Last class: Some Connectives & Truth Tables Negation (not) p p T F F T Disjunction (or) p q p q T T T T F T F T T

More information

CSE 311: Foundations of Computing. Lecture 3: Digital Circuits & Equivalence

CSE 311: Foundations of Computing. Lecture 3: Digital Circuits & Equivalence CSE 311: Foundations of Computing Lecture 3: Digital Circuits & Equivalence Homework #1 You should have received An e-mail from [cse311a/cse311b] with information pointing you to look at Canvas to submit

More information

CSC Discrete Math I, Spring Propositional Logic

CSC Discrete Math I, Spring Propositional Logic CSC 125 - Discrete Math I, Spring 2017 Propositional Logic Propositions A proposition is a declarative sentence that is either true or false Propositional Variables A propositional variable (p, q, r, s,...)

More information

CSE 20 DISCRETE MATH. Fall

CSE 20 DISCRETE MATH. Fall CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Today's learning goals Describe and use algorithms for integer operations based on their expansions Relate algorithms for integer

More information

COSC 243. Introduction to Logic And Combinatorial Logic. Lecture 4 - Introduction to Logic and Combinatorial Logic. COSC 243 (Computer Architecture)

COSC 243. Introduction to Logic And Combinatorial Logic. Lecture 4 - Introduction to Logic and Combinatorial Logic. COSC 243 (Computer Architecture) COSC 243 Introduction to Logic And Combinatorial Logic 1 Overview This Lecture Introduction to Digital Logic Gates Boolean algebra Combinatorial Logic Source: Chapter 11 (10 th edition) Source: J.R. Gregg,

More information

Lab 1 starts this week: go to your session

Lab 1 starts this week: go to your session Lecture 3: Boolean Algebra Logistics Class email sign up Homework 1 due on Wednesday Lab 1 starts this week: go to your session Last lecture --- Numbers Binary numbers Base conversion Number systems for

More information

Math.3336: Discrete Mathematics. Propositional Equivalences

Math.3336: Discrete Mathematics. Propositional Equivalences Math.3336: Discrete Mathematics Propositional Equivalences Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu Fall

More information

Compound Propositions

Compound Propositions Discrete Structures Compound Propositions Producing new propositions from existing propositions. Logical Operators or Connectives 1. Not 2. And 3. Or 4. Exclusive or 5. Implication 6. Biconditional Truth

More information

Outline. EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) Combinational Logic (CL) Defined

Outline. EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) Combinational Logic (CL) Defined EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) January 30, 2003 John Wawrzynek Outline Review of three representations for combinational logic:

More information

Switches: basic element of physical implementations

Switches: basic element of physical implementations Combinational logic Switches Basic logic and truth tables Logic functions Boolean algebra Proofs by re-writing and by perfect induction Winter 200 CSE370 - II - Boolean Algebra Switches: basic element

More information

CSE 20: Discrete Mathematics

CSE 20: Discrete Mathematics Spring 2018 Summary Last time: Today: Logical connectives: not, and, or, implies Using Turth Tables to define logical connectives Logical equivalences, tautologies Some applications Proofs in propositional

More information

XOR - XNOR Gates. The graphic symbol and truth table of XOR gate is shown in the figure.

XOR - XNOR Gates. The graphic symbol and truth table of XOR gate is shown in the figure. XOR - XNOR Gates Lesson Objectives: In addition to AND, OR, NOT, NAND and NOR gates, exclusive-or (XOR) and exclusive-nor (XNOR) gates are also used in the design of digital circuits. These have special

More information

We last time we began introducing equivalency laws.

We last time we began introducing equivalency laws. Monday, January 14 MAD2104 Discrete Math 1 Course website: www/mathfsuedu/~wooland/mad2104 Today we will continue in Course Notes Chapter 22 We last time we began introducing equivalency laws Today we

More information

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH WINTER CSE 20 DISCRETE MATH WINTER 2016 http://cseweb.ucsd.edu/classes/wi16/cse20-ab/ Reminders Exam 1 in one week One note sheet ok Review sessions Saturday / Sunday Assigned seats: seat map on Piazza shortly

More information

2.2: Logical Equivalence: The Laws of Logic

2.2: Logical Equivalence: The Laws of Logic Example (2.7) For primitive statement p and q, construct a truth table for each of the following compound statements. a) p q b) p q Here we see that the corresponding truth tables for two statement p q

More information

Tautologies, Contradictions, and Contingencies

Tautologies, Contradictions, and Contingencies Section 1.3 Tautologies, Contradictions, and Contingencies A tautology is a proposition which is always true. Example: p p A contradiction is a proposition which is always false. Example: p p A contingency

More information

EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits)

EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) September 5, 2002 John Wawrzynek Fall 2002 EECS150 Lec4-bool1 Page 1, 9/5 9am Outline Review of

More information

Boolean algebra. Examples of these individual laws of Boolean, rules and theorems for Boolean algebra are given in the following table.

Boolean algebra. Examples of these individual laws of Boolean, rules and theorems for Boolean algebra are given in the following table. The Laws of Boolean Boolean algebra As well as the logic symbols 0 and 1 being used to represent a digital input or output, we can also use them as constants for a permanently Open or Closed circuit or

More information

EEE130 Digital Electronics I Lecture #4

EEE130 Digital Electronics I Lecture #4 EEE130 Digital Electronics I Lecture #4 - Boolean Algebra and Logic Simplification - By Dr. Shahrel A. Suandi Topics to be discussed 4-1 Boolean Operations and Expressions 4-2 Laws and Rules of Boolean

More information

HW1 graded review form? HW2 released CSE 20 DISCRETE MATH. Fall

HW1 graded review form? HW2 released CSE 20 DISCRETE MATH. Fall CSE 20 HW1 graded review form? HW2 released DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Today's learning goals Translate sentences from English to propositional logic using appropriate

More information

About the course. CSE 321 Discrete Structures. Why this material is important. Topic List. Propositional Logic. Administration. From the CSE catalog:

About the course. CSE 321 Discrete Structures. Why this material is important. Topic List. Propositional Logic. Administration. From the CSE catalog: About the course CSE 321 Discrete Structures Winter 2008 Lecture 1 Propositional Logic From the CSE catalog: CSE 321 Discrete Structures (4) Fundamentals of set theory, graph theory, enumeration, and algebraic

More information

Propositional Equivalence

Propositional Equivalence Propositional Equivalence Tautologies and contradictions A compound proposition that is always true, regardless of the truth values of the individual propositions involved, is called a tautology. Example:

More information

COS 140: Foundations of Computer Science

COS 140: Foundations of Computer Science COS 140: Foundations of Computer Science Boolean Algebra Fall 2018 Introduction 3 Problem................................................................. 3 Boolean algebra...........................................................

More information

CS/COE1541: Introduction to Computer Architecture. Logic Design Review. Sangyeun Cho. Computer Science Department University of Pittsburgh

CS/COE1541: Introduction to Computer Architecture. Logic Design Review. Sangyeun Cho. Computer Science Department University of Pittsburgh CS/COE54: Introduction to Computer Architecture Logic Design Review Sangyeun Cho Computer Science Department Logic design? Digital hardware is implemented by way of logic design Digital circuits process

More information

Boolean Algebra, Gates and Circuits

Boolean Algebra, Gates and Circuits Boolean Algebra, Gates and Circuits Kasper Brink November 21, 2017 (Images taken from Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc.) Outline Last week: Von

More information

Propositional Logic: Equivalence

Propositional Logic: Equivalence Propositional Logic: Equivalence Alice Gao Lecture 5 Based on work by J. Buss, L. Kari, A. Lubiw, B. Bonakdarpour, D. Maftuleac, C. Roberts, R. Trefler, and P. Van Beek 1/42 Outline Propositional Logic:

More information

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH WINTER CSE 20 DISCRETE MATH WINTER 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Reminders Homework 3 due Sunday at noon Exam 1 in one week One note card can be used. Bring photo ID. Review sessions Thursday

More information

Doc112: Hardware. Department of Computing, Imperial College London. Doc112: Hardware Lecture 1 Slide 1

Doc112: Hardware. Department of Computing, Imperial College London. Doc112: Hardware Lecture 1 Slide 1 Doc112: Hardware Department of Computing, Imperial College London Doc112: Hardware Lecture 1 Slide 1 First Year Computer Hardware Course Lecturers Duncan Gillies Bjoern Schuller Doc112: Hardware Lecture

More information

Chapter 2: Switching Algebra and Logic Circuits

Chapter 2: Switching Algebra and Logic Circuits Chapter 2: Switching Algebra and Logic Circuits Formal Foundation of Digital Design In 1854 George Boole published An investigation into the Laws of Thoughts Algebraic system with two values 0 and 1 Used

More information

Logic and Boolean algebra

Logic and Boolean algebra Computer Mathematics Week 7 Logic and Boolean algebra College of Information Science and Engineering Ritsumeikan University last week coding theory channel coding information theory concept Hamming distance

More information

CSE370: Introduction to Digital Design

CSE370: Introduction to Digital Design CSE370: Introduction to Digital Design Course staff Gaetano Borriello, Brian DeRenzi, Firat Kiyak Course web www.cs.washington.edu/370/ Make sure to subscribe to class mailing list (cse370@cs) Course text

More information

Digital Logic (2) Boolean Algebra

Digital Logic (2) Boolean Algebra Digital Logic (2) Boolean Algebra Boolean algebra is the mathematics of digital systems. It was developed in 1850 s by George Boole. We will use Boolean algebra to minimize logic expressions. Karnaugh

More information

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication Announcements CS311H: Discrete Mathematics Propositional Logic II Instructor: Işıl Dillig First homework assignment out today! Due in one week, i.e., before lecture next Wed 09/13 Remember: Due before

More information

Ex: Boolean expression for majority function F = A'BC + AB'C + ABC ' + ABC.

Ex: Boolean expression for majority function F = A'BC + AB'C + ABC ' + ABC. Boolean Expression Forms: Sum-of-products (SOP) Write an AND term for each input combination that produces a 1 output. Write the input variable if its value is 1; write its complement otherwise. OR the

More information

Part I: Propositional Calculus

Part I: Propositional Calculus Logic Part I: Propositional Calculus Statements Undefined Terms True, T, #t, 1 False, F, #f, 0 Statement, Proposition Statement/Proposition -- Informal Definition Statement = anything that can meaningfully

More information

Definition 2. Conjunction of p and q

Definition 2. Conjunction of p and q Proposition Propositional Logic CPSC 2070 Discrete Structures Rosen (6 th Ed.) 1.1, 1.2 A proposition is a statement that is either true or false, but not both. Clemson will defeat Georgia in football

More information

Discrete Mathematics and Applications COT3100

Discrete Mathematics and Applications COT3100 Discrete Mathematics and Applications CO3100 Dr. Ungor Sources: Slides are based on Dr. G. Bebis material. uesday, January 7, 2014 oundations of Logic: Overview Propositional logic: (Sections 1.1-1.3)

More information

Discrete Mathematics. CS204: Spring, Jong C. Park Computer Science Department KAIST

Discrete Mathematics. CS204: Spring, Jong C. Park Computer Science Department KAIST Discrete Mathematics CS204: Spring, 2008 Jong C. Park Computer Science Department KAIST Today s Topics Combinatorial Circuits Properties of Combinatorial Circuits Boolean Algebras Boolean Functions and

More information

CprE 281: Digital Logic

CprE 281: Digital Logic CprE 281: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/ NAND and NOR Logic Networks CprE 281: Digital Logic Iowa State University, Ames, IA Copyright Alexander

More information

CprE 281: Digital Logic

CprE 281: Digital Logic CprE 281: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/ NAND and NOR Logic Networks CprE 281: Digital Logic Iowa State University, Ames, IA Copyright Alexander

More information

CprE 281: Digital Logic

CprE 281: Digital Logic CprE 281: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/ Boolean Algebra CprE 281: Digital Logic Iowa State University, Ames, IA Copyright Alexander Stoytchev

More information

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false. Section 1.2 Propositional Equivalences A tautology is a proposition which is always true. Classic Example: P P A contradiction is a proposition which is always false. Classic Example: P P A contingency

More information

4 Switching Algebra 4.1 Axioms; Signals and Switching Algebra

4 Switching Algebra 4.1 Axioms; Signals and Switching Algebra 4 Switching Algebra 4.1 Axioms; Signals and Switching Algebra To design a digital circuit that will perform a required function, it is necessary to manipulate and combine the various input signals in certain

More information

KP/Worksheets: Propositional Logic, Boolean Algebra and Computer Hardware Page 1 of 8

KP/Worksheets: Propositional Logic, Boolean Algebra and Computer Hardware Page 1 of 8 KP/Worksheets: Propositional Logic, Boolean Algebra and Computer Hardware Page 1 of 8 Q1. What is a Proposition? Q2. What are Simple and Compound Propositions? Q3. What is a Connective? Q4. What are Sentential

More information

cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference

cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference quantifiers x P(x) P(x) is true for every x in the domain read as for all x, P of x x P x There is an x in the

More information

Discrete Structures & Algorithms. Propositional Logic EECE 320 // UBC

Discrete Structures & Algorithms. Propositional Logic EECE 320 // UBC Discrete Structures & Algorithms Propositional Logic EECE 320 // UBC 1 Review of last lecture Pancake sorting A problem with many applications Bracketing (bounding a function) Proving bounds for pancake

More information

CSE20: Discrete Mathematics for Computer Science. Lecture Unit 2: Boolan Functions, Logic Circuits, and Implication

CSE20: Discrete Mathematics for Computer Science. Lecture Unit 2: Boolan Functions, Logic Circuits, and Implication CSE20: Discrete Mathematics for Computer Science Lecture Unit 2: Boolan Functions, Logic Circuits, and Implication Disjunctive normal form Example: Let f (x, y, z) =xy z. Write this function in DNF. Minterm

More information

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL. 2017-18 XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL HALF ADDER 1. The circuit that performs addition within the Arithmetic and Logic Unit of the CPU are called adders. 2. A unit that adds two

More information

MAT2345 Discrete Math

MAT2345 Discrete Math Fall 2013 General Syllabus Schedule (note exam dates) Homework, Worksheets, Quizzes, and possibly Programs & Reports Academic Integrity Do Your Own Work Course Web Site: www.eiu.edu/~mathcs Course Overview

More information

Logic design? Transistor as a switch. Layered design approach. CS/COE1541: Introduction to Computer Architecture. Logic Design Review.

Logic design? Transistor as a switch. Layered design approach. CS/COE1541: Introduction to Computer Architecture. Logic Design Review. Logic design? CS/COE54: Introduction to Computer rchitecture Digital hardware is implemented by way of logic design Digital circuits process and produce two discrete values: and Example: -bit full adder

More information

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

Discrete Structures of Computer Science Propositional Logic III Rules of Inference Discrete Structures of Computer Science Propositional Logic III Rules of Inference Gazihan Alankuş (Based on original slides by Brahim Hnich) July 30, 2012 1 Previous Lecture 2 Summary of Laws of Logic

More information

BOOLEAN LOGIC. By- Neha Tyagi PGT CS KV 5 Jaipur II Shift, Jaipur Region. Based on CBSE curriculum Class 11. Neha Tyagi, KV 5 Jaipur II Shift

BOOLEAN LOGIC. By- Neha Tyagi PGT CS KV 5 Jaipur II Shift, Jaipur Region. Based on CBSE curriculum Class 11. Neha Tyagi, KV 5 Jaipur II Shift BOOLEAN LOGIC Based on CBSE curriculum Class 11 By- Neha Tyagi PGT CS KV 5 Jaipur II Shift, Jaipur Region Neha Tyagi, KV 5 Jaipur II Shift Introduction Boolean Logic, also known as boolean algebra was

More information

ICS141: Discrete Mathematics for Computer Science I

ICS141: Discrete Mathematics for Computer Science I ICS141: Discrete Mathematics for Computer Science I Dept. Information & Computer Sci., Originals slides by Dr. Baek and Dr. Still, adapted by J. Stelovsky Based on slides Dr. M. P. Frank and Dr. J.L. Gross

More information

Introduction to Computer Engineering ECE 203

Introduction to Computer Engineering ECE 203 Introduction to Computer Engineering ECE 203 Northwestern University Department of Electrical Engineering and Computer Science Teacher: Robert Dick Office: L477 Tech Email: dickrp@ece.northwestern.edu

More information

Consider the following propositions: p: lecture has started q: If I have a banana, then I have a pear r: I finished this problem

Consider the following propositions: p: lecture has started q: If I have a banana, then I have a pear r: I finished this problem Pre-Lecture Problem Do it! Do it now! What are you waiting for?! Consider the following roositions: : lecture has started : If I have a banana, then I have a ear r: I finished this roblem (i) Which of

More information

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example Announcements CS243: Discrete Structures Propositional Logic II Işıl Dillig First homework assignment out today! Due in one week, i.e., before lecture next Tuesday 09/11 Weilin s Tuesday office hours are

More information

Propositional Logic Logical Implication (4A) Young W. Lim 4/11/17

Propositional Logic Logical Implication (4A) Young W. Lim 4/11/17 Propositional Logic Logical Implication (4A) Young W. Lim Copyright (c) 2016-2017 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

More information

CSE 20. Lecture 4: Introduction to Boolean algebra. CSE 20: Lecture4

CSE 20. Lecture 4: Introduction to Boolean algebra. CSE 20: Lecture4 CSE 20 Lecture 4: Introduction to Boolean algebra Reminder First quiz will be on Friday (17th January) in class. It is a paper quiz. Syllabus is all that has been done till Wednesday. If you want you may

More information

Truth-Functional Logic

Truth-Functional Logic Truth-Functional Logic Syntax Every atomic sentence (A, B, C, ) is a sentence and are sentences With ϕ a sentence, the negation ϕ is a sentence With ϕ and ψ sentences, the conjunction ϕ ψ is a sentence

More information

CS/COE0447: Computer Organization and Assembly Language

CS/COE0447: Computer Organization and Assembly Language CS/COE0447: Computer Organization and Assembly Language Logic Design Introduction (Brief?) Appendix B: The Basics of Logic Design Dept. of Computer Science Logic design? Digital hardware is implemented

More information

CS 226: Digital Logic Design

CS 226: Digital Logic Design CS 226: Digital Logic Design 0 1 1 I S 0 1 0 S Department of Computer Science and Engineering, Indian Institute of Technology Bombay. 1 of 29 Objectives In this lecture we will introduce: 1. Logic functions

More information

Logic Design. Chapter 2: Introduction to Logic Circuits

Logic Design. Chapter 2: Introduction to Logic Circuits Logic Design Chapter 2: Introduction to Logic Circuits Introduction Logic circuits perform operation on digital signal Digital signal: signal values are restricted to a few discrete values Binary logic

More information

CS 173 Lecture 2: Propositional Logic

CS 173 Lecture 2: Propositional Logic CS 173 Lecture 2: Propositional Logic José Meseguer University of Illinois at Urbana-Champaign 1 Propositional Formulas A proposition is a statement that is either true, T or false, F. A proposition usually

More information

Set Theory Basics of Set Theory. mjarrar Watch this lecture and download the slides

Set Theory Basics of Set Theory. mjarrar Watch this lecture and download the slides 9/6/17 Birzeit University Palestine 2015 6.1. Basics of 6.2 Properties of Sets and Element Argument 6.3 Algebraic Proofs mjarrar 2015 1 Watch this lecture and download the slides Course Page: http://www.jarrar.info/courses/dmath/

More information

LAGUARDIA COMMUNITY COLLEGE CITY UNIVERSITY OF NEW YORK NATURAL SCIENCES DEPARTMENT. SCC105: Introduction to Chemistry Fall I 2014

LAGUARDIA COMMUNITY COLLEGE CITY UNIVERSITY OF NEW YORK NATURAL SCIENCES DEPARTMENT. SCC105: Introduction to Chemistry Fall I 2014 LAGUARDIA COMMUNITY COLLEGE CITY UNIVERSITY OF NEW YORK NATURAL SCIENCES DEPARTMENT SCC105: Introduction to Chemistry Fall I 2014 Your Instructor's name Your Instructor's contact information Course Description:

More information

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook) Lecture 2 Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits Reading (Epp s textbook) 2.1-2.4 1 Logic Logic is a system based on statements. A statement (or

More information

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization CS/COE0447: Computer Organization and Assembly Language Logic Design Review Sangyeun Cho Dept. of Computer Science Logic design? Digital hardware is implemented by way of logic design Digital circuits

More information

CpE358/CS381. Switching Theory and Logical Design. Summer

CpE358/CS381. Switching Theory and Logical Design. Summer Switching Theory and Logical Design - Class Schedule Monday Tuesday Wednesday Thursday Friday May 7 8 9 - Class 2 - Class 2 2 24 - Class 3 25 26 - Class 4 27 28 Quiz Commencement 3 June 2 - Class 5 3 -

More information

Computer Organization: Boolean Logic

Computer Organization: Boolean Logic Computer Organization: Boolean Logic Representing and Manipulating Data Last Unit How to represent data as a sequence of bits How to interpret bit representations Use of levels of abstraction in representing

More information

Lecture 2 Review on Digital Logic (Part 1)

Lecture 2 Review on Digital Logic (Part 1) Lecture 2 Review on Digital Logic (Part 1) Xuan Silvia Zhang Washington University in St. Louis http://classes.engineering.wustl.edu/ese461/ Grading Engagement 5% Review Quiz 10% Homework 10% Labs 40%

More information

Logic Gates and Boolean Algebra

Logic Gates and Boolean Algebra Logic Gates and oolean lgebra The ridge etween Symbolic Logic nd Electronic Digital Computing Compiled y: Muzammil hmad Khan mukhan@ssuet.edu.pk asic Logic Functions and or nand nor xor xnor not 2 Logic

More information

1.3 Propositional Equivalences

1.3 Propositional Equivalences 1 1.3 Propositional Equivalences The replacement of a statement with another statement with the same truth is an important step often used in Mathematical arguments. Due to this methods that produce propositions

More information

Numbers and Arithmetic

Numbers and Arithmetic Numbers and Arithmetic See: P&H Chapter 2.4 2.6, 3.2, C.5 C.6 Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University Big Picture: Building a Processor memory inst register file alu

More information

Lecture A: Logic Design and Gates

Lecture A: Logic Design and Gates Lecture A: Logic Design and Gates Syllabus My office hours 9.15-10.35am T,Th or gchoi@ece.tamu.edu 333G WERC Text: Brown and Vranesic Fundamentals of Digital Logic,» Buy it.. Or borrow it» Other book:

More information

General Info. Grading

General Info. Grading Syllabus & Policies General Info Lecture 1: Introduction, Set Theory, and Boolean Algebra Classroom: Perkins 2-072 Time: Mon - Fri, 2:00-3:15 pm Wed, 3:30-4:30 pm Sta 111 Colin Rundel May 13, 2014 Professor:

More information

Adequate set of connectives, logic gates and circuits

Adequate set of connectives, logic gates and circuits Adequate set of connectives, logic gates and circuits Lila Kari University of Waterloo Adequate set of connectives, logic gates and circuits CS245, Logic and Computation 1 / 59 Connectives We have mentioned

More information

Floating Point Representation and Digital Logic. Lecture 11 CS301

Floating Point Representation and Digital Logic. Lecture 11 CS301 Floating Point Representation and Digital Logic Lecture 11 CS301 Administrative Daily Review of today s lecture w Due tomorrow (10/4) at 8am Lab #3 due Friday (9/7) 1:29pm HW #5 assigned w Due Monday 10/8

More information

ECE 545 Digital System Design with VHDL Lecture 1. Digital Logic Refresher Part A Combinational Logic Building Blocks

ECE 545 Digital System Design with VHDL Lecture 1. Digital Logic Refresher Part A Combinational Logic Building Blocks ECE 545 Digital System Design with VHDL Lecture Digital Logic Refresher Part A Combinational Logic Building Blocks Lecture Roadmap Combinational Logic Basic Logic Review Basic Gates De Morgan s Law Combinational

More information

Solutions to Homework I (1.1)

Solutions to Homework I (1.1) Solutions to Homework I (1.1) Problem 1 Determine whether each of these compound propositions is satisable. a) (p q) ( p q) ( p q) b) (p q) (p q) ( p q) ( p q) c) (p q) ( p q) (a) p q p q p q p q p q (p

More information

Combinational Logic. Review of Combinational Logic 1

Combinational Logic. Review of Combinational Logic 1 Combinational Logic! Switches -> Boolean algebra! Representation of Boolean functions! Logic circuit elements - logic gates! Regular logic structures! Timing behavior of combinational logic! HDLs and combinational

More information

EECS 1028 M: Discrete Mathematics for Engineers

EECS 1028 M: Discrete Mathematics for Engineers EECS 1028 M: Discrete Mathematics for Engineers Suprakash Datta Office: LAS 3043 Course page: http://www.eecs.yorku.ca/course/1028 Also on Moodle S. Datta (York Univ.) EECS 1028 W 18 1 / 12 Using the laws

More information

Propositional Logic Logical Implication (4A) Young W. Lim 4/21/17

Propositional Logic Logical Implication (4A) Young W. Lim 4/21/17 Propositional Logic Logical Implication (4A) Young W. Lim Copyright (c) 2016-2017 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

More information

Note: The area of logic that deals with propositions is called the propositional calculus or propositional logic.

Note: The area of logic that deals with propositions is called the propositional calculus or propositional logic. Ch. 1.1 Logic Logic 1 Def. A Proposition is a statement that is either true or false. Example 1: Which of the following are propositions? Statement Proposition (yes or no) UHD is a University 1 + 3 = 0

More information

Combinational logic. Possible logic functions of two variables. Minimal set of functions. Cost of different logic functions.

Combinational logic. Possible logic functions of two variables. Minimal set of functions. Cost of different logic functions. Combinational logic Possible logic functions of two variables Logic functions, truth tables, and switches NOT, ND, OR, NND, NOR, OR,... Minimal set xioms and theorems of oolean algebra Proofs by re-writing

More information

2/13/2012. Logic: Truth Tables. CS160 Rosen Chapter 1. Logic?

2/13/2012. Logic: Truth Tables. CS160 Rosen Chapter 1. Logic? Logic: Truth Tables CS160 Rosen Chapter 1 Logic? 1 What is logic? Logic is a truth-preserving system of inference Truth-preserving: If the initial statements are true, the inferred statements will be true

More information

Boolean Algebra. Philipp Koehn. 9 September 2016

Boolean Algebra. Philipp Koehn. 9 September 2016 Boolean Algebra Philipp Koehn 9 September 2016 Core Boolean Operators 1 AND OR NOT A B A and B 0 0 0 0 1 0 1 0 0 1 1 1 A B A or B 0 0 0 0 1 1 1 0 1 1 1 1 A not A 0 1 1 0 AND OR NOT 2 Boolean algebra Boolean

More information

Logic Synthesis and Verification

Logic Synthesis and Verification Logic Synthesis and Verification Boolean Algebra Jie-Hong Roland Jiang 江介宏 Department of Electrical Engineering National Taiwan University Fall 2014 1 2 Boolean Algebra Reading F. M. Brown. Boolean Reasoning:

More information

ECE 545 Digital System Design with VHDL Lecture 1A. Digital Logic Refresher Part A Combinational Logic Building Blocks

ECE 545 Digital System Design with VHDL Lecture 1A. Digital Logic Refresher Part A Combinational Logic Building Blocks ECE 545 Digital System Design with VHDL Lecture A Digital Logic Refresher Part A Combinational Logic Building Blocks Lecture Roadmap Combinational Logic Basic Logic Review Basic Gates De Morgan s Laws

More information

Announcement. Homework 1

Announcement. Homework 1 Announcement I made a few small changes to the course calendar No class on Wed eb 27 th, watch the video lecture Quiz 8 will take place on Monday April 15 th We will submit assignments using Gradescope

More information

The Logic of Compound Statements cont.

The Logic of Compound Statements cont. The Logic of Compound Statements cont. CSE 215, Computer Science 1, Fall 2011 Stony Brook University http://www.cs.stonybrook.edu/~cse215 Refresh from last time: Logical Equivalences Commutativity of :

More information

Fundamentals of Digital Design

Fundamentals of Digital Design Fundamentals of Digital Design Digital Radiation Measurement and Spectroscopy NE/RHP 537 1 Binary Number System The binary numeral system, or base-2 number system, is a numeral system that represents numeric

More information

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization Logic design? CS/COE0447: Computer Organization and Assembly Language Logic Design Review Digital hardware is implemented by way of logic design Digital circuits process and produce two discrete values:

More information

Overview, cont. Overview, cont. Logistics. Optional Reference #1. Optional Reference #2. Workload and Grading

Overview, cont. Overview, cont. Logistics. Optional Reference #1. Optional Reference #2. Workload and Grading Course staff CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics şıl Dillig nstructor: şil Dillig E-mail: isil@cs.utexas.edu Office hours: Thursday after class until 6:30 pm

More information

Chapter 4, Logic using Propositional Calculus Handout

Chapter 4, Logic using Propositional Calculus Handout ECS 20 Chapter 4, Logic using Propositional Calculus Handout 0. Introduction to Discrete Mathematics. 0.1. Discrete = Individually separate and distinct as opposed to continuous and capable of infinitesimal

More information

CISC-102 Winter 2016 Lecture 17

CISC-102 Winter 2016 Lecture 17 CISC-102 Winter 2016 Lecture 17 Logic and Propositional Calculus Propositional logic was eventually refined using symbolic logic. The 17th/18th century philosopher Gottfried Leibniz (an inventor of calculus)

More information

1. Name the person who developed Boolean algebra

1. Name the person who developed Boolean algebra MATHEMATIC CENTER D96 MUNIRKA VILLAGE NEW DELHI 67 & VIKAS PURI NEW DELHI CONTACT FOR COACHING MATHEMATICS FOR TH 2TH NDA DIPLOMA SSC CAT SAT CPT CONTACT FOR ADMISSION GUIDANCE B.TECH BBA BCA, MCA MBA

More information

UC Berkeley College of Engineering, EECS Department CS61C: Representations of Combinational Logic Circuits

UC Berkeley College of Engineering, EECS Department CS61C: Representations of Combinational Logic Circuits 2 Wawrzynek, Garcia 2004 c UCB UC Berkeley College of Engineering, EECS Department CS61C: Representations of Combinational Logic Circuits 1 Introduction Original document by J. Wawrzynek (2003-11-15) Revised

More information

Numbers & Arithmetic. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. See: P&H Chapter , 3.2, C.5 C.

Numbers & Arithmetic. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. See: P&H Chapter , 3.2, C.5 C. Numbers & Arithmetic Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University See: P&H Chapter 2.4-2.6, 3.2, C.5 C.6 Example: Big Picture Computer System Organization and Programming

More information

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014 Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014 1. Translate each of the following English sentences into formal statements using the logical operators (,,,,, and ). You may also use mathematical

More information