CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC

Slides:



Advertisements
Similar presentations
ECE 3110: Introduction to Digital Systems Simplifying Sum of Products using Karnaugh Maps.
Advertisements

Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table.
Gate-level Minimization
Digital Logic (Review)
بهينه سازي با نقشة کارنو
Chapter 3 Simplification of Switching Functions
Computer Engineering (Logic Circuits) (Karnaugh Map)
ECE 331 – Digital System Design Karnaugh Maps and Determining a Minimal Cover (Lecture #7) The slides included herein were taken from the materials accompanying.
بهينه سازي با نقشة کارنو Karnaugh Map. 2  Method of graphically representing the truth table that helps visualize adjacencies 2-variable K-map 3-variable.
Logic gate level Part 3: minimizing circuits. Improving circuit efficiency Efficiency of combinatorial circuit depends on number & arrangement of its.
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
1 COMBINATIONAL LOGIC One or more digital signal inputs One or more digital signal outputs Outputs are only functions of current input values (ideal) plus.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Switching functions The postulates and sets of Boolean logic are presented in generic terms without the elements of K being specified In EE we need to.
1 Simplification of Boolean Functions:  An implementation of a Boolean Function requires the use of logic gates.  A smaller number of gates, with each.
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.
CS2100 Computer Organisation
ECE 2110: Introduction to Digital Systems PoS minimization Don’t care conditions.
Chapter 4 Combinational Logic Design Principles. Overview Objectives -Define combinational logic circuit -Analysis of logic circuits (to describe what.
ECE 3110: Introduction to Digital Systems Symplifying Products of sums using Karnaugh Maps.
EE345 – Micro-Controllers Gate-Level Minimization Prof. Ahmad Abu-El-Haija.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
Computer Engineering (Logic Circuits) (Karnaugh Map)
Chapter3: Gate-Level Minimization Part 1 Origionally By Reham S. Al-Majed Imam Muhammad Bin Saud University.
Chapter 3 The Karnaugh Map
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.
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.
1 Minterm and Maxterm Expressions Definition: a minterm of n variables is a product of the variables in which each appears exactly once in true or complemented.
Ahmad Almulhem, KFUPM 2010 COE 202: Digital Logic Design Combinational Logic Part 3 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
Chap 2. Combinational Logic Circuits
CH41 Chapter 4 Boolean Algebra and Logic Simplification By Taweesak Reungpeerakul.
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 & Logic Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
BR 2/1/991 Truth Tables (again) Recall that a boolean equation can be represented by a Truth Table A B C F
C.S.Choy39 TERMINOLOGY Minterm –product term containing all input variables of a function in either true or complementary form Maxterm – sum term containing.
1 Example: Groupings on 3-Variable K-Maps BC F(A,B,C) = A ’ B ’ A BC F(A,B,C) = B ’ A
Karnaugh Map (K-Map) By Dr. M. Khamis Mrs. Dua’a Al Sinari.
Digital Logic (Karnaugh Map). Karnaugh Maps Karnaugh maps (K-maps) are graphical representations of boolean functions. One map cell corresponds to a row.
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic 4: Cost of Logic Circuits and Karnaugh Maps José Nelson Amaral.
Karnaugh Maps (K maps).
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 3 Combinational.
ECE 301 – Digital Electronics Minimizing Boolean Expressions using K-maps, The Minimal Cover, and Incompletely Specified Boolean Functions (Lecture #6)
CSE 260 BRAC University.
1 EENG 2710 Chapter 3 Simplification of Switching Functions.
CE1110: Digital Logic Design Gate Level Minimization Karnaugh Maps (K-Maps)
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
Chapter 2: Boolean Algebra and Logic Functions
Computer Organisation
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2 Instructor: Andrew B. Kahng (lecture)
Complement of a Function
CS 352 Introduction to Logic Design
ECE 2110: Introduction to Digital Systems
Karnaugh Maps.
17-Nov-18 Logic Algebra 1 Combinational logic.
Boolean Algebra.
ECE 331 – Digital System Design
Chapter 3 Gate-level Minimization.
MINTERMS and MAXTERMS Week 3
Boolean Algebra Boolean Algebra
3-Variable K-map AB/C AB/C A’B’ A’B AB AB’
Analysis of Logic Circuits Example 1
Chapter 4 Combinational Logic Design Principles. Overview Objectives -Define combinational logic circuit -Analysis of logic circuits (to describe what.
ECE 331 – Digital System Design
Presentation transcript:

CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC (Sections 3.1 – 3.5)

3.1 DEFINITION OF COMBINATIONAL LOGIC Logic circuits without feedback from output to the input, constructed from a functionally complete gate set, are said to be combinational. · · Combinational Logic Functions Inputs · · Outputs · ·

3.1.1 PROBLEM STATEMENTS TO TRUTH TABLES E.g : Conveyor system(P85, Ex. 3.1) M=a’bms+ab’ms+abms

3.1.1 PROBLEM STATEMENTS TO TRUTH TABLES E.g. A NASA system(P87, Ex. 3.2) C2 C3 C1

3.1.1 PROBLEM STATEMENTS TO TRUTH TABLES E.g. Conveyor system(P88, ex. 3.4) S3 m3 S2 m2 m4 S1 m1

3.1.1 PROBLEM STATEMENTS TO TRUTH TABLES The process of converting a verbal problem statement into a truth table : Determine the input variables and output variables that are involved Assign mnemonic or letter or number symbols to each variable determine the size of the truth table; how many input combinations exist: 2x=y where x=number of input variables and y=number of combinations. Construct a truth table containing all of the input variable combinations By careful reading of the problem statement determine the combinations of inputs that cause a given output to be true

3.1.1 PROBLEM STATEMENTS TO TRUTH TABLES Exe: Design a truth table to indicate a majority of three inputs is true I3 I2 I1 O1 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1

3.1.2 Deriving Switching Equations Definitions Product term: literals connected by • Sum term: literals connected by + Minterm: a product term in which all the variables appear exactly once, either complemented or uncomplemented Maxterm: a sum term in which all the variables appear exactly once, either complemented or uncomplemented

Minterm Represents exactly one combination in the truth table. Denoted by mj, where j is the decimal equivalent of the minterm’s corresponding binary combination (bj). A variable in mj is complemented if its value in bj is 0, otherwise is uncomplemented. M(a,b,m,s)=a’bms+ab’ms+abms (m7) (m11) (m15)

Maxterm Represents exactly one combination in the truth table. Denoted by Mj, where j is the decimal equivalent of the maxterm’s corresponding binary combination (bj). A variable in Mj is complemented if its value in bj is 1, otherwise is uncomplemented. F(a,b,c)=(a’+b+c’)(a+b+c’)(a+b’+c’) 101 001 011 M5 M1 M3

Truth Table notation for Minterms and Maxterms 3 variables x,y,z (order is fixed)

3.2 Canonical(规范) Forms Any Boolean function F( ) can be expressed as a unique sum of minterms and a unique product of maxterms (under a fixed variable ordering). every function F() has two canonical forms: Canonical Sum-Of-Products (sum of minterms) Canonical Product-Of-Sums (product of maxterms)

Convert switching equations to canonical form Expand non-canonical terms by inserting equivalent of 1 in each missing variable x: (x + x’) = 1 Remove duplicate minterms f1(a,b,c) = a’b’c + bc’ + ac’ = a’b’c + (a+a’)bc’ + a(b+b’)c’ = a’b’c + abc’ + a’bc’ + abc’ + ab’c’ = a’b’c + abc’ + a’bc + ab’c’

Convert switching equations to canonical form SOP E.g. P=f(a,b,c)=ab’+ac’+bc =ab’(c+c’)+ac’ (b+b’)+bc(a+a’) =ab’c+ab’c’+abc’+ab’c’+abc+a’bc =ab’c+ab’c’+abc’+abc+a’bc

Convert switching equations to canonical form Expand noncanonical terms by adding 0 in terms of missing variables (e.g., xx’ = 0) and using the distributive law Remove duplicate maxterms f1(a,b,c) = (a+b+c)•(b’+c’)•(a’+c’) = (a+b+c)•(aa’+b’+c’)•(a’+bb’+c’) = (a+b+c)•(a+b’+c’)•(a’+b’+c’)• (a’+b+c’)•(a’+b’+c’) = (a+b+c)•(a+b’+c’)•(a’+b’+c’)•(a’+b+c’)

Convert switching equations to canonical form POS E.g. T=f(a,b,c)=(a+b’)(b’+c) =(a+b’+cc’)(b’+c+aa’) =(a+b’+c) (a+b’+c’)(a+b’+c)(a’+b’+c) =(a+b’+c) (a+b’+c’)(a’+b’+c)

Convert switching equations to canonical form Exe: P=f(w,x,y,z)=w’x+yz’ T=f(a,b,c,d)=(a+b’+c)(a’+d) Ans: P=f(w,x,y,z)=wxyz’+wx’yz’+w’xyz+w’xyz’+w’xy’z +w’xy’z’+w’x’yz’ T=f(a,b,c,d)= (a+b’+c+d) (a+b’+c+d’) (a’+b+c+d) (a’+b’+c+d) (a’+b+c’+d) (a’+b’+c’+d)

3.3 GENERATION OF SWITCHING EQUATIONS FROM TRUTH TABLES Canonical Sum-Of-Products: The minterms included are those mj such that F( ) = 1 in row j of the truth table for F( ). Canonical Product-Of-Sums: The maxterms included are those Mj such that F( ) = 0 in row j of the truth table for F( ).

Example Truth table for f1(a,b,c) at right The canonical sum-of-products form for f1 is f1(a,b,c) = m1 + m2 + m4 + m6 = a’b’c + a’bc’ + ab’c’ + abc’ The canonical product-of-sums form for f1 is f1(a,b,c) = M0 • M3 • M5 • M7 = (a+b+c)•(a+b’+c’)• (a’+b+c’)•(a’+b’+c’). Observe that: mj = Mj’ a b c f1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

CSE221: Logic Design, Spring 2003 2017/4/24 Shorthand: ∑ and ∏ f1(a,b,c) = ∑ m(1,2,4,6), where ∑ indicates that this is a sum-of-products form, and m(1,2,4,6) indicates that the minterms to be included are m1, m2, m4, and m6. f1(a,b,c) = ∏ M(0,3,5,7), where ∏ indicates that this is a product-of-sums form, and M(0,3,5,7) indicates that the maxterms to be included are M0, M3, M5, and M7. ∑ m(1,2,4,6) = ∏ M(0,3,5,7) = f1(a,b,c) 最大项、最小项的十进制简化形式 Chapter 2-i: Combinational Logic Circuits (Sections 2.1-- 2.5)

Conversion Between Canonical Forms Replace ∑ with ∏ (or vice versa) and replace those j’s that appeared in the original form with those that do not. Example: f1(a,b,c) = a’b’c + a’bc’ + ab’c’ + abc’ = m1 + m2 + m4 + m6 = ∑(1,2,4,6) = ∏(0,3,5,7) = (a+b+c)•(a+b’+c’)•(a’+b+c’)•(a’+b’+c’)

Karnaugh Maps Why Karnaugh maps? to simplify boolean equations Karnaugh maps (K-maps) are graphical representations of boolean functions. One map cell corresponds to a row in the truth table. one map cell corresponds to a minterm or a maxterm in the boolean expression

CSE221: Logic Design, Spring 2003 Karnaugh Maps 2017/4/24 m0 m1 m3 m7 m5 m2 m6 m4 00 01 11 10 1 AB m0 m3 m1 m2 1 A B C m0 m1 m3 m5 m13 m9 m4 m12 m8 m6 m14 m10 m7 m15 m11 m2 AB CD 00 01 11 10 Logic adjacency : Any two adjacent cells in the map differ by ONLY one. Example: m0 (=x1’x2’) is adjacent to m1 (=x1’x2) and m2 (=x1x2’) but NOT m3 (=x1x2) 把真值表中的最小项重新排列成矩阵形式,并且使矩阵的横方向和纵方向的逻辑变量的取值按格雷码的顺序排列 相邻是指两个最小项只有一个变量互补,其他变量都相同 Chapter 2-i: Combinational Logic Circuits (Sections 2.1-- 2.5)

2-Variable Map -- Example CSE221: Logic Design, Spring 2003 2017/4/24 2-Variable Map -- Example E.g. f(x1,x2) = x1’x2’+ x1’x2 + x1x2’ = m0 + m1 + m2 What (simpler) function is represented by each dashed rectangle? x1’x2’+ x1’x2 =x1’(x2’+x2)=x1’ x1’x2’+ x1x2’=x2’(x1’+x1) =x2’ f(x1,x2) =x1’+x2’ x2 x1 1 1 2 1 1s placed in K-map for specified minterms m0, m1, m2 Grouping (ORing) of 1s allows simplification 1 1 1 3 Chapter 2-i: Combinational Logic Circuits (Sections 2.1-- 2.5)

Minimization as SOP using K-map Enter 1s in the K-map for each product term in the function Group adjacent K-map cells containing 1s to obtain a product with fewer variables. Groups must be in power of 2 (2, 4, 8, …) Handle “boundary wrap” for K-maps of 3 or more variables.

Three-Variable Map yz 00 01 11 10 x m0 m1 m3 m2 1 3 2 1 m4 4 m5 5 m7 7 6 m6 -Note: variable ordering is (x,y,z); yz specifies column, x specifies row. -Each cell is adjacent to three other cells (left or right or top or bottom or edge wrap)

Three-Variable Map (cont.) minterm The types of structures that are either minterms or are generated by repeated application of the minimization theorem on a three variable map are shown at right. Groups of 1, 2, 4, 8 are possible. group of 2 terms group of 4 terms

Simplification Example: f(a,b,c) = ac’ + abc + bc’ =a(b+b’)c’+abc+(a+a’)bc’ =abc’+ab’c’+abc+abc’+a’bc’ =abc’+ab’c’+abc+a’bc’ Result: f(a,b,c) = ac’+ab+bc’ 00 01 11 10 ab c 1 1 1 1 1

More Examples f1(x, y, z) = ∑ m(2,3,5,7) f1(x, y, z) = x’y + xz 00 01 11 10 f1(x, y, z) = ∑ m(2,3,5,7) f2(x, y, z) = ∑ m (0,1,2,3,6) 1 1 1 1 1 f1(x, y, z) = x’y + xz xy z 00 01 11 10 1 1 1 f2(x, y, z) = x’+yz’ 1 1 1

Four-Variable Maps YZ WX 00 01 11 10 m0 m1 m3 m2 00 m4 m5 m7 m6 01 m12 m13 m15 m14 11 m8 m9 m11 m10 10 Top cells are adjacent to bottom cells. Left-edge cells are adjacent to right-edge cells. Note variable ordering (WXYZ).

Four-variable Map Simplification One square represents a minterm of 4 literals. A rectangle of 2 adjacent squares represents a product term of 3 literals. A rectangle of 4 squares represents a product term of 2 literals. A rectangle of 8 squares represents a product term of 1 literal. A rectangle of 16 squares produces a function that is equal to logic 1.

Example Simplify the following Boolean function (A,B,C,D) = ∑m(0,1,2,3,4,5,6,7,8,10,13). First put the function g( ) into the map, and then group as many 1s as possible. cd ab 00 01 11 10 00 1 1 1 1 1 1 01 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 10 g(A,B,C,D) = a’+b’d’+bc’d

Implicants ,Prime Implicants (PIs) and Essential Prime Implicant (EPI) Implicant: any single minterm Prime Implicant (PI): a group of minterms that cannot be combined with any other minterms or groups Essential Prime Implicant (EPI): a PI in which one or more miniterms are unique How to find PI and EPI? AB CD 00 01 11 10 00 1 1 01 1 1 11 1 1 1? 10 BCD ABC’ A’BC’D AC’D’ BD

Example a’b’ is not a prime implicant because it is contained in b’. acd is not a prime implicant because it is contained in ad. b’, ad, and a’cd’ are prime implicants. b’, ad, and a’cd’ are essential prime implicants. b’ ad cd ab 1 1 1 1 1 1 1 1 a’b’ 1 1 1 acd a’cd’

Another Example Consider f2(a,b,c,d), whose K-map is shown below. The only essential PI is b’d. ab cd 1 1 1 1 1 1 1 1 1

Systematic Procedure for Simplifying Boolean Functions Load the minterms into the K-map by placing a 1 in the appropriate square. Look for groups of minterms (PI) The group size must be a power of 2 Find the largest groups of minterms first, then smaller collections until all groups are found. Find all essential PIs. For remaining min-terms not included in the essential PIs, select a set of other PIs to cover them. The resulting simplified function is the logical OR of the product terms selected above.

Example f(a,b,c,d) = ∑m(0,1,4,5,8,11,12,13,15). F(a,b,c,d) = c’d’ + a’c’ + bc’ + acd ab cd 1 1 1 1 1 1 1 1 1

Homework Simplifying Boolean Functions F(x,y,z)=∑(0,2,3,4,5,7) F(a,b,c,d)=∑(0,3,4,5,7,11,13,15) F(w,x,y,z)=∑(0,1,4,5,9,11,13,15) F(a,b,c,d)=∑(0,1,2,4,5,6,8,9,12,13,14) F(a,b,c,d)=∑(1,3,4,5,7,8,9,11,15) F(w,x,y,z)=∑(1,5,7,8,9,10,11,13,15) P151: 4-c, 4-e

TO BE CONTINUED