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.

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

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.
Prof. Sin-Min Lee Department of Computer Science
Chapter 2 Logic Circuits.
Chapter 2 – Combinational Logic Circuits Part 1 – Gate Circuits and Boolean Equations Logic and Computer Design Fundamentals.
CS 151 Digital Systems Design Lecture 6 More Boolean Algebra A B.
1 COMP541 Combinational Logic Montek Singh Jan 16, 2007.
EECC341 - Shaaban #1 Lec # 5 Winter Switching Algebra: Principle of Duality Any theorem or identity in switching algebra remains true if.
1 Section 10.1 Boolean Functions. 2 Computers & Boolean Algebra Circuits in computers have inputs whose values are either 0 or 1 Mathematician George.
Karnaugh Maps for Simplification
Lecture 3. Boolean Algebra, Logic Gates
Fall 2002CMSC Discrete Structures1 Yes, No, Maybe... Boolean Algebra.
IKI a-Simplification of Boolean Functions Bobby Nazief Semester-I The materials on these slides are adopted from those in CS231’s Lecture.
CS231 Fundamentals1 Fundamentals What kind of data do computers work with? – Deep down inside, it’s all 1s and 0s What can you do with 1s and 0s? – Boolean.
Boolean Algebra – the ‘Lingua Franca’ of the Digital World The goal of developing an automata is based on the following (loosely described) ‘ideal’: if.
IKI a-Boolean Algebra Bobby Nazief Semester-I The materials on these slides are adopted from those in CS231’s Lecture Notes at UIUC,
Combinational Logic 1.
Module 4.  Boolean Algebra is used to simplify the design of digital logic circuits.  The design simplification are based on: Postulates of Boolean.
CS231 Boolean Algebra1 K-map Summary K-maps are an alternative to algebra for simplifying expressions. – The result is a minimal sum of products, which.
LOGIC GATES & BOOLEAN ALGEBRA
February 2, 2004CS 2311 Karnaugh maps Last time we saw applications of Boolean logic to circuit design. – The basic Boolean operations are AND, OR and.
June 17, 2002Basic circuit analysis and design1 Example K-map simplification Let’s consider simplifying f(x,y,z) = xy + y’z + xz. First, you should convert.
05 BA2 Page 1 ECEn/CS 224 Boolean Algebra – Part 2.
June 11, 2002© Howard Huang1 Boolean algebra Last time we talked about Boolean functions, Boolean expressions, and truth tables. Today we’ll learn.
Karnaugh Maps (K-Maps)
June 10, 2002© Howard Huang1 Number systems To get started, we’ll discuss one of the fundamental concepts underlying digital computer design:
ENGIN112 L6: More Boolean Algebra September 15, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 6 More Boolean Algebra A B.
CS231 Boolean Algebra1 Summary so far So far: – A bunch of Boolean algebra trickery for simplifying expressions and circuits – The algebra guarantees us.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
© BYU 03 BA1 Page 1 ECEn 224 Boolean Algebra – Part 1.
Boolean Functions and Boolean Algebra Laxmikant Kale.
June 12, 2002© Howard Huang1 Karnaugh maps Last time we saw applications of Boolean logic to circuit design. – The basic Boolean operations are.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
CS231 Boolean Algebra1 The dual idea: products of sums Just to keep you on your toes... A product of sums (POS) expression contains: – Only AND (product)
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.
Lecture 5 More Boolean Algebra A B. Overview °Expressing Boolean functions °Relationships between algebraic equations, symbols, and truth tables °Simplification.
Boolean Algebra.
CS231 Boolean Algebra1 Circuit analysis summary After finding the circuit inputs and outputs, you can come up with either an expression or a truth table.
Mu.com.lec 9. Overview Gates, latches, memories and other logic components are used to design computer systems and their subsystems Good understanding.
CHAPTER 2 Boolean algebra and Logic gates
Digital Logic.
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
Unit 2 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:
Boolean Algebra – Part 1 ECEn 224.
Circuit analysis summary
Lecture 3 Gunjeet Kaur Dronacharya Group of Institutions
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
Propositional Calculus: Boolean Algebra and Simplification
17-Nov-18 Logic Algebra 1 Combinational logic.
Additional Gates and Decoders
Boolean Algebra.
Chapter 2 Boolean Algebra and Logic Gate
CSE 370 – Winter Combinational Logic - 1
Functions Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways: We can represent.
MINTERMS and MAXTERMS Week 3
COMP541 Combinational Logic - II
Dr. Clincy Professor of CS
From now on: Combinatorial Circuits:
ECE 352 Digital System Fundamentals
Karnaugh maps Last time we saw applications of Boolean logic to circuit design. The basic Boolean operations are AND, OR and NOT. These operations can.
Introductory Concepts
Basic circuit analysis and design
Circuit Simplification and
Presentation transcript:

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 simplify Booleans expressions. Last time, we saw this expression and converted it to a circuit: (x + y’)z + x’ June 11, 2002 ©2000-2002 Howard Huang

Simplifying circuits The expression and circuit on the previous page are actually equivalent to the simplified ones below: x’ + z Simpler hardware is always better! In many cases, the simpler circuit is also faster. Less hardware means smaller size, which also reduces costs. Simpler circuits draw less power. How do we know this circuit is the same as the one on the last page? June 11, 2002 Boolean algebra

Boolean algebra is special Boolean algebra gives us a way to simplify Boolean functions, much like regular algebra allows us to simplify mathematical functions. The AND and OR operations are similar to multiplication and addition: AND is the same as multiplication for the values 0 and 1 OR is almost the same as addition, except for 1 + 1. But there are important differences to watch out for, too. Boolean algebra uses are only two values. OR is not quite the same as addition, and NOT is a new operation. June 11, 2002 Boolean algebra

Formal definition of Boolean algebra A Boolean algebra requires: A set of values B, which contains at least two elements 0 and 1 Two 2-argument operations + and  A one-argument operation ' The values and operations must satisfy the axioms below. June 11, 2002 Boolean algebra

Satisfying the axioms The operations we chose do satisfy all of the axioms. We can show this by looking at the definitions of our operations. For example, the axiom x + x’ = 1 is satisfied, because: We have only two possible values for x: 0 and 1. The complement of these values are 1 and 0, respectively. 0 + 1 = 1, and 1 + 0 = 1. June 11, 2002 Boolean algebra

Proofs with truth tables We can always prove equivalences using truth tables, to explicitly show that two expressions always produce the same results. Let’s use truth tables to prove DeMorgan’s law, (x + y)’ = x’y’. The columns on the left in each table are the inputs. We have two inputs, x and y, so there are four possible input combinations. The columns on the right, in blue, are outputs. Intermediate columns can be useful in deriving the outputs. Since both of the columns in blue are the same, this shows that (x + y)’ and x’y’ really are equivalent. June 11, 2002 Boolean algebra

Similarities with regular algebra Several of the axioms (in blue) look just like regular algebraic rules. The associative laws show that there is no ambiguity in a term such as xyz or x + y + z, so we can use multiple-input primitive gates: June 11, 2002 Boolean algebra

The complement operation The magenta axioms deal with the complement operation, which doesn’t exist in normal algebra. Most of them almost make sense if you translate them into English: “It is raining or it is not raining” is always true (x + x’ = 1) “It is raining and it is not raining” can never be true (x  x’ = 0) “I am not not handsome” means “I am handsome” ((x’)’ = x) June 11, 2002 Boolean algebra

(x + y)’ = x’y’ (xy)’ = x’ + y’ DeMorgan’s DeMorgan’s axioms are especially important for circuit design. (x + y)’ = x’y’ (xy)’ = x’ + y’ We’ve already proved one of these axioms, but here are some rough examples in English. “I am not rich-or-famous” This is the same as “I am not rich, and I am not famous.” In other words, I am nothing. “I am not old-and-bald” This is equivalent to “I am not old, or I am not bald.” I could still be one of the other three possibilities: young and bald, old and hairy, or young and hairy. June 11, 2002 Boolean algebra

Other differences with regular algebra Finally, the red axioms are completely different from regular algebra. The first three make sense if you think about it logically: “Blah or true” is always true, even if “blah” is false (x + 1 = 1) “I am handsome or I am handsome” is redundant (x + x = x) “I am handsome and I am handsome” is redundant (x  x = x) The last one, x + yz = (x + y)(x + z), is the trickiest one of the bunch. June 11, 2002 Boolean algebra

Duality Look carefully at the left and right columns of axioms. They are duals, where we’ve: exchanged all AND operations with OR operations, and exchanged all 0s with 1s. The dual of any equation is always true. June 11, 2002 Boolean algebra

Simplification with axioms We can now start doing simplifications using these axioms: x’y’ + xyz + x’y = x’(y’ + y) + xyz [ Distributive: x’y’ + x’y = x’(y’ + y) ] = (x’  1) + xyz [ Axiom 7: y’ + y = 1 ] = x’ + xyz [ Axiom 2: x’  1 = x’ ] = (x’ + x)(x’ + yz) [ Distributive ] = 1  (x’ + yz) [ Axiom 7: x’ + x = 1 ] = x’ + yz [ Axiom 2 ] June 11, 2002 Boolean algebra

Simpler expressions yield simpler hardware Here are the circuits resulting from the original and simplified expressions on the previous page. June 11, 2002 Boolean algebra

Some more laws Here are some more useful equations. These are usually called laws, because they can all be proven from the more fundamental axioms. You can also prove them using truth tables. Notice that each law also has a dual. Feel free to use these laws in homeworks and exams, if you like. June 11, 2002 Boolean algebra

The complement of a function The complement of a function always outputs 0 where the original function output 1, and 1 where the original produced 0. In a truth table, we can just exchange 0s and 1s in the output column. On the left is a truth table for f(x,y,z) = x(y’z’ + yz) On the right is the table for the complement, denoted f’(x,y,z). June 11, 2002 Boolean algebra

Complementing a function algebraically When you complement an expression algebraically, you can use DeMorgan’s axiom to keep “pushing” the complement operators inwards: Another clever method to complement an expression is to take the dual of the expression, and then complement each literal: If f(x,y,z) = x(y’z’ + yz)… …the dual of f is x + (y’ + z’)(y + z)… …then complementing each literal gives x’ + (y + z)(y’ + z’)… …so f’(x,y,z) = x’ + (y + z)(y’ + z’) f(x,y,z) = x(y’z’ + yz) f’(x,y,z) = ( x(y’z’ + yz) )’ [ complement both sides ] = x’ + (y’z’ + yz)’ [ because (xy)’ = x’ + y’ ] = x’ + (y’z’)’ (yz)’ [ because (x + y)’ = x’ y’ ] = x’ + (y + z)(y’ + z’) [ because (xy)’ = x’ + y’, twice] June 11, 2002 Boolean algebra

Standard forms of expressions We can write expressions in many ways, but some ways are more useful than others. A sum of products (SOP) expression is characterized by: There are only OR (sum) operations at the “outermost” level. Each term in the sum must be a product of literals. For example: f(x,y,z) = y’ + x’yz’ + xz The advantage is that a sum of products expression can be implemented using a fairly simple two-level circuit: Literals are at the “0th” level. AND gates are at the first level. A single OR gate is at the second level. June 11, 2002 Boolean algebra

Minterms A minterm is a special product term, where each input variable appears exactly once. A function with n variables has up to 2n minterms. For example, a three-variable function like f(x,y,z) has up to 8 minterms: Each minterm is true for exactly one combination of inputs: x’y’z’ x’y’z x’yz’ x’yz xy’z’ xy’z xyz’ xyz Minterm Is true when… Shorthand x’y’z’ xyz = 000 m0 x’y’z xyz = 001 m1 x’yz’ xyz = 010 m2 x’yz xyz = 011 m3 xy’z’ xyz = 100 m4 xy’z xyz = 101 m5 xyz’ xyz = 110 m6 xyz xyz = 110 m7 Hey! This looks like a truth table! June 11, 2002 Boolean algebra

Sum of minterms form Every function can be written as a sum of minterms, which is a special kind of sum of products form. The sum of minterms form for any function is unique. If you have a truth table for a function, you can write a sum of minterms expression just by picking out the rows of the table where the function output is 1. f = m0 + m1 + m2 + m3 + m6 = m(0,1,2,3,6) = x’y’z’ + x’y’z + x’yz’ + x’yz + xyz’ f’ = m4 + m5 + m7 = m(4,5,7) = xy’z’ + xy’z + xyz f’ contains all the minterms not in f. June 11, 2002 Boolean algebra

Summary We can build complex functions from just the basic Boolean values “true” and “false,” and the operations AND, OR and NOT. Any Boolean expression can be implemented with a circuit, which uses primitive logic gates to compute products, sums and complements. We saw two ways to prove equivalence of expressions: Truth tables show that all possible inputs yield the same results. Boolean algebra is especially useful for simplifying expressions, and hence circuits. Expressions can be written in many different ways, so it’s sometimes useful to use standard representations like sums of products or sums of minterms. Next time we’ll study an alternative, graphical simplification method. Then we’ll start using all this stuff to build and analyze bigger, more useful, circuits. June 11, 2002 Boolean algebra