【文档说明】第4章计算机学科基础课件.ppt,共(42)页,560.665 KB,由小橙橙上传
转载请保留链接:https://www.ichengzhen.cn/view-76418.html
以下为本文档部分文字说明:
第4章计算机学科基础4–2ChapterGoals本章目标•Identifythebasicgatesanddescribethebehaviorofeach识别基础的门,描述每种门的行为•Describehowgatesareimpl
ementedusingtransistors描述如何用晶体管实现门•Combinebasicgatesintocircuits用基础门组合电路4–3ChapterGoals本章目标•DescribethebehaviorofagateorcircuitusingBooleanexpression
s,truthtables,andlogicdiagrams用Boolean表达式、真值表和逻辑框图描述门或电路。•Compareandcontrastahalfadderandafulladder比较半加器和全加器之间的异同点•Describehowamultiplexerworks描述多路复用
器是如何工作的4–4ChapterGoals本章目标•ExplainhowanS-Rlatchoperates解释如何操作S-R锁存器•Describethecharacteristicsofthefourthgenerationsofintegratedcircuits描述第四代集成电
路的特征4–5ComputersandElectricity计算机和电学•GateAdevicethatperformsabasicoperationonelectricalsignals门是对电信号执行基础运算的设备。•CircuitsGatescombinedtoperf
ormmorecomplicatedtasks电路是由门组合而成的,可以执行更加复杂的任务。4–6ComputersandElectricity计算机和电学•Therearethreedifferent,butequally
powerful,notationalmethodsfordescribingthebehaviorofgatesandcircuits描述门和电路的表示法有三种,它们互不相同,但却一样有效:–Booleanexpressio
nsBoolean表达式–logicdiagrams逻辑框图–truthtables真值表4–7ComputersandElectricity计算机和电学•BooleanexpressionsExpressionsinBooleanalgebra,amathe
maticalnotationforexpressingtwo-valuedlogic布尔表达式,布尔代数中的表达式,表示二值逻辑的数学表示法。Thisalgebraicnotationareanelegantandpowerfulwayto
demonstratetheactivityofelectricalcircuits这种代数表示法是演示电路活动的极好方式。4–8ComputersandElectricity计算机和电学•LogicdiagramAgraphical
representationofacircuitEachtypeofgateisrepresentedbyaspecificgraphicalsymbol逻辑框图,一种电路的图形化表示,每种类型的门有
自己专用的符号。•TruthtableAtableshowingallpossibleinputvalueandtheassociatedoutputvalues真值表,列出了所有可能的输入值和输出值的表
。4–9Gates门•Let’sexaminetheprocessingofthefollowingsixtypesofgates我们将分析下列6种类型的门–NOT非门–AND与门–OR或门–XOR异或门–NAND与
非门–NOR或非门4–10NOTGate非门•ANOTgateacceptsoneinputvalueandproducesoneoutputvalue非门接受一个输入值,生成一个输出值。Figure4.1Various
representationsofaNOTgate4–11NOTGate非门•Bydefinition,iftheinputvalueforaNOTgateis0,theoutputvalueis1,andifth
einputvalueis1,theoutputis0根据定义,如果非门的输入值是0,那么输出值是1;如果输入值是1,那么输出值是0.•ANOTgateissometimesreferredtoasaninverterb
ecauseitinvertstheinputvalue非门有时候又叫反向器,因为它将对输入值求反。4–12ANDGate与门•AnANDgateacceptstwoinputsignals与门接受两个输入信号•IfthetwoinputvaluesforanANDg
ateareboth1,theoutputis1;otherwise,theoutputis0如果两个输入值全是1,则输出位1,其它情况均位0.Figure4.2VariousrepresentationsofanANDgate4–13ORGate或门•Ifthet
woinputvaluesareboth0,theoutputvalueis0;otherwise,theoutputis1如果两个输入值均为0,则输出值位0,其它情况的输出值均为1.Figure4.3Variousrepr
esentationsofaORgate4–14XORGate异或门•XOR,orexclusiveOR,gate–AnXORgateproduces0ifitstwoinputsarethesame,anda1otherwise如
果异或门的两个输入相同,则输出0;否则输出1–NotethedifferencebetweentheXORgateandtheORgate;theydifferonlyinoneinputsituation–Whenbothinputsignalsare1,t
heORgateproducesa1andtheXORproducesa04–15XORGate异或门Figure4.4VariousrepresentationsofanXORgateNANDandNORGates与非门和或非门•TheNANDandNORgate
sareessentiallytheoppositeoftheANDandORgates,respectivelyFigure4.5VariousrepresentationsofaNANDgateFigure4.6Variousrepresenta
tionsofaNORgate4–154–17ReviewofGateProcessing门处理回顾•ANOTgateinvertsitssingleinputvalue非门将对它的唯一输入值取反。•AnAN
Dgateproduces1ifbothinputvaluesare1如果两个输入都是1,与门将生成1.•AnORgateproduces1ifoneortheotherorbothinputvaluesare1如果一个输入值是1,或者两个
输入都是1,或门将输出1.4–18ReviewofGateProcessing门处理回顾•AnXORgateproduces1ifoneortheother(butnotboth)inputvaluesare1如果只有一个输入值是1,而不是两个都是1,异或门将输出
1.•ANANDgateproducestheoppositeresultsofanANDgate与非门生成的结果和与门生成的相反•ANORgateproducestheoppositeresultsofa
nORgate或非门生成的结果和或门生成的相反4–19GateswithMoreInputs具有更多输入的门•Gatescanbedesignedtoacceptthreeormoreinputvalues门可以设计成接受三个或更多个输入值。•Athree-inputANDgate
,forexample,producesanoutputof1onlyifallinputvaluesare1例如,具有三个输入值的与门,只有当三个输入值都是1时,才生成值为1的结果。Figure4.7Variousrepresentationsofathree-inputANDga
te4–20ConstructingGates门的构造•TransistorAdevicethatacts,dependingonthevoltagelevelofaninputsignal,eitherasaw
irethatconductselectricityorasaresistorthatblockstheflowofelectricity晶体管根据输入信号的电压电平分为两种角色,一种是传导电流的导线,另一
种是阻止电流的电阻。–Atransistorhasnomovingparts,yetactslikeaswitch虽然晶体管没有可移动的部分,但是却可以作为开关–Itismadeofasemiconductormaterial,whichisneitheraparticularlygo
odconductorofelectricity,suchascopper,noraparticularlygoodinsulator,suchasrubber它是由半导体材料制成,所谓半导体材料,就是既不是像铜那样的良好导体,也不是像橡胶一样的绝缘体。4–21
jasonm:Redo4.8(crop)ConstructingGates门的构造•Atransistorhasthreeterminals–Asource源极–Abase基极–Anemitter,typicallyconnectedt
oagroundwire发射极,通常接地•Iftheelectricalsignalisgrounded,itisallowedtoflowthroughanalternativeroutetotheground(literally)whereitcandonoh
armFigure4.8Theconnectionsofatransistor4–22ConstructingGates门的构造•Itturnsoutthat,becausethewayatransistorworks,theeasiestgatestocrea
tearetheNOT,NAND,andNORgatesFigure4.9Constructinggatesusingtransistors4–23Circuits电路•Twogeneralcategories–
Inacombinationalcircuit,theinputvaluesexplicitlydeterminetheoutput组合电路,输入值明确决定输出值。–Inasequentialcircuit,theoutputisafunctionoftheinputvaluesaswel
lastheexistingstateofthecircuit时序电路,输出值是输入值和电路现有状态的函数。•Aswithgates,wecandescribetheoperationsofentirecircuitsusingthreenotations–Booleane
xpressions–logicdiagrams–truthtables4–24CombinationalCircuits组合电路•Gatesarecombinedintocircuitsbyusingtheoutputofonegateastheinputfora
nother把一个门的输出作为另一个门的输入,可以把门组合成电路。Page994–25CombinationalCircuits组合电路•Becausetherearethreeinputstothiscircuit,eightrowsarerequiredtodesc
ribeallpossibleinputcombinations•ThissamecircuitusingBooleanalgebrais(AB+AC)Page1004–26Nowlet’sgotheotherway;let’stake
aBooleanexpressionanddraw•ConsiderthefollowingBooleanexpressionA(B+C)Page100Page101•Nowcomparethefinalresultcolumninthistruthtabletothetruthtabl
eforthepreviousexample•Theyareidentical4–27Nowlet’sgotheotherway;let’stakeaBooleanexpressionanddraw•Wehavethereforejustdemonstrated
circuitequivalence电路等价–Thatis,bothcircuitsproducetheexactsameoutputforeachinputvaluecombination–对应每个输入值组合,两个电路都生成完全相同的输出。•Booleanalge
braallowsustoapplyprovablemathematicalprinciplestohelpusdesignlogicalcircuits布尔代数允许我们使用已经证明的数学法则来设计逻辑电路。4–28Properties
ofBooleanAlgebra布尔代数属性Page101交换律结合律分配律恒等余式4–29Adders加法器•Atthedigitallogiclevel,additionisperformedinbinary在数字逻辑层,加法是
用二进制执行的。•Additionoperationsarecarriedoutbyspecialcircuitscalled,appropriately,adders加法运算是由专用的电路加法器执行的。4–30Adde
rs加法器•Theresultofaddingtwobinarydigitscouldproduceacarryvalue•Recallthat1+1=10inbasetwo•Acircuitthatcomputesthesumoftwobit
sandproducesthecorrectcarrybitiscalledahalfadderPage103计算两个数位的和,并生成正确的进位的电路称为半加器。4–31Adders加法器•Circuitdiagramrepresenti
ngahalfadder•TwoBooleanexpressions:sum=ABcarry=ABPage1034–32Adders加法器•Acircuitcalledafulladdertakesthecarry-inva
lueintoaccount计算两个数位的和,并考虑进位输入的电路叫全加器。Figure4.10Afulladder4–33Multiplexers多路复用器•Multiplexerisageneralc
ircuitthatproducesasingleoutputsignal多路复用器是生成单一输出信号的通用电路–Theoutputisequaltooneofseveralinputsignalstothec
ircuit–输出值等于该电路的多个输入值之一–Themultiplexerselectswhichinputsignalisusedasanoutputsignalbasedonthevaluerepresentedbyafew
moreinputsignals,calledselectsignalsorselectcontrollines–多路复用器根据称为选择信号或者选择控制线的输入信号选择用哪个输入信号作为输出信号4–34Mu
ltiplexers多路复用器•ThecontrollinesS0,S1,andS2determinewhichofeightotherinputlines(D0throughD7)areroutedtot
heoutput(F)Figure4.11AblockdiagramofamultiplexerwiththreeselectcontrollinesPage1054–35CircuitsasMemory存储器电路•Digitalcircuitscanbeusedto
storeinformation数字电路可以用来存储信息•Thesecircuitsformasequentialcircuit,becausetheoutputofthecircuitisalsousedasinputtothecirc
uit这些电路是时序电路,因为这种电路的输出信号也被用作电路的输入信号4–36CircuitsasMemory存储器电路•AnS-Rlatchstoresasinglebinarydigit(1or0
)S-R锁存器存储一个二进制位•ThereareseveralwaysanS-RlatchcircuitcouldbedesignedusingvariouskindsofgatesFigure4.12AnS-Rlatch4–37CircuitsasMemory存储器电路•Th
edesignofthiscircuitguaranteesthatthetwooutputsXandYarealwayscomplementsofeachother•ThevalueofXatanypointintimeisconsideredtobethecurrentstate
ofthecircuit•Therefore,ifXis1,thecircuitisstoringa1;ifXis0,thecircuitisstoringa0Figure4.12AnS-Rlatch4–38Integra
tedCircuits集成电路•Integratedcircuit(alsocalledachip)Apieceofsilicononwhichmultiplegateshavebeenembedded集
成电路是嵌入了多个门的硅片Thesesiliconpiecesaremountedonaplasticorceramicpackagewithpinsalongtheedgesthatcanbesolderedontocircuit
boardsorinsertedintoappropriatesockets这些硅片被封装在塑料或者陶瓷中,边缘有引脚,可以焊接在电路板上或者插入适合的插座中。4–39IntegratedCircuits集成电路•Integ
ratedcircuits(IC)areclassifiedbythenumberofgatescontainedinthemPage1074–40IntegratedCircuits集成电路Figur
e4.13AnSSIchipcontainsindependentNANDgates4–41CPUChipsCPU芯片•ThemostimportantintegratedcircuitinanycomputeristheCent
ralProcessingUnit,orCPU中央处理器•EachCPUchiphasalargenumberofpinsthroughwhichessentiallyallcommunicationinacomputersy
stemoccurs每个CPU芯片都有大量的引脚,计算机系统的所有通信都是通过这些引脚完成的。