Fall 2002CMSC 203 - Discrete Structures1 Yes, No, Maybe... Boolean Algebra.

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Chapter 2 Logic Circuits.
Logic Gate Level Part 2. Constructing Boolean expression from truth table First method: write nonparenthesized OR of ANDs Each AND is a 1 in the result.
1 Section 10.1 Boolean Functions. 2 Computers & Boolean Algebra Circuits in computers have inputs whose values are either 0 or 1 Mathematician George.
Boolean Algebra and Logic Gates
Lattice and Boolean Algebra
Lecture 3. Boolean Algebra, Logic Gates
Algebra Algebra – defined by the tuple:  A, o 1, …, o k ; R 1, …, R m ; c 1, …, c k  Where: A is a non-empty set o i is the function, o i : A p i  A.
Boolean Algebra أ. زينب آل كاظم 1. Boolean Functions In Boolean algebra we work with the set {0,1}, where: 0 ≡ F (False) & 1 ≡ T (True). The 3 Operations.
Boolean Functions.
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.
Boolean Algebra Computer Organization 1 © McQuain Boolean Algebra A Boolean algebra is a set B of values together with: -two binary operations,
Chapter 10.1 and 10.2: Boolean Algebra Based on Slides from Discrete Mathematical Structures: Theory and Applications.
Boolean Algebra and Logic Gates CE 40 B 18 June 2003.
1 Logic Gates Digital Computer Logic Kashif Bashir WWW:
Applied Discrete Mathematics Week 13: Boolean Algebra
Discrete Mathematics CS 2610 February 19, Logic Gates: the basic elements of circuits Electronic circuits consist of so-called gates connected.
Combinational Logic 1.
Chapter 2. Outlines 2.1 Introduction 2.2 Basic Definitions 2.3 Axiomatic Definition of Boolean Algebra 2.4 Basic thermos and proprieties of Boolean Algebra.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
Discrete Mathematics CS 2610 February 12, Agenda Previously Finished functions Began Boolean algebras And now Continue with Boolean algebras.
June 11, 2002© Howard Huang1 Boolean algebra Last time we talked about Boolean functions, Boolean expressions, and truth tables. Today we’ll learn.
Fall 2003CMSC Discrete Structures1 … and now for something completely different… Set Theory Actually, you will see that logic and set theory are.
Discrete Mathematics CS 2610 September Equal Boolean Functions Two Boolean functions F and G of degree n are equal iff for all (x 1,..x n )  B.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
CHAPTER 1 SETS, FUNCTIONs, ELEMENTARY LOGIC & BOOLEAN ALGEBRAs
A. Abhari CPS2131 Chapter 2: Boolean Algebra and Logic Gates Topics in this Chapter: Boolean Algebra Boolean Functions Boolean Function Simplification.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
Logic Circuits Lecture 3 By Amr Al-Awamry. Basic Definitions Binary Operators  AND z = x y = x yz=1 if x=1 AND y=1  OR z = x + y z=1 if x=1 OR y=1 
Boolean Algebra M. AL- Towaileb1. Boolean Functions In Boolean algebra we work with the set {0,1}, where: 0 ≡ F (False) & 1 ≡ T (True). The 3 Operations.
BOOLEAN ALGEBRA Kamrul Ahsan Teacher of
Discrete Mathematics CS 2610 February 10, Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 9 Boolean Algebras and Combinatorial Circuits.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
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.
Boolean Algebra.
Basic Laws, theorems, and postulates of Boolean Algebra
CHAPTER 2 Boolean algebra and Logic gates
Chapter 12. Chapter Summary Boolean Functions Representing Boolean Functions Logic Gates Minimization of Circuits (not currently included in overheads)
Boolean Algebra & Logic Gates
CS2100 Computer Organisation
Chapter 11 (Part 1): Boolean Algebra
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2 Instructor: Andrew B. Kahng (lecture)
CS 105 Digital Logic Design
… and now for the Final Topic:
CHAPTER 2 Boolean Algebra This chapter in the book includes:
Princess Sumaya University
CHAPTER 3 SETS AND BOOLEAN ALGEBRA
Boolean Algebra A Boolean algebra is a set B of values together with:
Boolean algebra Last time we talked about Boolean functions, Boolean expressions, and truth tables. Today we’ll learn how to how use Boolean algebra to.
September 7 Notes Boolean Algebra.
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
Discrete Mathematics CS 2610
CMSC Discrete Structures
BooleanAlgebra.
Chapter 2 Boolean Algebra and Logic Gate
Boolean Algebra L Al-zaid Math1101.
Yes, No, Maybe... BooleanAlgebra 12/10/2018.
Chapter 10.1 and 10.2: Boolean Algebra
Chapter 10.1 and 10.2: Boolean Algebra
Chapter 10.1 and 10.2: Boolean Algebra
Applied Discrete Mathematics Week 4: Functions
COMS 361 Computer Organization
Instructor: Alexander Stoytchev
Introductory Concepts
Chapter 10.1 and 10.2: Boolean Algebra
CMSC Discrete Structures
Presentation transcript:

Fall 2002CMSC Discrete Structures1 Yes, No, Maybe... Boolean Algebra

Fall 2002CMSC Discrete Structures2 Boolean Algebra Boolean algebra provides the operations and the rules for working with the set {0, 1}. These are the rules that underlie electronic circuits, and the methods we will discuss are fundamental to VLSI design. We are going to focus on three operations: Boolean complementation, Boolean complementation, Boolean sum, and Boolean sum, and Boolean product Boolean product

Fall 2002CMSC Discrete Structures3 Boolean Operations The complement is denoted by a bar (on the slides, we will use a minus sign). It is defined by -0 = 1 and -1 = 0. The Boolean sum, denoted by + or by OR, has the following values: = 1, = 1, = 1, = 0 The Boolean product, denoted by  or by AND, has the following values: 1  1 = 1, 1  0 = 0, 0  1 = 0, 0  0 = 0

Fall 2002CMSC Discrete Structures4 Boolean Functions and Expressions Definition: Let B = {0, 1}. The variable x is called a Boolean variable if it assumes values only from B. A function from B n, the set {(x 1, x 2, …, x n ) |x i  B, 1  i  n}, to B is called a Boolean function of degree n. Boolean functions can be represented using expressions made up from the variables and Boolean operations.

Fall 2002CMSC Discrete Structures5 Boolean Functions and Expressions The Boolean expressions in the variables x 1, x 2, …, x n are defined recursively as follows: 0, 1, x 1, x 2, …, x n are Boolean expressions. 0, 1, x 1, x 2, …, x n are Boolean expressions. If E 1 and E 2 are Boolean expressions, then (-E 1 ), (E 1 E 2 ), and (E 1 + E 2 ) are Boolean expressions. If E 1 and E 2 are Boolean expressions, then (-E 1 ), (E 1 E 2 ), and (E 1 + E 2 ) are Boolean expressions. Each Boolean expression represents a Boolean function. The values of this function are obtained by substituting 0 and 1 for the variables in the expression.

Fall 2002CMSC Discrete Structures6 Boolean Functions and Expressions For example, we can create Boolean expression in the variables x, y, and z using the “building blocks” 0, 1, x, y, and z, and the construction rules: Since x and y are Boolean expressions, so is xy. Since z is a Boolean expression, so is (-z). Since xy and (-z) are expressions, so is xy + (-z). … and so on…

Fall 2002CMSC Discrete Structures7 Boolean Functions and Expressions Example: Give a Boolean expression for the Boolean function F(x, y) as defined by the following table: xy F(x, y) Possible solution: F(x, y) = (-x)  y

Fall 2002CMSC Discrete Structures8 Boolean Functions and Expressions Another Example: Possible solution I: F(x, y, z) = -(xz + y) F(x, y, z) z yx Possible solution II: F(x, y, z) = (-(xz))(-y)

Fall 2002CMSC Discrete Structures9 Boolean Functions and Expressions There is a simple method for deriving a Boolean expression for a function that is defined by a table. This method is based on minterms. Definition: A literal is a Boolean variable or its complement. A minterm of the Boolean variables x 1, x 2, …, x n is a Boolean product y 1 y 2 …y n, where y i = x i or y i = -x i. Hence, a minterm is a product of n literals, with one literal for each variable.

Fall 2002CMSC Discrete Structures10 Boolean Functions and Expressions Consider F(x,y,z) again: F(x, y, z) = 1 if and only if: x = y = z = 0 or x = y = 0, z = 1 or x = 1, y = z = 0 Therefore, F(x, y, z) = (-x)(-y)(-z) + (-x)(-y)z + x(-y)(-z) F(x, y, z) z yx

