Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Presented by: Ms. Maria Estrellita D. Hechanova, ECE
Lecture 5 EGRE 254 1/28/09. 2 Boolean algebra a.k.a. “switching algebra” –deals with Boolean values -- 0, 1 Positive-logic convention –analog voltages.
CSE 20 Lecture 9 Boolean Algebra: Theorems and Proofs CK Cheng April 26, 2011 Lecture notes 1.
CS2100 Computer Organisation
Chapter 2 Logic Circuits.
ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic.
ECE 331 – Digital System Design
1 Section 10.1 Boolean Functions. 2 Computers & Boolean Algebra Circuits in computers have inputs whose values are either 0 or 1 Mathematician George.
CS1104: Computer Organisation Lecture 3: Boolean Algebra
Lattice and Boolean Algebra
Fall 2002CMSC Discrete Structures1 Yes, No, Maybe... Boolean Algebra.
Boolean Algebra Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
CHAPTER 2 Boolean Algebra
CS1104: Computer Organisation School of Computing National University of Singapore.
Binary Logic and Gates Binary variables take on one of two values.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Boolean Algebra and Digital Circuits
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.
Module 4.  Boolean Algebra is used to simplify the design of digital logic circuits.  The design simplification are based on: Postulates of Boolean.
1 Boolean Algebra  Digital circuits Digital circuits  Boolean Algebra Boolean Algebra  Two-Valued Boolean Algebra Two-Valued Boolean Algebra  Boolean.
KFUPM COE 202: Digital Logic Design Combinational Logic Part 1 Courtesy of Dr. Ahmad Almulhem.
Lecture 3. Combinational Logic 1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
Boolean Algebra – II. Outline  Basic Theorems of Boolean Algebra  Boolean Functions  Complement of Functions  Standard Forms.
A. Abhari CPS2131 Chapter 2: Boolean Algebra and Logic Gates Topics in this Chapter: Boolean Algebra Boolean Functions Boolean Function Simplification.
Lecture 4 Boolean Algebra. Logical Statements °A proposition that may or may not be true: Today is Monday Today is Sunday It is raining °Compound Statements.
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 
© BYU 03 BA1 Page 1 ECEn 224 Boolean Algebra – Part 1.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 9 Boolean Algebras and Combinatorial Circuits.
Boolean Functions and Boolean Algebra Laxmikant Kale.
Ahmad Almulhem, KFUPM 2009 COE 202: Digital Logic Design Combinational Logic Part 1 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 4 Dr. Shi Dept. of Electrical and Computer Engineering.
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
Boolean Algebra. BOOLEAN ALGEBRA Formal logic: In formal logic, a statement (proposition) is a declarative sentence that is either true(1) or false (0).
1 CS 352 Introduction to Logic Design Lecture 1 Ahmed Ezzat Number Systems and Boolean Algebra, Ch-1 + Ch-2.
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.
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)
ECE 301 – Digital Electronics
CS2100 Computer Organisation
Chapter 11 (Part 1): Boolean Algebra
Boolean Algebra.
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2 Instructor: Andrew B. Kahng (lecture)
CS 105 Digital Logic Design
Gate Circuits and Boolean Equations
CHAPTER 2 Boolean Algebra
CHAPTER 2 Boolean Algebra This chapter in the book includes:
Princess Sumaya University
Boolean Algebra – Part 1 ECEn 224.
SLIDES FOR CHAPTER 2 BOOLEAN ALGEBRA
FIGURES FOR CHAPTER 2 BOOLEAN ALGEBRA
Lecture 3: Boolean Algebra
Boolean Algebra.
Boolean Algebra.
Boolean Algebra & Logic Circuits
Basic Logic Gates 1.
Chapter 2 Boolean Algebra and Logic Gate
COE 202: Digital Logic Design Combinational Logic Part 1
CSE 370 – Winter Combinational Logic - 1
Boolean Algebra Introduction CSCI 240
COMS 361 Computer Organization
Lecture 3: Boolean Algebra
ECE 352 Digital System Fundamentals
Lecture 3: Boolean Algebra
BOOLEAN ALGEBRA.
Presentation transcript:

Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI CSCI 240 Boolean Algebra

Dale Roberts Boolean Algebra We observed in our introduction that early in the development of computer hardware, a decision was made to use binary circuits because it greatly simplified the electronic circuit design. In order to work with binary circuits, it is helpful to have a conceptual framework to manipulate the circuits algebraically, building only the final “most simple” result. George Boole ( ) developed a mathematical structure to deal with binary operations with just two values. Today, we call these structures Boolean Algebras.

Dale Roberts Boolean Algebra Defined A Boolean Algebra B is defined as a 5-tuple {B, +, *, ’, 0, 1} {B, +, *, ’, 0, 1} + and * are binary operators; they have two operands ’ is a unary operator; it has one operand The following five axioms must hold for any elements a, b, c  {0,1}

Dale Roberts Axioms Law Form 1 Form 2 Commutative a + b = b + a a * b = b * a Distributive a + (b * c) = (a + b)*(a + c) a * (b + c) = (a * b)+(a * c) Identity a + 0 = a a * 1 = a Complement a + a’ = 1 a * a’ = 0

Dale Roberts Boolean Algebra is not regular algebra! We recognize Form 2 of distributive law: a * (b + c) = (a * b)+(a * c) (Multiplication is distributive over addition) Is Form 1 of distributive law is true? a + (b * c) = (a + b)*(a + c) 4 + (3 * 2) =? (4 + 3)(4 + 2) =? 7 * 6 10 ≠ 42

