Chapter 4 Combinational Logic Design Principles. Overview Objectives -Define combinational logic circuit -Analysis of logic circuits (to describe what.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Chapter 2 Logic Circuits.
ECE 3110: Introduction to Digital Systems Simplifying Sum of Products using Karnaugh Maps.
Computer Logic and Digital Design Chapter 2 Henry Hexmoor AND logic
EE365 Boolean algebra Combinational-circuit analysis.
1 EE 365 Combinational-Circuit Synthesis. 2 Combinational-Circuit Analysis Combinational circuits -- outputs depend only on current inputs (not on history).
EECC341 - Shaaban #1 Lec # 5 Winter Switching Algebra: Principle of Duality Any theorem or identity in switching algebra remains true if.
EE365 Adv. Digital Circuit Design Clarkson University Lecture #2 Boolean Laws and Methods.
 Analysis and Synthesis:  Analysis start with a logic diagram and proceed to a formal description of the function performed by that circuit, such as.
Example: Given a 4-bit input combination N=N 3 N 2 N 1 N 0, this function produces a 1 output for N=1,2,3,5,7,11,13, and 0 otherwise.  According to the.
Computer Engineering (Logic Circuits) (Karnaugh Map)
Modified from John Wakerly Lecture #2 and #3 CMOS gates at the transistor level Boolean algebra Combinational-circuit analysis.
EECC341 - Shaaban #1 Lec # 7 Winter Combinational Circuit Minimization Canonical sum and product logic expressions do not provide a circuit.
Chapter 2: Boolean Algebra and Logic Functions
Boolean Algebra Boolean algebra Boolean algebra, like any other deductive mathematical system, may be defined with –a set of elements, –a set of operators,
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Boolean Algebra and Digital Circuits
1 Simplification of Boolean Functions:  An implementation of a Boolean Function requires the use of logic gates.  A smaller number of gates, with each.
Ch. 4 Boolean Algebra and Logic Simplification
EE 261 – Introduction to Logic Circuits
Boolean Algebra 1854, George Boole created a two valued algebraic system which is now called Boolean algebra. 1938, Claude Shannon adapted Boolean algebra.
ECE 2110: Introduction to Digital Systems PoS minimization Don’t care conditions.
ECE 3110: Introduction to Digital Systems Symplifying Products of sums using Karnaugh Maps.
Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and.
Chap 2. Combinational Logic Circuits. Chap Binary Logic and Gates l 디지털 회로 (Digital circuits) o hardware components that manipulate binary information.
07 KM Page 1 ECEn/CS 224 Karnaugh Maps. 07 KM Page 2 ECEn/CS 224 What are Karnaugh Maps? A simpler way to handle most (but not all) jobs of manipulating.
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
LOGIC GATES & BOOLEAN ALGEBRA
Unit 1 Minimization Techniques and Logic Gates. Introduction to Digital Systems Analog devices and systems process time-varying signals that can take.
ENG241 Digital Design Week #2 Combinational Logic Circuits.
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.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
ECE 3110: Introduction to Digital Systems Chapter #4 Review.
Binary Logic and Gates Boolean Algebra Canonical and Standard Forms Chapter 2: Boolean Algebra and Logic Gates.
Digital Design: Principles and Practices Chapter 4 Combinational Logic Design Principles.
Boolean Algebra & Logic Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
Module –I Boolean Algebra Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
1 Ch. 4 Boolean Algebra and Logic Simplification Boolean Operations and Expressions Laws and Rules of Boolean Algebra Boolean Analysis of Logic Circuits.
Digital Logic (Karnaugh Map). Karnaugh Maps Karnaugh maps (K-maps) are graphical representations of boolean functions. One map cell corresponds to a row.
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
KU College of Engineering Elec 204: Digital Systems Design 1 Review D: n bit binary number D = (d n-1 ∙ ∙ ∙ d 1 d 0 ) 2 If D is an unsigned binary number.
Boolean Algebra. BOOLEAN ALGEBRA Formal logic: In formal logic, a statement (proposition) is a declarative sentence that is either true(1) or false (0).
ECE 2110: Introduction to Digital Systems
Lecture 5 More Boolean Algebra A B. Overview °Expressing Boolean functions °Relationships between algebraic equations, symbols, and truth tables °Simplification.
Lecture 3 Boolean algebra Topics Error Correcting Codes Boolean algebra Combinational circuits Algebraic analysis, Truth tables, Logic Diagrams Sums-of-Products.
Boolean or, Switching Algebra. Switching Algebra The two-valued Boolean algebra is also called “Switching algebra” by engineers and computer scientists.
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.
Chapter 4. Combinational Logic Design Principles
Chapter 2: Boolean Algebra and Logic Functions
14:332:231 DIGITAL LOGIC DESIGN Boolean Algebra
ECE 2110: Introduction to Digital Systems
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2 Instructor: Andrew B. Kahng (lecture)
CS 105 Digital Logic Design
ECE 3110: Introduction to Digital Systems
CHAPTER 2 Boolean Algebra
CHAPTER 2 Boolean Algebra This chapter in the book includes:
ECE 2110: Introduction to Digital Systems
Modified from John Wakerly Lecture #2 and #3
Boolean Algebra.
Lecture 3 Boolean algebra
Boolean Algebra.
Chapter 2 Boolean Algebra and Logic Gate
Digital Systems Design
EE121 John Wakerly Lecture #3
Chapter 4 Combinational Logic Design Principles. Overview Objectives -Define combinational logic circuit -Analysis of logic circuits (to describe what.
Lecture 2: Combinational Logic Design
Presentation transcript:

Chapter 4 Combinational Logic Design Principles

Overview Objectives -Define combinational logic circuit -Analysis of logic circuits (to describe what they do) -Design of logic circuits from word definition -Minimization or Simplification of logic circuits -Mathematical Foundation of logic circuits (Boolean Algebra and switching theory)

Introduction Two types of logic circuits –Combinational : output depends only on current inputs –Sequential : depends on current and past inputs Purpose of this chapter: conduct analysis on logic circuits to better understand them and to simplify circuits by: –Reducing the number of gates needed –And reducing the number of inputs of each gate Methods –Boolean algebra –Karnaugh or K-Maps –Tabular methods

4.1. Boolean algebra (Switching Algebra ) 1854: Georges Boole invented a two-valued algebraic system, now called Boolean algebra 1938: Claude E. Shannon adapted boolean algebra to analyse and describe circuit behavior

4.1 Boolean algebra a.k.a. “switching algebra” –deals with boolean values -- 0, 1 Positive-logic convention –analog voltages LOW, HIGH --> 0, 1 Negative logic -- seldom used Signal values denoted by variables (X, Y, FRED, etc.)

4.1 Boolean algebra Boolean operators Complement:X (opposite of X) AND:X  Y OR:X + Y Axiomatic definition: A1-A5, A1-A5 binary operators, described functionally by truth table.

4.1 Boolean algebra Definitions Literal: a variable or its complement –X, X, FRED, CS_L Expression: literals combined by AND, OR, parentheses, complementation –X+Y –P  Q  R –A + B  C –((FRED  Z) + CS_L  A  B  C + Q5)  RESET Equation: Variable = logic expression Example: P = ((FRED  Z) + CS_L  A  B  C + Q5)  RESET

4.1 Boolean algebra Logic symbols

4.1.1 Axioms (Basic Laws) A1 X=0, if X  1A’1X=1, if X  0 A2 if X=0, then X’=1A’2if X=1 then X’=0 A3 0.0 = 0A’31+1 = 1 A4 1.1 = 1A’40+0 = 0 A5 0.1 = 1.0 = 0A’51+0 = 0+1 = 1 Duality

4.1.2 Single-Variable Theorems Theorems for a single variable T1 X+0 = XT1’X.1 = X Identity T2 X+1 = 1T2’X.0 = 0 Null T3 X+X = XT3’X.X = X Idempotency T4 (X’)’ = XT4’----- Involution T5 X+X’=1T5’X.X’=0 Complements Proof: X + 0 = X [X=0] 0+0 = 0True, Axiom A’4 (0+0 = 0) [X=1]1+0 = 1True, Axiom A’5 (1+0 = 1) All of the above can be proved using perfect induction

4.1.3 Two- and three-Variable Theorems T6 X+Y=Y+X T6’ X.Y=Y.X T7 (X+Y)+Z=X+(Y+Z) T7’ (X.Y).Z=X.(Y.Z) T8 X.Y+X.Z=X.(Y+Z) T8’ (X+Y).(X+Z)=X+Y.Z T9 X+X.Y=X T9’ X.(X+Y)=X T10 X.Y+X.Y’=X T10’ (X+Y).(X+Y’)=X T11 X.Y+X’.Z+Y.Z T11’ (X+Y).(X’+Z).(Y+Z) = X.Y+X’.Z= (X+Y).(X’+Z) Consensus Commutativity Associativity Distributivity Covering Combining

4.1.3 Two- and three-Variable Theorems Proof of the covering theorem: X + X. Y = X 1) X + X. Y = X. 1 + X. Y (according to T1’) 2) = X. ( 1 + Y ) (according to T8) 3) = X. 1 (according to T2) 4) = X (according to T1’)

4.1.3 Two- and three-Variable Theorems N.B. T8, T10, T11

4.1.4 N-Variable Theorems T12X+X+…+X = X T12’X. X. …. X = X T13(X 1.X 2. ….X n )’ =X 1 ’+X 2 ’+…+X n ’ T13’(X 1 +X 2 +…+X n )’=X 1 ’.X 2 ’. ….X n ’ ‘De Morgan’s Theorems are the most commonly used of all the theorems of switching algebra’ De Morgan’s Theorems

4.1.4 N-variable Theorems Prove using finite induction Most important: DeMorgan theorems

4.1.4 n-Variable Theorems Theorem T13 says: An n-input AND gate whose output is complemented is equivalent to an n-input OR gate whose inputs are complemented Examples: De Morgan’s Theorem

4.1.5 DeMorgan Symbol Equivalence Equivalent to

4.1.5 De Morgan symbol …. Likewise for OR Equivalent to

4.1.5 DeMorgan Symbols

4.1.6 Duality Swap 0 & 1, AND & OR –Result: Theorems still true Why? –Each axiom (A1-A5) has a dual (A1-A5  Counterexample: X + X  Y = X (T9) X  X + Y = X (dual) X + Y = X (T3) ???????????? X + (X  Y) = X (T9) X  (X + Y) = X (dual) (X  X) + (X  Y) = X (T8) X + (X  Y) = X (T3) parentheses, operator precedence!

4.1.6 Duality Any theorem or identity in switching algebra remains true if 0 and 1 are swapped and. and + are swapped throughout. 0 –> 1, - –> +, 1 –> 0, + –> - Example: duality: X+Y’+Z = X’.Y.Z’ Example: F=(X’.Y’.Z’) + (X.Y’.Z’) + (X’.Y.Z) By T10 (Y’.Z’) + (X’.Y.Z)

4.1.6 Duality Example: F = A’BC’D’+ABC’D’ + ABC’D’+AB’C’D’+ABC’D+AB’C’D F = BC’D’ + AC’D’ + AC’D F = BC’D’ + AC’

4.1.6 Standard Representation of Logic Functions Literal: variable or complement of variable –Ex: X, Y, X’, Y’ Product term: literal or product of literal –Ex: Z’, X.Y, X.Y.Z Sum of products: logical sum of product terms –Ex: Z’+X.Y’+X.Y.Z’ Sum term: literal or sum of literals –Ex: Z’, X+Y, X+Y’+Z Product of sums –Ex: Z.(X+Y).(X+Y’+Z)

Standard Representation of Logic Functions Normal term: product or sum term in which no variable appears more than once –Ex: X.Y.Z –BAD ex: X.X’.Y.Z n-variable minterm: normal product term using n literals –Ex: 4-variable minterm (2 4 combinations) –WXYZ’, WXY’Z, WX’YZ’ n-variable maxterm: normal sum with n literals –Ex: W+X+Y’+Z, W+X’+Y+Z’

Standard Representation of Logic Functions Relation between minterms and maxterms

4.2 Combinational-circuit analysis Canonical sum: sum of minterms corresponding to rows –Ex: F =  x,y (0,1,2) = X’.Y’+X’.Y+X.Y’ Canonical product: product of maxterms –Ex: F=  x,y (1,3) = (X+Y’).(X’+Y’) Row X Y F Minterm X’.Y’ X’.Y X.Y’ X.Y Maxterm X+Y X+Y’ X’+Y X’+Y’ Representation of a 2-input function

4.2 Combinational-circuit analysis The goal is to analyse and then reduce circuit. Several methods can be used : – boolean algebra –Karnaugh-Maps (K-Maps) Analysis –We can manipulate circuits using algebra –Then prove equality with truth tables

4.2 Combinational-circuit analysis Function F = ((X+Y’).Z) + (X’.Y.Z’)

4.2 Combinational-circuit analysis F X Y Z X’ Y’ Z’ X+Y’ 1.Z X’.Y.Z’ Truth table Function F = ((X+Y’).Z) + (X’.Y.Z’)

4.2 Combinational-circuit analysis Function F = ((X+Y’).Z) + (X’.Y.Z’) Determine corresponding output values for different combinations Of input values

Combinational-circuit analysis Now, change to a sum of products F = ( (X+Y’). Z ) + (X’.Y.Z’) F = X.Z + Y’.Z + X’.Y.Z’

4.2 Combinational-circuit analysis Function F = X.Z + Y’.Z + X’.Y.Z’

4.2 Combinational-circuit analysis F X Y Z X’ Y’ Z’ X.Z Y’.Z X’.Y.Z’ Truth table Function F = X.Z + Y’.Z + X’.Y.Z’

4.2 Combinational-circuit analysis There are many ways to make the same circuit by manipulating the functions or using equivalent gates to change circuit

4.2 Combinational-circuit analysis

4.3.3 Combinational circuit minimization Boolean AlgebraSimplification Example 1: F= A’(A+B) F= (A’.A) + (A’.B) Distributivity T8 F= 0 + (A’.B) Complements F= A’.B

4.3.3Combinational circuit minimization Example 2 : F= (A+B).(A+C)+A’.(A+B) F= A+(B.C) +A’.(A+B) Distributivity T’8 F= A+(B.C) + (A’.B) Example 1 F= A + (A’.B) + (B.C) Change order F= (A+A’).(A+B) + (B.C) Distribution F= A+B + (B.C) Complements F= A + B Covering

4.3.3Combinational circuit minimization Example 3 : F= ( ( (A.B)’.A)’.( (A.B)’.B)’)’ 1) Use De Morgan: (A+B)’= A’.B’ or (A.B)’=A’+B’ F= ((A.B)’.A) + ((A.B)’.B) 2) Use De Morgan: F= (A’+B’).A + (A’+B’).B 3) Distributivity F= A.A’ + A.B’ + A’.B + B.B’ 4) Complement F= A.B’+A’B

4.3.4 Karnaugh Maps (K-Maps) A K-map is a graphical representation of a logic function truth table –The k-map is a standard method for simplification of, the sum-of-products, or product-of-sums –Based on combining adjacent minterm/maxterm Ex: (2-variable) minterm x y A A B B A’.B’+A.B’ =B’

4.3.4 Example: 3-variable Karnaugh map Y is 1 in this region, other columns represent y’ Z is 1 in this row, other row represents Z’ X is 1 in this region, other columns represent X’

4.3.4 Karnaugh Maps (K-Maps) xy z X Z Y B AB C A C 1 1 A B C minterms A’B’C’ A’B’C A’BC’ A’BC AB’C’ AB’C ABC’ ABC A’BC’+ABC’=BC’

4.3.4 Karnaugh-map usage Plot 1s corresponding to minterms of function. Circle largest possible rectangular sets of 1s. –# of 1s in set must be power of 2 –OK to cross edges Read off product terms, one per circled set. –Variable is 1 ==> include variable –Variable is 0 ==> include complement of variable –Variable is both 0 and 1 ==> variable not included Circled sets and corresponding product terms are called “prime implicants” Minimum number of gates and gate inputs

4.3.4 Karnaugh Maps (K-Maps) WX YZ W Z X Y AB CD A D B C Reduce from 5 terms sum: A’B’C’D+A’B’CD+AB’C’D’+AB’C’D +AB’CD To a 2 terms sum: AB’C’ + BD’ Example: 4-variable

4.3.4 Karnaugh Maps (K-Maps) AB CD A D B C Reduce from 6 terms sum to 2 terms sum: BD + AB’D’ Example: 4-variable

4.3.4 Karnaugh Maps (K-Maps) AB CD A D B C Example: use K.maps to reduce the following: F = ABCD+A’BCD+AB’CD+ABC’D+AB’C’D +A’B’CD’+A’B’C’D’ A’B’D’+BCD+AD

4.3.4 Example: F =  (1,2,5,7) Corresponding Truth table

4.3.4 Another example

4.3.4 Yet another example Distinguished 1 cells Essential prime implicants

Prime implicant (Definitions) Prime implicant P is a normal product term that is an implicant of function F such that if any variable is removed from P, then the resulting product term does not imply F Prime implicant theorem: The sum of Prime implicants is the minimal sum Distinguished 1-cell: It is a cell that is covered by only one prime implicant Minimizing Sums of Products

Essential Prime Implicant: it is the prime implicant that covers one or more distinguished 1-cells. Prime implicant (Definitions) Minimizing Sums of Products

Ex: F=  W,X,Y,Z (1,3,4,5,9,11,12,13,14,15) Identify distinguished 1-cell and the corresponding essential prime implicant. If all of 1 are covered, stop we have the minimal sum. Remove essential prime implicant off => reduced map Select PIs (larger groups) to cover the remaining ones WX YZ W Z X Y Minimizing Sums of Products

Example: F=  W,X,Y,Z (0,1,2,3,4,5,7,14,15) Try to put this 1 in the largest possible group Identify distinguished 1-cell and the corresponding essential prime implicant. If all of 1 are covered, stop we have the minimal sum. Remove essential prime implicant off => reduced map Select PIs (larger groups) to cover the remaining ones Minimizing Sums of Products

4.3.7 Don ’t care conditions x1 x2 x3 x4 y1 y2 y3 y … … d d d d … … d d d d BCD generator We don’t care what the Output value is for these rows Minimizing Sums of Products

Don ’t care conditions Sometimes the specification of a CLN is such that its output does not matter for certain input combinations. These cases called do not care conditions. Any d can be treated as either 0 or 1. They are useful during simplification Minimizing Sums of Products

Brute-force design Truth table --> canonical sum (sum of minterms) Example: prime-number detector –4-bit input, N 3 N 2 N 1 N 0 row N 3 N 2 N 1 N 0 F F =   (1,2,3,5,7,11,13) Example of design

Minterm list --> canonical sum Example of design

Algebraic simplification Theorem T8, Reduce number of gates and gate inputs Example of design

Resulting circuit Example of design

Prime-number detector (again) K-map solution Example of design

When we solved algebraically, we missed one simplification -- the circuit below has three less gate inputs. Prime-number detector (again) K-map solution Example of design