Gates and Logic: From Switches To Transistors, Logic Gates and Logic Circuits
Gates and Logic: From Switches To Transistors, Logic Gates and Logic Circuits
Gates and Logic: From Switches To Transistors, Logic Gates and Logic Circuits
GoalsforToday
FromSwitchestoLogicGatestoLogicCircuits LogicGates
Fromswitches TruthTables
LogicCircuits
IdentityLaws FromTruthTablestoCircuits(SumofProducts)
LogicCircuitMinimization
AlgebraicManipulations TruthTables(Karnaugh Maps)
Transistors(electronicswitch)
Aswitch
Actsasaconductor or insulator
Canbeusedtobuild amazingthings
TheBombeusedtobreaktheGerman EnigmamachineduringWorldWarII
BasicBuildingBlocks:SwitchestoLogicGates
+
Either(OR)
A
TruthTable
A B Light OFF OFF OFF ON
ON ON
OFF ON
Both(AND)
+
A B
Light
BasicBuildingBlocks:SwitchestoLogicGates
Either(OR)
A
TruthTable
A B Light OFF OFF OFF ON ON ON OFF ON
OR
B
Both(AND)
A
A B Light
AND
B
BasicBuildingBlocks:SwitchestoLogicGates
Either(OR)
A
TruthTable
A 0 0 1 1 B 0 1 0 1 Light
OR
B
0=OFF 1=ON
Both(AND)
A
A 0 0 1 1 B 0 1 0 1 Light
AND
B
BasicBuildingBlocks:SwitchestoLogicGates
OR
B
George Boole,(1815-1864)
Didyouknow?
AND
B
Takeaway
Binary(twosymbols:trueandfalse)isthebasisof LogicDesign
BuildingFunctions:LogicGates
NOT:
A Out
In
A B Out
AND: A
B
0 0 0 1 1 0 1 1
0 0 0 1
OR:
A B
A B Out 0 0 0 1 1 0 1 1 0 1 1 1
LogicGates
digitalcircuitthateitherallowsasignaltopassthroughitornot. Usedtobuildlogicfunctions Therearesevenbasiclogicgates: AND,OR,NOT, NAND (notAND),NOR (notOR),XOR,andXNOR (notXOR)[later]
BuildingFunctions:LogicGates
NOT:
A Out 1 0
In
0 1
A B Out
AND: A
B
0 0 0 1 1 0 1 1
0 0 0 1
OR:
A B
A B Out 0 0 0 1 1 0 1 1 0 1 1 1
LogicGates
digitalcircuitthateitherallowsasignaltopassthroughitornot. Usedtobuildlogicfunctions Therearesevenbasiclogicgates: AND,OR,NOT, NAND (notAND),NOR (notOR),XOR,andXNOR (notXOR)[later]
BuildingFunctions:LogicGates
NOT:
A Out 1 0 A B Out
In
0 1
A B Out
AND: A
B
0 0 0 1 1 0 1 1
0 0 0 1
NAND: NOR:
A B
0 0 0 1 1 0 1 1
1 1 1 0
OR:
A B
A B Out 0 0 0 1 1 0 1 1 0 1 1 1
A B
A B Out 0 0 0 1 1 0 1 1 1 0 0 0
LogicGates
digitalcircuitthateitherallowsasignaltopassthroughitornot. Usedtobuildlogicfunctions Therearesevenbasiclogicgates: AND,OR,NOT, NAND (notAND),NOR (notOR),XOR,andXNOR (notXOR)[later]
Activity#1.A:LogicGates
Fillinthetruthtable,giventhefollowingLogic CircuitmadefromLogicAND,OR,andNOTgates. Whatdoesthelogiccircuitdo?
Out
a b Out
Activity#1:LogicGates
Fillinthetruthtable,giventhefollowingLogic CircuitmadefromLogicAND,OR,andNOTgates. Whatdoesthelogiccircuitdo?
a 0 0 0 0 1 1 1 1
b 0 0 1 1 0 0 1 1
d 0 1 0 1 0 1 0 1
Out
a d Out
GoalsforToday
FromSwitchestoLogicGatestoLogicCircuits LogicGates
Fromswitches TruthTables
LogicCircuits
IdentityLaws FromTruthTablestoCircuits(SumofProducts)
LogicCircuitMinimization
AlgebraicManipulations TruthTables(Karnaugh Maps)
Transistors(electronicswitch)
NextGoal
GivenaLogicfunction,createaLogicCircuitthat implementstheLogicFunction and,withtheminimumnumberoflogicgates Fewergates:Acheaper($$$)circuit!
LogicGates
NOT: AND: OR: XOR:
A L B ogic Equations
A Out 1 0
In
0 1
A B Out
A B
0 0 0 1 1 0 1 1
0 0 0 1
A B
A B Out 0 0 0 1 1 0 1 1 0 1 1 1
A B Out 0 0 0 1 1 0 0 1 1
LogicGates
NOT: AND: OR: XOR:
A L B ogic Equations
A Out 1 0 A B Out
In
0 1
A B Out
A B
0 0 0 1 1 0 1 1
0 0 0 1
NAND: NOR:
A B
0 0 0 1 1 0 1 1
1 1 1 0
A B
A B Out 0 0 0 1 1 0 1 1 0 1 1 1
A B
A B Out 0 0 0 1 1 0 1 0 0 0
XNOR:
A B
1 1
A B Out 0 0 0 1 1 0 0 1 1
A B Out 0 0 0 1 1 0 1 1 1 0 0 1
LogicEquations
NOT:
out= =!a=a
AND: OR:
XOR:
LogicEquations
Constants:true=1,false=0 Variables:a,b,out, Operators(above):AND,OR,NOT,etc.
LogicEquations
NOT:
out= =!a=a
AND: OR:
NAND: NOR:
out=a
XOR:
XNOR:
LogicEquations
Constants:true=1,false=0 Variables:a,b,out, Operators(above):AND,OR,NOT, . etc.
Identities
Identitiesusefulformanipulatinglogicequations
Foroptimization&easeofimplementation
a0= a1= a=
Identities
Identitiesusefulformanipulatinglogicequations
Foroptimization&easeofimplementation
= = a+ab = a(b+c)= =
LogicManipulation
functions:gatestruthtablesequations Example:(a+b)(a+c)=a+bc
a 0 0 0 0 1 1 1 1 b 0 0 1 1 0 0 1 1 c 0 1 0 1 0 1 0 1
Takeaway
Binary(twosymbols:trueandfalse)isthebasisof LogicDesign MorethanoneLogicCircuitcanimplementsame Logicfunction.UseAlgebra(Identities)orTruth Tablestoshowequivalence.
NextGoal
Howtostandardizeminimizinglogiccircuits?
LogicMinimization
Howtoimplementadesiredlogicfunction? a 0 0 0 0 1 1 1 1 b 0 0 1 1 0 0 1 1 c out 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 0
LogicMinimization
Howtoimplementadesiredlogicfunction? a 0 0 0 0 1 1 1 1 b 0 0 1 1 0 0 1 1 c out minterm 1) Writeminterms 0 0 abc 2) sumofproducts: 1 1 abc ORofallmintermswhereout=1 0 0 abc 1 1 abc 0 0 abc 1 1 abc 0 0 abc 1 0 abc
KarnaughMaps
Howdoesonefindthemostefficientequation? Manipulatealgebraicallyuntil? UseKarnaughmaps(optimizevisually) Useasoftwareoptimizer Forlargecircuits Decomposition&reuseofbuildingblocks
MinimizationwithKarnaugh maps(1)
a 0 0 0 0 1 1 1 1
b 0 0 1 1 0 0 1 1
c 0 1 0 1 0 1 0 1
out 0 1 0 1 1 1 0 0
out =
MinimizationwithKarnaugh maps(2)
a 0 0 0 0 1 1 1 1
b 0 0 1 1 0 0 1 1
c 0 1 0 1 0 1 0 1
out 0 1 0 1 1 1 0 0
out =
ab 00 011110 0 1
0 1
0 1
0 0
MinimizationwithKarnaugh maps(2)
a 0 0 0 0 1 1 1 1
b 0 0 1 1 0 0 1 1
c 0 1 0 1 0 1 0 1
out 0 1 0 1 1 1 0 0
out =
Cover all 1s Group adjacent blocks of 2n 1s that yield a rectangular shape Encode the common features of the rectangle
out = ab + ac
ab 00 01 0 1 11 10
0 1
0 1
0 0
1 1
Karnaugh MinimizationTricks(1)
c ab 00 01 1110 0 1 c 0 1 ab 00 01 1110
0 0
1 0
1 1
1 0
out =
1 0
1 0
1 1
1 0
out =
KarnaughMinimizationTricks(2)
ab cd 00 01 11 10 ab cd 00 01 11 10 00 011110 00 01 1110
0 1 1 0
0 0 0 0
0 0 0 0
0 1 1 0
Themapwrapsaround
out=
1 0 0 1
0 0 0 0
0 0 0 0
1 0 0 1
out=
KarnaughMinimizationTricks(3)
ab cd 00 01 11 10 ab cd 00 01 11 10 00 011110 00 011110
0 1 1 0
0 x x 0
0 x x 0
0 x 1 0
1 0 0 1
0 x x 0
0 x x 0
x 0 0 1
assumemiddlexs=0 assume4th columnx=1 out=
Multiplexer
Amultiplexerselects betweenmultipleinputs
d
a 0 0 0 0 1 1 1 1 b 0 0 1 1 0 0 1 1 d 0 1 0 1 0 1 0 1 out
a b
out=a,ifd=0 out=b,ifd=1
Takeaway
Binary(twosymbols:trueandfalse)isthebasisof LogicDesign MorethanoneLogicCircuitcanimplementsame Logicfunction.UseAlgebra(Identities)orTruth Tablestoshowequivalence. Anylogicfunctioncanbeimplementedassumof products.Karnaugh Mapsminimizenumberofgates.
GoalsforToday
FromTransistorstoGatestoLogicCircuits LogicGates
Fromtransistors TruthTables
LogicCircuits
IdentityLaws FromTruthTablestoCircuits(SumofProducts)
LogicCircuitMinimization
AlgebraicManipulations TruthTables(Karnaugh Maps)
Transistors(electronicswitch)
NMOSandPMOSTransistors
NMOS Transistor
VD VG VD = 0V VG = VSupply VG = 0 V
PMOSTransistor
Vsupply Vsupply VS = Vsupply VG VG = VSupply
Vsupply
VD
NMOSandPMOSTransistors
NMOS Transistor
D G D= 0 G= 1 G= 0 G
PMOSTransistor
Vsupply Vsupply S = Vsupply G= 1 G= 0
Vsupply
Inverter
Vdd =hi A out A=0
Vss =gnd
A 0 1
Out 1 0
Truth table
NANDGate
Vdd A B out B Vdd
A 0 1 0 1
B out 0 1 0 1 1 1 1 0
Vss
NORGate
Vdd A B out A Vss B Vss
A 0 1 0 1
B out 0 1 0 0 1 0 1 0
BuildingFunctions(Revisited)
NOT: AND: OR:
NANDandNORareuniversal
CanimplementanyfunctionwithNANDorjustNORgates usefulformanufacturing
BuildingFunctions(Revisited)
NOT: AND: OR:
a
a b
a b
NANDandNORareuniversal
CanimplementanyfunctionwithNANDorjustNORgates usefulformanufacturing
LogicGates
Onecanbuygatesseparately
ex.74xxxseriesof integratedcircuits cost~$1perchip,mostly forpackagingandtesting
ThenandNow
http://www.theregister.co.uk/2010/02/03/intel_westmere_ep_preview/
Thefirsttransistor
An Intel Westmere
1.17 billion transistors 240 square millimeters Six processing cores
Summary
Mostmoderndevicesaremadefrombillionsofon/off switchescalledtransistors
Wewillbuildaprocessorinthiscourse! Transistorsmadefromsemiconductormaterials:
MOSFET MetalOxideSemiconductorFieldEffectTransistor NMOS,PMOS NegativeMOSandPositiveMOS CMOS ComplimentaryMOSmadefromPMOSandNMOStransistors
Transistorsusedtomakelogicgatesandlogiccircuits
Wecannowimplementanylogiccircuit
Candoitefficiently,usingKarnaugh mapstofindtheminimal termsrequired CanuseeitherNANDorNORgatestoimplementthelogic circuit CanuseP andNtransistorstoimplementNANDorNORgates
BigPicture:Abstraction
Hidecomplexitythroughsimpleabstractions
Simplicity
Boxdiagramrepresentsinputsandoutputs
Complexity
HidesunderlyingP andNtransistorsandatomic interactions
Vdd in out a d
out
Vss
b a d b
in
out
out