Dale Roberts Terminology Element 0 is called the zero element. In computer science, we’ll call the 0 element “FALSE”. Element 1 is called the unit element. In computer science, we’ll call the 1 element “TRUE”. In computer science, we’ll call the + operation “OR”. The result of + is called sum. In computer science, we’ll call the * operation “AND”. The result of * is called product. In computer science, we’ll call the ’ operation “NOT”. The result of ’ is called complement. Juxtaposition implies * operation: ab = a * b Operator order of precedence is: (), ’, *, +. a+bc = a+(b*c) ≠ (a+b)*c ab’ = a(b’) ≠ (a*b)’

Dale Roberts Single Bit Boolean Algebra Define a Boolean Algebra where 0 and 1 are bits. 1’ = 0 and 0’ = *

Dale Roberts Proof by Truth Table Consider Form 1 of the distributive theorem: a + (b * c) = (a + b)*(a + c). Is it true for a two bit Boolean Algebra? Can prove using a truth table. How many possible combinations of a, b, and c are there? Three variables, each with two values: 2*2*2 = 2 3 = 8 abcb*ca+(b*c)a+ba+c(a+b)*(a+c)

Dale Roberts Proof by Truth Table (cont) Consider Form 1 of the distributive theorem: a + (b * c) = (a + b)*(a + c). Is it true for a two bit Boolean Algebra? Can prove using a truth table. How many possible combinations of a, b, and c are there? Three variables, each with two values: 2*2*2 = 2 3 = 8 abcb*ca+(b*c)a+ba+c(a+b)*(a+c)

Dale Roberts n-bit Boolean Algebra Single bit Boolean Algebra can be extended to n-bit Boolean Algebra by define sum, product and complement as bit-wise operations Let a = , b = a + b = = a * b = * = a’ = ’ =

Dale Roberts Principle Duality The dual of a statement S is obtained by interchanging * and +; 0 and 1. Write the dual of (a*1)*(0+a’) = 0. (a+0)+(1*a’) = 1 Did you notice that all the original axioms are duals of each other? Thus, the dual of any theorem in a Boolean Algebra is also a theorem. This is called the Principle of Duality.

Dale Roberts Named Theorems All of the following theorems can be proven based on the axioms. They are used so often that they have names. Idempotent a + a = a a * a = a Boundedness a + 1 = 1 a * 0 = 0 Absorption a + (a*b) = a a*(a+b) = a Associative(a+b)+c=a+(b+c)(a*b)*c=a*(b*c) The theorems can be proven for a two-bit Boolean Algebra using a truth table, but you must use the axioms to prove it in general for all Boolean Algebras.

Dale Roberts More Named Theorems Involution (a’)’ = a DeMorgan’s (a+b)’ = a’ * b’ (a*b)’=a’ + b’ DeMorgan’s Laws are particularly important in circuit design. It says that you can get rid of a complemented output by complementing all the inputs and changing ANDs to ORs. (More about circuits coming up…)

Dale Roberts Proof using Theorems Use the properties of Boolean Algebra to reduce (x + y)(x + x) to x. Warning, make sure you use the laws precisely. (x + y)(x + x) Given (x + y)x Idempotent x(x + y) Commutative xAbsorption Unlike truth tables, proofs using Theorems are valid for any boolean algebra, but just bits.

Dale Roberts Standard Form Like regular algebra, Boolean equations can be expressed as a sum of products. Each product is a term of the equation. Consider the term xyx’z. We define a term to be a Fundamental Product (FP) if it does not repeat any literal. Since our term repeats x, is it not FP. You call always minimize a term to make it FP. xyx’z = xx’yz = 0yz (which law) = 0 (which law?) An expression E is sum-of-products form if it is the sum of one ore more FPs, none of which is included in another.

Dale Roberts Sum-of-Products Form 1. Consider E=xz’ + y’z + xyz ’. This is a sum of products, but is not sum-of-products form because xz’ is contained within xyz’. i.e. it can be reduced. (which law?) 2. Consider E=xz’ + x’yz’ + xy’z. This is already sum-of-products form. Any non-zero Boolean expression can be changed to sum- of-products form. (By duality, there is also a product-of- sums form, but it is used less often.)

Dale Roberts Converting to Sum-of-Products Form 1. Use DeMorgan’s Laws and Involution to move complements inside parenthesis until only variables are complemented. 2. Use distributive law to transform in to sum of products 3. Use commutative, idempotent, and complement laws to transform each term into 0 or FP. 4. Use absorption law to make sum-of- products form.

Dale Roberts Example of conversion to sum-of-products form Consider E=((ab)’c)’((a’+c)(b’+c’))’ E=((ab)’’+c’)((a’+c)’+(b’+c’)’) – DeMorgan’s Law E=(ab+c’)(ac’+bc) – DeMorgan’s and Involution Laws E=abac’ + abbc +ac’c’ + bcc’ – Distributive Law E=abc’ + abc + ac’ + 0 – Idempotent and Complement E=ac’ + abc – Absorption Law

Dale Roberts Complete Sum-of-Products Form A complete sum-of-products form is a sum-of- products form where each term involves all the variables. (Each term will have the same number of literals. You can add missing variables by multiplying by 1, where 1 is of the form x + x’. Theorem: Every non-zero Boolean expression can be placed in complete sum-of-products form, and it is unique.

Dale Roberts Complete Sum-of-Products Example Express E(x,y,z) = (x’ + y)’ + x’y in complete sum- of-products form. E = xy’ + x’y – DeMorgan’s Law. If we didn’t know z was involved, we’d think we were done. E=xy’(z + z’) + x’y(z + z’) E=xy’z + xy’z’ + x’yz + x’yz’ – Distributive Law (Don’t simplify using Absorption, or you’ll take it back out of Complete S-O-P form)

Dale RobertsSources Lipschutz, Discrete Mathematics Mowle, A Systematic Approach to Digital Logic Design