Digital Logic Design ABC. Representing Logic Operations. Dr. Kenneth Wong. Determining output level from a diagram. Laws of Boolean Algebra

Similar documents
EEE130 Digital Electronics I Lecture #4

Boolean Algebra & Logic Gates. By : Ali Mustafa

1 Boolean Algebra Simplification

Boolean Algebra and Logic Simplification

MC9211 Computer Organization

Chapter 1: Logic systems

CHAPTER 2 BOOLEAN ALGEBRA

This form sometimes used in logic circuit, example:

Boolean algebra. Examples of these individual laws of Boolean, rules and theorems for Boolean algebra are given in the following table.

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

WEEK 2.1 BOOLEAN ALGEBRA

Administrative Notes. Chapter 2 <9>

CHAPTER III BOOLEAN ALGEBRA

Chapter 2 (Lect 2) Canonical and Standard Forms. Standard Form. Other Logic Operators Logic Gates. Sum of Minterms Product of Maxterms

Computer Organization I. Lecture 13: Design of Combinational Logic Circuits

CHAPTER 7 MULTI-LEVEL GATE CIRCUITS NAND AND NOR GATES

Combinational Logic Fundamentals

CPE100: Digital Logic Design I

CS 121 Digital Logic Design. Chapter 2. Teacher Assistant. Hanin Abdulrahman

CHAPTER III BOOLEAN ALGEBRA

Unit 2 Session - 6 Combinational Logic Circuits

Number System conversions

II. COMBINATIONAL LOGIC DESIGN. - algebra defined on a set of 2 elements, {0, 1}, with binary operators multiply (AND), add (OR), and invert (NOT):

211: Computer Architecture Summer 2016

Logic Design. Chapter 2: Introduction to Logic Circuits

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Chapter 2 Boolean Algebra and Logic Gates

University of Technology

Chapter 2 Combinational Logic Circuits

Chapter 2 Combinational Logic Circuits

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Gate-Level Minimization

Ex: Boolean expression for majority function F = A'BC + AB'C + ABC ' + ABC.

CHAPTER1: Digital Logic Circuits Combination Circuits

Digital Logic Design. Combinational Logic

CSE 140 Midterm I - Solution

BOOLEAN ALGEBRA TRUTH TABLE

Unit 2 Boolean Algebra

CSE20: Discrete Mathematics for Computer Science. Lecture Unit 2: Boolan Functions, Logic Circuits, and Implication

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

Chap 2. Combinational Logic Circuits

BOOLEAN ALGEBRA. Introduction. 1854: Logical algebra was published by George Boole known today as Boolean Algebra

Chapter 2 Combinational

ELC224C. Karnaugh Maps

Chapter 3. Boolean Algebra. (continued)

UC Berkeley College of Engineering, EECS Department CS61C: Representations of Combinational Logic Circuits

1. Name the person who developed Boolean algebra

Prof.Manoj Kavedia 2 Algebra

CS 226: Digital Logic Design

Chapter 3 Combinational Logic Design

Boolean Algebra. The Building Blocks of Digital Logic Design. Section. Section Overview. Binary Operations and Their Representation.

Textbook: Digital Design, 3 rd. Edition M. Morris Mano

EECS150 - Digital Design Lecture 19 - Combinational Logic Circuits : A Deep Dive

ENGG 1203 Tutorial - 2 Recall Lab 2 - e.g. 4 input XOR. Parity checking (for interest) Recall : Simplification methods. Recall : Time Delay

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

Chapter 2: Switching Algebra and Logic Circuits

Chapter 2. Digital Logic Basics

Combinational Logic. Review of Combinational Logic 1

CPE100: Digital Logic Design I

UNIVERSITI TENAGA NASIONAL. College of Information Technology

INTRO TO I & CT. (Boolean Algebra and Logic Simplification.) Lecture # By: Department of CS & IT.

Lecture 2 Review on Digital Logic (Part 1)

ENG2410 Digital Design Combinational Logic Circuits

Simplifying Logic Circuits with Karnaugh Maps

Digital Fundamentals

2 Application of Boolean Algebra Theorems (15 Points - graded for completion only)

Digital Logic (2) Boolean Algebra

If f = ABC + ABC + A B C then f = AB C + A BC + AB C + A BC + A B C

