Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7.1 – 7.2 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean.

Slides:



Advertisements
Similar presentations
CSE 311: Foundations of Computing Fall 2013 Lecture 3: Logic and Boolean algebra.
Advertisements

Copyright © Cengage Learning. All rights reserved.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Copyright © Cengage Learning. All rights reserved. CHAPTER 1 SPEAKING MATHEMATICALLY SPEAKING MATHEMATICALLY.
Denoting the beginning
1 Section 1.7 Set Operations. 2 Union The union of 2 sets A and B is the set containing elements found either in A, or in B, or in both The denotation.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapter 2 -Part 2.
1 Section 10.1 Boolean Functions. 2 Computers & Boolean Algebra Circuits in computers have inputs whose values are either 0 or 1 Mathematician George.
Section 10.3 Logic Gates.
Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –
Copyright © Cengage Learning. All rights reserved. CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS THE LOGIC OF COMPOUND STATEMENTS.
Lecture 3. Boolean Algebra, Logic Gates
1 CSE 20: Lecture 7 Boolean Algebra CK Cheng 4/21/2011.
Propositional Calculus Math Foundations of Computer Science.
Propositional Equivalence Goal: Show how propositional equivalences are established & introduce the most important such equivalences.
Binary Logic and Gates COE 202 Digital Logic Design Dr. Aiman El-Maleh
Section Section Summary Introduction to Boolean Algebra Boolean Expressions and Boolean Functions Identities of Boolean Algebra Duality The Abstract.
Lecture 3. Boolean Algebra, Logic Gates Prof. Sin-Min Lee Department of Computer Science 2x.
Boolean Algebra – I. Outline  Introduction  Digital circuits  Boolean Algebra  Two-Valued Boolean Algebra  Boolean Algebra Postulates  Precedence.
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
1 Introduction to Abstract Mathematics Applications : Digital Logic Circuits 2.4 and Number Systems 2.5 Instructor: Hayk Melikya
Copyright © Curt Hill Truth Tables A way to show Boolean Operations.
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 3.7 Switching Circuits.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
Course contents Chapter 1 - section 1.6 Chapter 2 - all sections Chapter – 4.7, and 4.12 Chapter , Chapter 6 - all sections.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Chapter 7 Review Important Terms, Symbols, Concepts 7.1. Logic A proposition is a statement (not a question.
4. Electrons and electronics 4.5 Digital electronics.
Set A formal collection of objects, which can be anything May be finite or infinite Can be defined by: – Listing the elements – Drawing a picture – Writing.
ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2.
Linear Algebra. Circuits The circuits in computers and other input devices have inputs, each of which is either a 0 or 1, the output is also 0s and 1s.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
CompSci 102 Discrete Math for Computer Science
Logic Gates & Boolean Algebra Chin-Sung Lin Eleanor Roosevelt High School.
Discrete Mathematics CS 2610 February 12, Agenda Previously Finished functions Began Boolean algebras And now Continue with Boolean algebras.
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7.1 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesBoolean Algebra.
Mathematical Preliminaries
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
Chapter 2 With Question/Answer Animations. Section 2.1.
Section 3.4 Boolean Algebra. A link between:  Section 1.3: Logic Systems  Section 3.3: Set Systems Application:  Section 3.5: Logic Circuits in Computer.
Logic Gates M. AL-Towaileb1. Introduction Boolean algebra is used to model the circuitry of electronic devices. Each input and each output of such a device.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 9 Boolean Algebras and Combinatorial Circuits.
Symbolic Logic The Following slide were written using materials from the Book: The Following slide were written using materials from the Book: Discrete.
ECE DIGITAL LOGIC LECTURE 6: BOOLEAN ALGEBRA Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 02/01/2016.
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesBoolean Algebra.
August 2003 CIS102/LECTURE 9/FKS 1 Mathematics for Computing Lecture 9 LOGIC Chapter 3.
Boolean Algebras Lecture 24 Section 5.3 Wed, Mar 22, 2006.
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean Logic.
Boolean Algebra.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Chapter 12. Chapter Summary Boolean Functions Representing Boolean Functions Logic Gates Minimization of Circuits (not currently included in overheads)
Boolean Algebra & Logic Gates
Truth Table to Statement Form
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
Chapter 11 (Part 1): Boolean Algebra
Propositional Equivalence
Unit 2 Boolean Algebra.
Citra Noviyasari, S.Si, MT
Modeling Arithmetic, Computation, and Languages
Boolean Algebra A Boolean algebra is a set B of values together with:
Propositional Calculus: Boolean Algebra and Simplification
Set Operations Section 2.2.
Information Technology Department
Applications of Propositional Logic
Applied Discrete Mathematics Week 4: Functions
A Brief Summary for Exam 1
Section 3.7 Switching Circuits
Truth tables Mrs. Palmer.
Copyright © Cengage Learning. All rights reserved.
Presentation transcript:

Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7.1 – 7.2 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean Logic and Computer Logic

Review: Boolean algebra Definition A Boolean algebra consists of a set of elements B two binary operations and one unary operation two distinct elements 0 and 1 such that the following properties hold for all x, y, z  B  (Idempotency can be derived from these properties) x + x = x x * x = x Properties 1. x + y = y + x (commutative properties) 2. (x + y) + z = x + (y + z) (associative properties) 3. x + (y * z) = (x + y) * (x + z) (distributive properties) 4. x + 0 = x (identity properties) 5. x + x = 1 (complement properties) And 1. x * y = y * x (commutative properties) 2. (x* y) * z = x * (y * z) (associative properties) 3. x * (y + z) = (x * y) + (x * z) (distributive properties) 4. x * 1 = x (identity properties) 5. x * x = 0 (complement properties) Section 7.2Logic Networks1

Example Let B = {0, 1} and define + by x + y = max(x, y), * by x * y = min(x, y), and ′ as follows: 0′ = 1, 1′ = 0. It is possible to verify all of the properties in the definition of a Boolean algebra using brute force. For example for property 2, associativity of *: (0*0)*0 = 0*(0*0) = 0 (0*0)*1 = 0*(0*1) = 0 (0*1)*0 = 0*(1*0) = 0... (1*1)*1 = 1*(1*1) = 1 Property 4, identity for addition: x + 0 = x For x = 0, = 0 For x = 1, = 1 Although it is tedious you can use this approach to show that [{0, 1}, max, min, (0′ = 1, 1′ = 0), 0, 1] satisfies the requirements of a Boolean algebra. Section 7.2Logic Networks2

Tautological Equivalences in Propositional Logic Example: Let  be disjunction (or) and  be conjunction (and); A′ is the negation of A, 0 is a contradiction, 1 is a tautology. then A  B = B  A, A  B = B  A (commutative), A  0 = A, A  1 = A (identity property) A  A′ = 1, A  A′ = 0 (complement property) Associative and distributive properties can also be shown Thus Propositional Logic has all the properties of a Boolean algebra Equivalences Among the Subsets of a Universal Set S Example: Let  and  be set union and inter- section, A′ is the complement of a set,  is the empty set, S is the universal set. Then A  B = B  A, A  B = B  A (commutative), A   = A, A  S = A (identity property) A  A′ = 1, A  A′ =  (complement property) Associative & distributive properties can also be shown Set identities have the properties of a Boolean algebra. Section 7.2Logic Networks3 Review

Examples of Boolean Algebras Propositional Logic [B = {statements}, + and * =  and , the unary operator contradicts (changes truth value of) a statement, and contradiction and tautology are equivalent of 0 and 1]. (0 is a statement that is always false, 1 is a statement that is always true.) Subsets of some set S also are the elements that form a Boolean algebra under the operations , , and set complementation, with 0/1 elements being  and S. Section 7.2Logic Networks4

Section 7.2Logic Networks5 Combinational Networks Basic logic elements Imagine that the electrical voltages carried along wires fall into one of two ranges, high or low, which we shall represent by 1 and 0, respectively. Voltage fluctuations within these ranges are ignored, so we are forcing a binary mask on an analog phenomenon. Also suppose that switches can be wired so that a signal of 1 causes the switch to be closed and a signal of 0 causes the switch to be open as seen in figure below. Combine two such switches, controlled by lines x 1 and x 2, in parallel. The figure below illustrates the various cases. Fig. 7.6

Combinational Networks Table 7.2 summarizes the behavior of the circuit in figure 7.6 x 1 x 2 Output If you interpret 1 as True and 0 as False (as most programming languages do) then this is the truth table for disjunction (logical or). Section 7.2Logic Networks6

Section 7.2Logic Networks7 Basic Logic Elements The OR gate, Figure (a), behaves like the Boolean operation +. (x + 0 = x, x + x = x) The AND gate, Figure (b), represents the Boolean operation *. (x * 1 = x, x * x = x) Figure (c) shows an inverter, corresponding to the unary Boolean operation. Because of the associativity property for and, the OR and AND gates can have more than two inputs.

Section 7.2Logic Networks8 Boolean Expressions DEFINITION: BOOLEAN EXPRESSION A Boolean expression in n variables, x 1, x 2,..., x n, is any finite string of symbols formed by applying the following rules: 1. x 1, x 2,..., x n are Boolean expressions. 2. If P and Q are Boolean expressions, so are (P + Q), (P  Q), and (P). x 3, (x 1 + x 2 )x 3, (x 1 x 3 + x 4 )x 2, and (x 1 x 2 )x 1 are all Boolean expressions. In propositional logic, the logical connectives , , and are instances of the operations of a Boolean algebra.

Section 7.2Logic Networks9 Truth Functions DEFINITION: TRUTH FUNCTION A truth function is a function f such that f:{0,1} n  {0,1} for some integer n  1. The notation {0,1} n denotes the set of all n-tuples of 0s and 1s. A truth function thus associates a value of 0 or 1 with each such n-tuple. Example: The Boolean expression x 1 x 2 + x 3 defines the truth function given in Table 7.3 below:

Section 7.2Logic Networks10 Networks and Expressions By combining AND gates, OR gates, and inverters, we can construct a logic network representing a given Boolean expression that produces the same truth function as that expression. Example: Logic network for Boolean expression x 1 x 2 + x 3 is shown in the figure below: Example: Logic network for Boolean expression (x 1 x 2 + x 3 ) + x 3 is shown in the figure below: