ECE 171 Digital Circuits Chapter 4 Boolean Algebra Herbert G. Mayer, PSU Status 2/1/2016 Copied with Permission from prof. Mark PSU ECE.

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Logical Systems Synthesis.
Chapter 2 Logic Circuits.
Boolean Algebra and Reduction Techniques
Boolean Algebra and Combinational Logic
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-1 Chapter #2: Two-Level Combinational Logic Section 2.1, Logic Functions.
EET 1131 Unit 5 Boolean Algebra and Reduction Techniques
Chapter 2: Boolean Algebra and Logic Functions
1 Fundamentals of Computer Science Propositional Logic (Boolean Algebra)
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Boolean Algebra and Digital Circuits
Department of Computer Engineering
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC. K-Map (1)  Karnaugh Mapping is used to minimize the number of logic gates that are required in a digital circuit.
ECE 331 – Digital System Design
Discrete Mathematics and Its Applications.  The English mathematician George Boole ( ) sought to give symbolic form to Aristotle's system of.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
Chapter 4 Combinational Logic Design Principles. Overview Objectives -Define combinational logic circuit -Analysis of logic circuits (to describe what.
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
CH51 Chapter 5 Combinational Logic By Taweesak Reungpeerakul.
LOGIC GATES & BOOLEAN ALGEBRA
ECE 301 – Digital Electronics Basic Logic Operations, Boolean Expressions, and Boolean Algebra (Lecture #3)
05 BA2 Page 1 ECEn/CS 224 Boolean Algebra – Part 2.
1 BOOLEAN ALGEBRA Basic mathematics for the study of logic design is Boolean Algebra Basic laws of Boolean Algebra will be implemented as switching devices.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
Boolean Algebra and Reduction Techniques
1 EENG 2710 Chapter 2 Algebraic Methods For The Analysis and Synthesis of Logic circuits.
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.
ECE 3110: Introduction to Digital Systems Chapter #4 Review.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
ECE 171 Digital Circuits Chapter 6 Logic Circuits Herbert G. Mayer, PSU Status 1/16/2016 Copied with Permission from prof. Mark PSU ECE.
CEC 220 Digital Circuit Design SOP and POS forms Friday, January 23 CEC 220 Digital Circuit Design Slide 1 of 17.
ECE DIGITAL LOGIC LECTURE 6: BOOLEAN ALGEBRA Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 02/01/2016.
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
School of Computer and Communication Engineering, UniMAP DKT 122/3 - DIGITAL SYSTEM I Chapter 4A:Boolean Algebra and Logic Simplification) Mohd ridzuan.
Lecture 5 More Boolean Algebra A B. Overview °Expressing Boolean functions °Relationships between algebraic equations, symbols, and truth tables °Simplification.
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
EET 1131 Unit 5 Boolean Algebra and Reduction Techniques
Lecture 4 Topics Boolean Algebra Huntington’s Postulates Truth Tables
Department of Preparatory Year, Umm Al Qura University
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
Chapter 2: Boolean Algebra and Logic Functions
Digital Fundamentals Floyd Chapter 5 Tenth Edition
ECE 2110: Introduction to Digital Systems
Logic Gates and Boolean Algebra
CS 105 Digital Logic Design
ECE 3110: Introduction to Digital Systems
Boolean Algebra and Combinational Logic
Princess Sumaya University
Boolean Algebra – Part 1 ECEn 224.
CHAPTER 3 SETS AND BOOLEAN ALGEBRA
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Boolean Algebra.
BASIC & COMBINATIONAL LOGIC CIRCUIT
Lecture 4 Topics Boolean Algebra Huntington’s Postulates Truth Tables
Functions Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways: We can represent.
Copied with Permission from prof. Mark PSU ECE
Boolean Algebra.
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Combinational Logic Circuit
Laws & Rules of Boolean Algebra
Chapter 4 Combinational Logic Design Principles. Overview Objectives -Define combinational logic circuit -Analysis of logic circuits (to describe what.
Circuit Simplification and
Presentation transcript:

ECE 171 Digital Circuits Chapter 4 Boolean Algebra Herbert G. Mayer, PSU Status 2/1/2016 Copied with Permission from prof. Mark PSU ECE

Syllabus Boolean Algebra Huntington’s Postulates Operators Truth Tables Boolean Functions and Theorems Graphic Symbols References

Boolean Algebra A fire sprinkler system F should spray water if high heat is sensed and the system is in the state: enabled Let Boolean variable h represent “high heat is sensed,” let e represent “enabled,” and F represent “spraying water.” Then an equation is: F = h AND e A car alarm F should sound if the alarm is enabled, and either the car is shaken or the door is opened Let a represent “alarm is enabled,” s represent “car is shaken,” d represent “door is opened,” and F represent “alarm sounds.” Then an equation is: F = a AND ( s OR d ) 3

Boolean Algebra (History) BC: Aristotle, foundations of logic 1854: George Boole “An Investigation of the Laws of Thought”, mathematical methods for two-valued logic 1904: H.E. Huntington, Sets of Independent Postulates for the Algebra of Logic 1938: Claude Shannon, A Symbolic Analysis of Relay Switching Circuits 4

Boolean Algebra Postulates (Axioms) Accepted as true; Foundation for further proofs Values B = { 0, 1 } Variables A, B, C X, Y, Z Ready, Green, OverWeightLimit Operators (often represented differently!) +  Additional Operators () = 5

Huntington’s Postulates 6

Literals Variable or Complement of Variable X, DoorOpen, Green, Green Expressions Constants ( 0, 1 ), Literals, Operators ( X + Y  Z ), A + B Precedence Complement AND  OR + () Can be used to override default order, or enhance “readability” Boolean Algebra 7

Operators Complement, AKA NOT A’ /A !A  A ~A A A OR A + B A | B A  B v for Latin: vel = or AND A * B A & B A  B A  B A B 8

Truth Tables (NOT) 9

Graphic Symbols (NOT) 10

Additional Operators NOR A + B A | B A  B NAND A * B A & B A  B A  B A B 11

Truth Tables NOR operatorNAND operator X Y X + Y X Y X  Y

Graphic Symbols 13

Additional Operators XOR (Exclusive OR, Modulo 2, Different) A  B XNOR (Exclusive NOR, Equal ) A  B AKA “Equivalence” in Europe 14

Truth Tables XOR operatorXNOR operator X Y X  Y X Y X  Y

Graphic Symbols 16

Boolean Functions Product Terms –Comprised of literals (including complements), AND –X  Y  Z A  B  C X Y Z A B C Sum Terms –Comprised of literals (including complements), OR –X + Y + Z A + B + C Sum of Products (SOP) –X  Y + X  Z --parentheses not needed, AND binds higher Product of Sums (POS) –(X + Y)  (X + Z)--parentheses needed! F(X,Y,Z) --Boolean function of 3 variables X, Y, Z 17

Truth Tables B 5 B 4 B 3 B 2 B 1 B 0 F = 64 Question: How many rows are there in a truth table for n variables? As many rows as unique Combinations of inputs Enumerate by counting in binary 2n2n 18

Boolean Algebra -- Manipulation Simplify –Operand Count Reduction –Reduce Number of Terms Transform: Put in Preferred Form –AND/OR –NAND/NOR 19

Reducing Number of Terms F = (X + Y)  (X + Z) = X + Y  Z Huntington’s Postulate P4a 20

Huntington’s Postulate via Karnaugh 21

Boolean Theorems 22

Boolean Theorems 23

Boolean Theorems 24

Boolean Functions Boolean function f() expresses a truth value, depending on Boolean operands and operators Often denoted as true or false True or false can be represented as 0 and 1, sometimes on or off, or high_voltage or low_voltage, or other variations Key idea: there are 2 possible values per Boolean value, no more! We’ll pick 0 and 1 Operand values can be combined via operators Operands are variables or constants 25

Boolean Functions Operators include or, and, not, xor, equivalence, their negations, many more Operators handle 1 or 2 values, often variables, to create a new Boolean result E.g. function f0( a, b ) here depends on 2 Boolean variables a and b, yielding true if a and b differ: f0( a, b ) = a xor b Name of operation: exclusive or, AKA xor 26

Boolean Function We can write Boolean functions as: –Expressions –Tables –Maps, specifically 2D Karnaugh Maps –Maps, drawn as a 3D thorus –Minterms, Minterm sum Σ –Maxterms, Maxterm product Π –Etc. 27

Boolean Function Via Expression Given Boolean variables a, b, c, d, and the specific Boolean function f1( a, b, c, d ) below f1() may be encoded as an expression, as shown, with ‘ standing for negating its preceding operand; e.g. x’ means “not x”: f1 = b’ and d’ -- a, c are don’t cares for f1() 28

Boolean Function Via Truth Table Function f1() can be expressed as Truth Table: 29

Boolean Function Via Truth Table f1() can be expressed as a Karnaugh Map, AKA K-Map: 30

Boolean Function Via Truth Table Function f1() can be expressed as a thorus, found in [1] at Wiki: 31

Boolean Function Via Truth Table Function f1() can be expressed as Minterms: f1( a, b, c, d ) = Σ m i with i = { 0, 2, 8, 10 } 32

Boolean Function Via Truth Table Function f1() can be expressed as Maxterms: f1’( a, b, c, d ) = Π m i with i = { 1, 3, 4, 5, 6, 7, 9, 11, 12, 13, 14, 15 } 33

K-Maps Karnaugh Maps, AKA K-Maps offer an intuitive way to minimize a function... By grouping together as many terms (1s or 0s) together in rectangular groups Even wrap-around sides of a rectangle to capture Boolean variables Hard to draw K-Maps, when there are many more than 4 variables; see sample with 5 Can use multiple K-Maps for 6 or more variables 34

K-Maps: f2() Key idea: group largest possible rectangle of all ones (‘1’) together See example f2() 35

K-Maps: f2() Solution for f2() 36

K-Maps: f3() Largest groups of rectangles of all ones (‘1’) together, including across the border See example f3() 37

K-Maps: f3() Solution for f3() 38

K-Maps: f4() Largest groups of rectangles of all ones (‘1’) together, including “double-counting” See example f4() 39

K-Maps: f4() Solution for f4() 40

K-Maps: f5() If f2() had a few Don’t Cares, indicated by x, how could we express the function f5()? Set some x->1, some other x->0 41

K-Maps: f5() A possible solution for f5() 42

Simpler K-Maps: f6_1() Only 3 Boolean variables for f6_1() f6_1 = a b + ac + b’ c 43

Simpler K-Maps: f6_2() Same 3 Boolean variables for f6_2() f6_2 = a b + b’ c Consensus Theorem in action! 44

More Complex K-Map: f7() f7() is function of 5 variables: a b c d e Here K-map for f7() = abc + bcd + cde 45

Truth Table for f7() 46

Student Exercise K-Map: f7_1() F7_1() also function of 5 variables: a b c d e Compute K-map for f7_1() = ? 47

Student Exercise K-Map: f7_2() F7_2() function of 5 variables: a b c d e Compute harder K-map for f7_2() = ? 48

Literal Count Reduction F = X  Y + X + Y  Z = Y + X + Y  Z = Y + X Simplification Theorem Absorption Theorem Simplification Theorem Absorption Theorem X  Y + X = Y + X Y + Y  Z = Y 49

Transformation F = X  Y  Z = X + Y + Z deMorgan’s Theorem From implementation with NAND gates, shifted to OR gates and input Inverters 50

Principle of Perfect Induction If:f1 = x y + x’ z + y z;f2 = x y + x’ z Show via Karnaugh Map:f1 = f2 51

Principle of Perfect Induction Truth tables for: f1 = x y + x’ z + y z; f2 = x y + x’ z Proves that y z is being absorbed x y z f1: x y x’ z y z f2: x y x’ z f1 = f = = = = = = = = = = = = = = = = 1 52

SoP of 1s vs. SoP of 0s 53 Boolean expression, focusing on 1s in f8() generates sum of products (SoP) Or equivalently, focusing on 0s, in which case g8() generates a sum of products of 0s And g8()’ = f8(); which is preferable? Engineering intuition may suggest: count 0s and 1, then start with the option of smaller number of cases! We’ll analyze a case:

SoP of 1s vs. SoP of 0s 54 Function f8(), SoP of 1s

SoP of 1s vs. SoP of 0s 55 Using SoP form of 1s yields: f8() = a + b’ + c + d’ Using SoP of 0s yields: g8() = a’bc’d Inverting g8() generates same result as f8(): g8()’ = a’’ + b’ + c’’ + d’ g8()’ = a + b’ + c + d’ g8()’ = f8(), q.e.d. We observe a very similar number of steps, or a similar cost function to compute Counting 0s vs. 1s to start did not help here

References 1.For Karnaugh maps: map 56