Fall 2002CMSC Discrete Structures11 Boolean Functions and Expressions Definition: The Boolean functions F and G of n variables are equal if and only if F(b 1, b 2, …, b n ) = G(b 1, b 2, …, b n ) whenever b 1, b 2, …, b n belong to B. Two different Boolean expressions that represent the same function are called equivalent. For example, the Boolean expressions xy, xy + 0, and xy  1 are equivalent.

Fall 2002CMSC Discrete Structures12 Boolean Functions and Expressions The complement of the Boolean function F is the function –F, where –F(b 1, b 2, …, b n ) = -(F(b 1, b 2, …, b n )). Let F and G be Boolean functions of degree n. The Boolean sum F+G and Boolean product FG are then defined by (F + G)(b 1, b 2, …, b n ) = F(b 1, b 2, …, b n ) + G(b 1, b 2, …, b n ) (FG)(b 1, b 2, …, b n ) = F(b 1, b 2, …, b n ) G(b 1, b 2, …, b n )

Fall 2002CMSC Discrete Structures13 Boolean Functions and Expressions Question: How many different Boolean functions of degree 1 are there? Solution: There are four of them, F 1, F 2, F 3, and F 4 : x F1F1F1F1 F2F2F2F2 F3F3F3F3 F4F4F4F

Fall 2002CMSC Discrete Structures14 Boolean Functions and Expressions Question: How many different Boolean functions of degree 2 are there? Solution: There are 16 of them, F 1, F 2, …, F 16 :

Fall 2002CMSC Discrete Structures15 Boolean Functions and Expressions Question: How many different Boolean functions of degree n are there? Solution: There are 2 n different n-tuples of 0s and 1s. A Boolean function is an assignment of 0 or 1 to each of these 2 n different n-tuples. Therefore, there are 2 2 n different Boolean functions.

Fall 2002CMSC Discrete Structures16Duality There are useful identities of Boolean expressions that can help us to transform an expression A into an equivalent expression B (see Table 5 on page 597 in the textbook). We can derive additional identities with the help of the dual of a Boolean expression. The dual of a Boolean expression is obtained by interchanging Boolean sums and Boolean products and interchanging 0s and 1s.

Fall 2002CMSC Discrete Structures17DualityExamples: The dual of x(y + z) is x + yz. The dual of -x  1 + (-y + z) is (-x + 0)((-y)z). The dual of a Boolean function F represented by a Boolean expression is the function represented by the dual of this expression. This dual function, denoted by F d, does not depend on the particular Boolean expression used to represent F.

Fall 2002CMSC Discrete Structures18Duality Therefore, an identity between functions represented by Boolean expressions remains valid when the duals of both sides of the identity are taken. We can use this fact, called the duality principle, to derive new identities. For example, consider the absorption law x(x + y) = x. By taking the duals of both sides of this identity, we obtain the equation x + xy = x, which is also an identity (and also called an absorption law).

Fall 2002CMSC Discrete Structures19 Definition of a Boolean Algebra All the properties of Boolean functions and expressions that we have discovered also apply to other mathematical structures such as propositions and sets and the operations defined on them. If we can show that a particular structure is a Boolean algebra, then we know that all results established about Boolean algebras apply to this structure. For this purpose, we need an abstract definition of a Boolean algebra.

Fall 2002CMSC Discrete Structures20 Definition of a Boolean Algebra Definition: A Boolean algebra is a set B with two binary operations  and , elements 0 and 1, and a unary operation – such that the following properties hold for all x, y, and z in B: x  0 = x and x  1 = x (identity laws) x  (-x) = 1 and x  (-x) = 0 (domination laws) (x  y)  z = x  (y  z) and (x  y)  z = x  (y  z) and (associative laws) x  y = y  x and x  y = y  x (commutative laws) x  (y  z) = (x  y)  (x  z) and x  (y  z) = (x  y)  (x  z) (distributive laws)

Fall 2002CMSC Discrete Structures21 Logic Gates Electronic circuits consist of so-called gates. There are three basic types of gates: xy x+y OR gate AND gate xy xy x-xinverter

Fall 2002CMSC Discrete Structures22 Logic Gates Example: How can we build a circuit that computes the function xy + (-x)y ? xy + (-x)y xy xy x -x y (-x)y

Fall 2002CMSC Discrete Structures23 The End