Upload
esther-little
View
218
Download
0
Tags:
Embed Size (px)
Citation preview
1
COMP541COMP541
Combinational Logic - IICombinational Logic - II
Montek SinghMontek Singh
Jan 18, 2012Jan 18, 2012
2
TodayToday Basics of Boolean Algebra (review)Basics of Boolean Algebra (review)
Identities and SimplificationIdentities and Simplification
Basics of Logic ImplementationBasics of Logic Implementation Minterms and maxtermsMinterms and maxterms Going from truth table to logic implementationGoing from truth table to logic implementation
3
IdentitiesIdentities Use identities to manipulate functionsUse identities to manipulate functions You can use distributive law … You can use distributive law …
… … to transform fromto transform from
ZY X F
))(( ZXY X F
))(( ZX YX YZ X
toto
4
Table of IdentitiesTable of Identities
5
DualsDuals Left and right columns are Left and right columns are dualsduals Replace AND and OR, 0s and 1sReplace AND and OR, 0s and 1s
6
Single Variable IdentitiesSingle Variable Identities
7
CommutativityCommutativity Operation is independent of order of variablesOperation is independent of order of variables
8
AssociativityAssociativity Independent of order in which we groupIndependent of order in which we group
So can also be written asSo can also be written as
andandZYX
XYZ
9
DistributivityDistributivity
Can substitute arbitrarily large algebraic Can substitute arbitrarily large algebraic expressions for the variablesexpressions for the variables Distribute an operation over the entire expressionDistribute an operation over the entire expression
10
DeMorganDeMorgan’’s Theorems Theorem Used a lotUsed a lot NOR NOR invert, then AND invert, then AND
NAND NAND invert, then OR invert, then OR
11
Truth Tables for DeMorganTruth Tables for DeMorgan’’ss
12
Algebraic ManipulationAlgebraic Manipulation Consider functionConsider function
XZZYX YZ X F
13
Simplify FunctionSimplify Function
XZZYX YZ X F
XZZ Z YX F )(
XZYX F 1
XZYX F
Apply
Apply
Apply
14
Fewer GatesFewer Gates
XZYX F
15
Consensus TheoremConsensus Theorem
The third term is redundantThe third term is redundant Can just dropCan just drop
Proof summary:Proof summary: For third term to be true, Y & Z both must be 1For third term to be true, Y & Z both must be 1 Then one of the first two terms is already 1!Then one of the first two terms is already 1!
ZXXYYZZXXY
16
Complement of a FunctionComplement of a Function Definition: 1s & 0s swapped in truth tableDefinition: 1s & 0s swapped in truth table Mechanical way to derive algebraic formMechanical way to derive algebraic form
Take the dualTake the dualRecall: Interchange AND and OR, and 1s & 0sRecall: Interchange AND and OR, and 1s & 0s
Complement each literalComplement each literal
17
Mechanically Go From Truth Table Mechanically Go From Truth Table to Functionto Function
18
From Truth Table to FuncFrom Truth Table to Func Consider a truth tableConsider a truth table Can implement F by taking OR of all terms that Can implement F by taking OR of all terms that
are 1are 1
XYZZXYZYXZY XZ YX F
19
Standard FormsStandard Forms Not necessarily simplest FNot necessarily simplest F But itBut it’’s a mechanical way to go from truth s a mechanical way to go from truth
table to functiontable to function
Definitions:Definitions: Product terms – AND Product terms – AND ĀBZ ĀBZ Sum terms – OR Sum terms – OR X + Ā X + Ā This is logical product and sum, not arithmeticThis is logical product and sum, not arithmetic
20
Definition: MintermDefinition: Minterm Product term in which all variables appear Product term in which all variables appear
once (complemented or not)once (complemented or not)
21
Number of MintermsNumber of Minterms For For nn variables, there will be variables, there will be 22nn minterms minterms Like binary numbers from 0 to 2Like binary numbers from 0 to 2nn-1-1 Often numbered same way (with decimal Often numbered same way (with decimal
conversion)conversion)
22
MaxtermsMaxterms Sum term in which all variables appear once Sum term in which all variables appear once
(complemented or not)(complemented or not)
23
Minterm related to MaxtermMinterm related to Maxterm Minterm and maxterm with same subscripts Minterm and maxterm with same subscripts
are complementsare complements
ExampleExample
33 MZYXYZXm
Mjm j
24
Sum of MintermsSum of Minterms Like Slide 18Like Slide 18 OR all of the minterms of truth table row with OR all of the minterms of truth table row with
a 1a 1 ““ON-set mintermsON-set minterms””
25
Sum of ProductsSum of Products Simplifying sum-of-minterms can yield a sum Simplifying sum-of-minterms can yield a sum
of productsof products Difference is each term need not be a mintermDifference is each term need not be a minterm
i.e., terms do not need to have all variablesi.e., terms do not need to have all variables
A bunch of ANDs and one ORA bunch of ANDs and one OR
26
Two-Level ImplementationTwo-Level Implementation Sum of products has 2 levels of gatesSum of products has 2 levels of gates
27
More Levels of Gates?More Levels of Gates? WhatWhat’’s best?s best?
Hard to answerHard to answer More gate delays (more on this later)More gate delays (more on this later) But maybe we only have 2-input gatesBut maybe we only have 2-input gates
So multi-input ANDs and ORs have to be decomposedSo multi-input ANDs and ORs have to be decomposed
28
Complement of a FunctionComplement of a Function Definition: 1s & 0s swapped in truth tableDefinition: 1s & 0s swapped in truth table Mechanical way to derive algebraic formMechanical way to derive algebraic form
Take the dualTake the dualRecall: Interchange AND and OR, and 1s & 0sRecall: Interchange AND and OR, and 1s & 0s
Complement each literalComplement each literal
29
Complement of FComplement of F Not surprisingly, just sum of the other Not surprisingly, just sum of the other
mintermsminterms ““OFF-set mintermsOFF-set minterms””
In this caseIn this case
mm11 + m + m33 + m + m44 + m + m66
30
Product of MaxtermsProduct of Maxterms Recall that maxterm is true except for its own Recall that maxterm is true except for its own
casecase So M1 is only false for 001So M1 is only false for 001
31
Product of MaxtermsProduct of Maxterms Can express F as AND of all rows that should Can express F as AND of all rows that should
evaluate to 0evaluate to 0
6431 MMMMF
))(( ZYXZYXF ))(( ZYXZYX
oror
32
Product of SumsProduct of Sums Result: another standard formResult: another standard form ORs followed by ANDORs followed by AND
Terms do not have to be maxtermsTerms do not have to be maxterms
))(( ZYXZYXF
33
RecapRecap Working (so far) with AND, OR, and NOTWorking (so far) with AND, OR, and NOT Algebraic identitiesAlgebraic identities Algebraic simplificationAlgebraic simplification Minterms and maxtermsMinterms and maxterms Can now synthesize function (and gates) from Can now synthesize function (and gates) from
truth tabletruth table
34
Next TimeNext Time Lab on Fri, 1/20:Lab on Fri, 1/20:
Demo lab softwareDemo lab software Do 1Do 1stst lab assignment lab assignment
download software: see website for linkdownload software: see website for linkcouple of simple Verilog programming problemscouple of simple Verilog programming problems
Next Week: More on combinational logicNext Week: More on combinational logic