Lecture 6: Manipulation of Algebraic Functions, Boolean Algebra, Karnaugh Maps

ENGR 303 Introduction to Logic Design Lecture 3. Dr. Chuck Brown Engineering and Computer Information Science Folsom Lake College

Lecture (02) NAND and NOR Gates

ECE 238L Boolean Algebra - Part I

EC-121 Digital Logic Design

Logic and Boolean algebra

COS 140: Foundations of Computer Science

Unit 2 Boolean Algebra

CprE 281: Digital Logic

Vidyalankar S.E. Sem. III [CMPN] Digital Logic Design and Analysis Prelim Question Paper Solution

Slide Set 3. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Digital Logic Design. Malik Najmus Siraj

Boolean Algebra and Digital Logic

BOOLEAN ALGEBRA CLASS XII. Presented By : Dinesh Patel PGT CS KV IIT Powai

Review Getting the truth table

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

Theorem/Law/Axioms Over (.) Over (+)

ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2

Functions. Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways:

Logic and Computer Design Fundamentals. Chapter 2 Combinational Logic Circuits. Part 1 Gate Circuits and Boolean Equations

Introduction to Digital Logic

Week-I. Combinational Logic & Circuits

ELCT201: DIGITAL LOGIC DESIGN

Review. EECS Components and Design Techniques for Digital Systems. Lec 06 Minimizing Boolean Logic 9/ Review: Canonical Forms

. T SHREE MAHAPRABHU PUBLIC SCHOOL & COLLEGE NOTES FOR BOARD EXAMINATION SUBJECT COMPUTER SCIENCE (Code: 083) Boolean Algebra

KP/Worksheets: Propositional Logic, Boolean Algebra and Computer Hardware Page 1 of 8

Logic Gate Level. Part 2

Chapter 2: Boolean Algebra and Logic Gates

Lecture 3: Boolean Algebra

Simplification of Boolean Functions. Dept. of CSE, IEM, Kolkata

The Karnaugh Map COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

UNIT 3 BOOLEAN ALGEBRA (CONT D)

Transcription:

Digital Logic Design ENGG1015 1 st Semester, 2011 Representing Logic Operations Each function can be represented equivalently in 3 ways: Truth table Boolean logic expression Schematics Truth Table Dr. Kenneth Wong Department of Electrical and Electronic Engineering Schematics Boolean Expression 5 Determining output level from a diagram Implementing Circuits From Boolean Expressions When the operation of a circuit is defined by a Boolean expression, we can draw a logic-circuit diagram directly from that expression. Example: draw the circuit for y = AC + + A Done in two steps 6 7 Truth Table to Boolean Expression List all combinations that give 1 at output Sum up all terms Sum of products (SOP) more later Laws of Boolean Algebra Commutative Laws A + B = B + A A C AB A x =? x = A + A + A 8 A B = B A Associative Laws A + (B + C) = (A + B) + C A (B C) = (A B) C 9 1

Distributive Law A (B + C) = A B + A C A (B + C) = A B + A C Rule 1 Rules of Boolean Algebra Rule 2 OR Truth Table Rule 3 AND Truth Table 10 Rule 4 11 Rule 5 Rule 9 Rule 6 OR Truth Table Rule 10: A + AB = A Proof: A+AB = A(1+B) by distributive law = A 1 by rule 2 =A byrule4 Or prove by truth table Rule 7 AND Truth Table Rule 8 12 13 Rule 11: A + AB = A + B This rule can only be proved by constructing the truth table (?) Examples: Simplify y = A + A y= AB( D+ D) by distributive law = AB 1 by rule 6 = AB by rule 4 Rule 12: (A + B)(A + C) = A + This rule can only be proved by constructing the truth table (?) ( )( ) Simplify z = A + B A + B z= AA+ AB+ BA+ BB by distributive law AB A = 0 + AB + BA + B = AB + BA + B by rule 8 and rule 7 byrule 1 AB = BA ( + A+ 1) by distributive law = B 1 by rule 6 and rule 2 B = B by rule 4 Simplify x = ACD+ AD x= CD( A+ AB) by distributive law = CD( A + B) by rule 11 = ACD + D by distributive law 14 15 2

