Computer Organization 1 Logic and Boolean Algebra.

Slides:



Advertisements
Similar presentations
Goals Determine the true value of statements with AND, OR, IF..THEN. Negate statements with the connectives above Construct truth tables Understand when.
Advertisements

CS128 – Discrete Mathematics for Computer Science
Boolean Algebra and Logic Gate
From Chapter 4 Formal Specification using Z David Lightfoot
PSU CS 106 Computing Fundamentals II Boolean Algebra - Intro HM 1/3/2009.
SEVENTH EDITION and EXPANDED SEVENTH EDITION
Copyright © Cengage Learning. 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.
22C:19 Discrete Math Introduction and Scope Propositions Fall 2011 Sukumar Ghosh.
Adapted from Discrete Math
The Laws of Logic: Boolean Algebra A State High Math Club Presentation START==TRUE.
IB Math Studies – Topic 3. IB Course Guide Description.
Maths and the History of ICT
1.1 Sets and Logic Set – a collection of objects. Set brackets {} are used to enclose the elements of a set. Example: {1, 2, 5, 9} Elements – objects inside.
Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.
Course Outline Book: Discrete Mathematics by K. P. Bogart Topics:
2009/9 1 Logic and Proofs §1.1 Introduction §1.2 Propositional Equivalences §1.3 Predicates and Quantifiers §1.4 Nested Quantifiers §1.5~7 Methods of Proofs.
Lecture for Week Spring.   Introduction to Propositional Logic  Types of Proposition  Operator and Truth table Agenda.
CSC 107 – Programming For Science. Follow-Up From Last Lecture.
CSC Intro. to Computing Lecture 5: Boolean Logic, Gates, & Circuits.
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.
Discrete Mathematics and Its Applications.  The English mathematician George Boole ( ) sought to give symbolic form to Aristotle's system of.
Pratibha Sinha. aU msGg.
Discrete Mathematics Lecture1 Miss.Amal Alshardy.
D75P 34R - HNC Computer Architecture Week 6 Boolean Logic © C Nyssen/Aberdeen College 2004 All images © C Nyssen /Aberdeen College unless otherwise stated.
George Boole English mathematician and a founder of the algebraic tradition in logic. Known as the “founder of the field of computer science.”
CSC 107 – Programming For Science. George Boole  Mathematician from English middle-class  Lived from 1815 – 1864  Started work at age 16 as a teaching.
Chapter 3: Introduction to Logic. Logic Main goal: use logic to analyze arguments (claims) to see if they are valid or invalid. This is useful for math.
MLS 570 Critical Thinking Reading Notes for Fogelin: Propositional Logic Fall Term 2006 North Central College.
1/10/ Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007 Suprakash Datta Office: CSEB 3043 Phone:
Logical Form and Logical Equivalence Lecture 1 Section 1.1 Wed, Jan 12, 2005.
Logic UNIT 1.
Laws of Boolean Algebra Commutative Law Associative Law Distributive Law Identity Law De Morgan's Theorem.
Computer Programming Boolean Logic Trade & Industrial Education
Mathematics for Comter I Lecture 2: Logic (1) Basic definitions Logical operators Translating English sentences.
Symbolic Logic The Following slide were written using materials from the Book: The Following slide were written using materials from the Book: Discrete.
LECTURE 1. Disrete mathematics and its application by rosen 7 th edition THE FOUNDATIONS: LOGIC AND PROOFS 1.1 PROPOSITIONAL LOGIC.
CSS342: Propositions1 Professor: Munehiro Fukuda.
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
If-then statements April 4, What is an if-then statement? One of the postulates we looked at earlier stated: If B is between A and C, then AB +
Joan Ridgway. Basic Concepts of Symbolic Logic Mathematical logic deals with basic statements called propositions. The word “logic” derives from the Greek.
Propositional and predicate logic
GEORGE BOOLE by 3B s.i.a Boole was born in 1815 in the English industrial town of Lincoln. George Boole's father was a tradesman in Lincoln.
Module Code MA0003NI: Computing mathematics Lecture for Week Autumn.
Chapter 1 Logic and proofs
DATA REPRESENTATION IN COMPUTER MEMORY.  Describe the coding system:  Sign and magnitude  1’s Complement and 2’s Complement  Binary Coded Decimal.
George Boole and his Legacy “Standing on the Shoulders of Giants” Richard Henson University of Worcester Presentation for BCS 8 th.
Logic.
Boolean Algebra & Logic Gates
Morgan Kaufmann Publishers
Computer Science 210 Computer Organization
DISCRETE MATHEMATICS CHAPTER I.
Discrete Mathematics Logic.
Truth Tables and Equivalent Statements
CS 202, Spring 2008 Epp, sections 1.1 and 1.2
CSS 342 Data Structures, Algorithms, and Discrete Mathematics I
COMPUTING FUNDAMENTALS
CMSC Discrete Structures
Introduction To Robot Decision Making
Information Technology Department
Computer Science 210 Computer Organization
Fundamentals of Computer Systems
Introduction To Robot Decision Making
Discrete Mathematics Logic.
Logic of Informatics Introduction.
Computer Programming Boolean Logic Trade & Industrial Education
Digital Systems Section 3 Boolean Algebra. Digital Systems Section 3 Boolean Algebra.
Presentation transcript:

Computer Organization 1 Logic and Boolean Algebra

George Boole (1815 – 1864) The original Working Class Boy Made Good, Boole was born in the wrong time, in the wrong place, and in the wrong class - he didn't have a hope of growing up to be a mathematical genius, but he did it anyway. Born in Lincoln, Boole was lucky enough to have a father with a love of maths. Young George took to learning like a politician to a pay rise and, by the age of eight, had outgrown his father's self-taught limits.

George Boole (1815 – 1864) Boole was translating Latin poetry by the age of twelve. By adolescence he was fluent in German, Italian and French. At 16 he became an assistant teacher, at 20 he opened his own school. Depending on mathematical journals borrowed from the local Mechanic's Institute, Boole struggled with Newton's 'Principia' and the works of French mathematicians Laplace and Lagrange.

George Boole (1815 – 1864) Boole's 1847 work, 'The Mathematical Analysis of Logic', expanded on Leibniz' earlier speculations on the correlation between logic and maths, and argued that logic was a discipline of mathematics, rather than philosophy.Leibniz' This paper won him the admiration of the logician Augustus de Morgan (a mentor of Ada Byron's), and a place on the faculty of Queen's in Belfast.Ada Byron Boole came up with a type of linguistic algebra, the three most basic operations of which are AND, OR and NOT. These three functions are the only operations necessary to perform comparisons or basic mathematical functions.

George Boole (1815 – 1864) Boole's system was based on a binary approach, processing only two objects - the yes-no, true-false, on-off, zero-one approach. Boole's systembinary approach, His two value system, separating arguments into different classes which can then be processed according to the presence or absence of a certain property, enabled any proposition - regardless of the number of individual items - to draw logical conclusions.

Boolean algebra - Propositions and Predicates The binary nature of logical propositions (True or False) means that Boolean algebra has applications in computing. A proposition is a statement which can be either true or false. Propositions can be represented by letters. Examples: 'p' stands for the proposition 'you are listening to this lecture' 'q' stands for the proposition '3 + 4 = 9'

Propositions and Predicates Negation The negation of proposition p is the proposition which is false when p is true, and true when p is false. We write the negation of p as p', -p, ~p, p, NOT p

Truth Tables We can draw up representations of the possible values of propositions p p’ OR pp’ TF10 TF10 FT01FT01 The binary digit representation is the accepted computer code for True (1) and False (0)

Predicates and propositions Predicates are like propositions - they can be either true or false - but differ in that they contain variables which prevent the T or F value from being determined right away. Example: 'X > 5' is a predicate because we need to know the value of X before we can determine whether the predicate is true or false. Once a value is assigned, X = 8, say, then the predicate becomes a proposition, 8 > 5, which is true. 'It is red' is a predicate, because we need to know what 'It' is, before we can determine whether the predicate is true or false. Conditions in selections (ifs) and repetitions (for loops) in programming are examples of predicates.

Boolean Operations (Logic operations) Propositions and predicates may be combined using Boolean operators AND OR and NOT to make logical operations. Examples 'p' stands for the proposition 'you are listening to this talk' 'q' stands for ' you are chewing gum' p AND q is a logic operation which stands for 'you are listening to this talk' and ' you are chewing gum'

AND Operator P(x) is a predicate which stands for x > 5 Q(y) is a predicate which stands for y = 8 P(x) AND Q(y) is a logic operation with P(x) and Q(y) as operands, and AND as operator P(x) AND Q(y) stands for 'x > 5 AND y = 8‘ We can often abbreviate to ‘P AND Q’

AND operator The AND operation can be defined by a truth table - using ^ as the symbol for AND : pq p ^ q The AND operation is also known as the conjunction, logical product or intersection. We can write p^q, p.q, pq to mean p AND q.

OR Operator The OR operation can be defined by a truth table - using v as the symbol for OR : pq p v q The OR operation is also known as the inclusive OR, logical sum or union. Also written as p+q, means p OR q

Inclusive or Exclusive OR. In everyday usage, OR has 2 possible meanings: OR can mean one or the other or both (inclusive OR) OR can mean one or the other, but not both (exclusive OR) Inclusive OR: To get a Masters degree you have to follow a postgrad programme or submit a thesis (You might do both) Exclusive OR: You are rich or you are poor (you can't be both) Our truth table above demonstrates inclusive OR Exclusive OR is also important in computing

Exclusive Or (EXOR) operation pq p EXOR q That is, (p EXOR q) is true when p and q are different.

Equivalence (Match)  Operation pq p  q That is, (p  q) is True when p is the same as q. Two operations are equivalent if they have the same truth table. For convenience, we use the = sign for cases where the equivalence operation is true, eg p = q means p  q.

Equivalence Example: Show that (NOT p ^ NOT q) is equivalent to NOT (p v q) Truth table: p q p’q’p’ ^ q’(p v q)(p v q)’

Example Show that A + A’.B = A + B, using a truth table A B A’ A’.B A + B A + A’.B

Example Show that A + 1 = 1 and that A.1 = A A1A + 1A

Summary Propositions and predicates may be combined using logic operations such as negation (‘ ~ not), Union ( + v OR), intersection (^. AND) and Exclusive OR. We can test (and possibly simplify) these logic operations using truth tables.