Review Questions Simplify Simplify Simplify y = AC + y = AC A y = AD + AD y = A y = AD + A y = AD + Theorem 1 x + y = x y Theorem 2 x y = x+ y DeMorgan s Theorems Remember: Break the bar, change the operator DeMorgan's theorem is very useful in digital it circuit it design It allows ANDs to be exchanged with ORs by using invertors DeMorgan's Theorem can be extended to any number of variables. E.g, for three variables x, y and z x + y+ z = x y z x y z = x+ y+ z 16 17 Quick Quiz (1) Simplify AC+ AC+ AC+ AC+ Simplify AC + AC + AC + AC + ( AB+ C) ( A+ C) ( B+ D) 18 Quick Quiz (2) Simplify AB CD AB+ CD+ AB+ CD+ AB+ CD+ AD Determine the output expression for the below circuit and simplify it using DeMorgan s Theorem A A A+ B+ C A+ B+ C 19 Examples (Summary): a) ( AB + C) = AB C = ( A + B) C = AC + b) ( A+ C) ( B+ D) = ( A+ C) + ( B+ D) = A C+ B D= AC+ c) A+ B C = A ( B C) = A ( B+ C) = A( B+ C) d) ( A+ ) ( D+ ) = ( A+ ) + ( D+ ) = ( A ) + ( D ) = A ( B+ C) + D ( E+ F) = AB+ AC+ DE+ DF e) AB CD = AB+ CD+ = AB+ CD+ f ) Determine the output expression for the below circuit and simplify it using DeMorgan s Theorem Review Questions Using DeMorgan s Theorems to convert the expressions to one that has only single-variable inversions. y = RST + Q y = ( R + S + T) Q z = ( A + B ) C z = AB + C y = A + B + CD y = AB( C + D) 20 21 3

Implications of DeMorgan s Theorems x + y = x y i.e., The AND gate with INVERTERs on each of its inputs is equivalent to a NOR gate Usually redrawn in this way Universality of NAND gates Any expression can be implemented using combinations of OR gates, AND gates and INVERTERs However, it is also possible to implement any logic expression using only NAND gates and no other type of gate This is because NAND gates, in proper combination, can perform Boolean operations OR, AND, and INVERTER x y = x+ y i.e., The OR gate with INVERTERs on each of its inputs is equivalent to a NAND gate Usually redrawn in this way 22 23 Example: Suppose we want to implement x=ab+cd. -- If we directly implement the expression, we need 2 AND gates and 1 OR gate => we need two ICs -- If we transform the circuit into one having only NAND gates, we need only one IC Universality of NOR gate In a similar manner, it can be shown that NOR gates can be arranged to implement any of the Boolean operations IC in Dual-in-line package (DIP) Pin diagrams for the ICs containing NAND, AND, and OR gates 24 25 Alternate Logic-Gate Representations Apart from standard logic gate symbols we have seen so far, there are alternate symbols for the commonly used gates The alternate symbols are obtained by performing the following two steps: 1. Invert each input and output of the standard symbol. This is done by adding bubbles (small circles) on input and output lines that do not have bubbles and by removing bubbles that are already there. 2. Change the operation symbol from AND to OR, or from OR to AND. (In the special case of the INVERTER, the operation symbol is not changed.) 26 Several points to note The equivalences can be extended to gates with any number of inputs. None of the standard symbols have bubbles on their inputs, and all the alternate symbols do. The standard and alternate symbols for each gate represent the same physical circuit; there is no difference in the circuits represented by the two symbols. NAND and NOR gates are inverting gates, and so both the standard and the alternate symbols for each will have a bubble on either the input or the output, AND and OR gates are non-inverting gates, and so the alternate symbols for each will have bubbles on both inputs and output. 27 4

Why we need alternate representation? Proper use of the alternate gate symbols in the circuit diagram can make the circuit operation much more easy to understand E.g., the two circuits on the right are equivalent However, circuit (a) does not facilitate an understanding of how the circuit function Circuit (b) is easy to understand: Z will go HIGH whenever either A=B=1 or C=D=1 (or both) Canonical Form Boolean expression can be expressed in many different ways (A + D)(B + C) AB + AC + + CD Two standard ways: Sum of Product Product of Sum Canonical SOP Canonical POS 28 29 Canonical SOP Boolean expression expressed as a sum of product of basic inputs Basic input may optionally negated AB C + + AD Product Sum NOT canonical: A + B(C + D) No parenthesis Most natural for human Canonical POS Boolean expression expressed as a product of sum of basic inputs Basic input my optionally negated (A + B + C)(B + D )(A + D) Product Sum NOT canonical: Many parenthesis A + B(C + D) Not too natural for human, but equally good for computers. 30 31 Example: This example illustrate the complete procedure for designing a logic circuit. Suppose the logic circuit having 3 inputs, A, B, C will have its output HIGH only when a majority of the inputs are HIGH. Step 1 Set up the truth table A B C x 0 0 0 0 Step 2 Write the AND term for 0 0 1 0 each case where the output 0 1 0 0 is a 1. 0 1 1 1 1 0 0 0 A Step 3 Write the SOP form the output 1 0 1 1 A x = A + A + A + A Step 4 Simplify the output expression x = A + A + A + A + A + A = ( A+ A) + AC( B + B) + AB( C + C) = + AC + AB Step 5 Implement the circuit 1 1 0 1 1 1 1 1 A A 32 Example: Conversion through the opposite direction: Step 1 Start from the circuit Step 2 Obtain Boolean expression from the circuit (in SOP form) y = AC + + A Step 3 Write the truth table y Schematics Truth Table A B C y Boolean Expression 0 0 0 0 0 0 1 0 A 0 1 0 1 0 1 1 1 A 1 0 0 0 1 0 1 1 A A 1 1 0 1 1 1 1 1 A 33 5

Forms of Boolean Expressions There are two general forms of logic expression: SOP, POS Sum-of-products form (SOP) first the product (AND) terms are formed then these are summed (OR) eg: A + D + GHI Product-of-sum form (POS) first the sum (OR) terms are formed then the products are taken (AND) eg: (A+B+C)(D+E+F)(G+H+I) It is possible to convert between these two forms using Boolean algebra Simplifying Logic Circuits Once the expression for a logic circuit is obtained, we may try to simplify it, so that the implementation requires fewer gates Example: below two circuits are the same, but the second one is much more simpler Two methods for simplifying Algebraic method (use Boolean algebra theorems) Karnaugh mapping method (next lesson) 34 35 Minimization by Boolean Algebra Make use of relationships and theorems of Boolean algebra to simplify the expressions this method relies on your algebraic skill Mainly consists of two steps: The original expression is put into SOP form by repeated application of DeMorgan s theorems and multiplication of terms Once the original expression is in SOP form, the product terms are checked for common factors, and factoring is performed wherever possible Example: Simplify z = A + AB ( AC) z = A + AB ( A + C) [by DeMorgan thm] = A + AB ( A + C) [cancel double inverions] = A + ABA + A = A + AB + A [multiply out] [ A A = A] = AC( B + B) + AB = AC + AB [ B+ B = 1] = AC ( + B) 36 Example: Simplify z = A + A + A The expression is already in SOP form z = AB( C+ C) + A = AB(1) + A = AB + A = AB ( + ) = AB ( + C) [by rule 11 in previous chapter] Example: Simplify x = ( A + B )( A + B + D ) D x = AAD + A + ADD + BAD + B + D [multiply out] = A + BAD + [ AA = 0 and DD = 0] = ( A + A + 1) [factoring] = [ A+ A= 1 and 1+1=1] 37 Example: Simplify z = AC( A) + AD + A First expand it into SOP form z = AC( A + B + D) + AD + A [DeMorgan thm] = ACA + ACB + ACD + AD + A [multiply out] = ACB + ACD + AD + A [ AA = 0] Then look for the largest common factor between any two or more product terms: first and last terms have, while the second and third terms share AD Grouping the terms gives z = ( A + A ) + AD ( C + ) = + AD( C+ B) [by A+ A= 1, C+ = C+ B] We might think that the above expression is the simplest since it cannot be simplified further However, in fact, the simplest form of this equation is z = A + It turns out that we missed an operation earlier that could have led to the simpler form Question: How could we have known that we missed a step?? Ans: There is no way we can know. This illustrate the frustration often encountered in Boolean simplification 38 In conclusion All logic functions can be represented as (1) truth table (2) schematics (3) Boolean expressions, interchangeably Laws of Boolean algebra helps to simplify the Boolean expression DeMorgan s theorems NAND/NOR gates are universal gates Non-standard representation is equivalent to DeMorgan s theorems Canonical SOP/POS 39 6