版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
DigitalLogicDesignandApplication(数字逻辑设计及应用)ReviewofChapter2
(第二章内容回顾)GeneralPositional-Number-SystemConversion(常用按位计数制的转换)AdditionandSubtractionofNon-decimalNumbers(非十进制的加法和减法)1ReviewofChapter2
(第二章内容回顾)RepresentationofNegativeNumbers
(负数的表示)Signed-Magnitude[符号-数值(原码)]ComplementNumberSystems(补码数制)
Radix–Complement(基数补码)
DiminishedRadix–Complement
[基数减1补码(基数反码)]DigitalLogicDesignandApplication(数字逻辑设计及应用)2ReviewofChapter2
(第二章内容回顾)BinarySigned-Magnitude,Ones’–Complement,andTwo’s–ComplementRepresentation(二进制的原码、反码、补码表示)
直接由补码(反码)求二进制数值的大小:最高位位权为-2n-1(-2n-1-1)(1011)2补=()10DigitalLogicDesignandApplication(数字逻辑设计及应用)3ReviewofChapter2
(第二章内容回顾)Two’s–ComplementAdditionandSubtraction(二进制补码的加法和减法)Overflow(溢出)如果加法运算产生的和超出了数制表示的范围,则结果发生了溢出(Overflow)。如何判断溢出?
MSBCin
与Cout不同DigitalLogicDesignandApplication(数字逻辑设计及应用)4ReviewofChapter2
(第二章内容回顾)Howtorepresenta1-bitDecimalnumberwitha4-bitBinarycode(如何用4位二进制码表示1位十进制码)?——BinaryCodedDecimal(BCD码)(0.301)10=()8421BCDDigitalLogicDesignandApplication(数字逻辑设计及应用)5ReviewofChapter2
(第二章内容回顾)AdditionofBCDDigits(BCD数的加法)思考:两个BCD码与两个4位二进制数相加的区别?
DigitalLogicDesignandApplication(数字逻辑设计及应用)6DigitalLogicDesignandApplication(数字逻辑设计及应用)7ReviewofChapter2
(第二章内容回顾)AdditionofBCDDigits(BCD数的加法)思考:何时需要进行修正?
如果(X+Y)产生进位信号C或在1010~1111之间如何修正?——结果加6DigitalLogicDesignandApplication(数字逻辑设计及应用)8ReviewofChapter2
(第二章内容回顾)Graycode(格雷码)任意相邻码字间只有一位数位变化最高位的0和1只改变一次最大数回到0也只有一位码元不同DigitalLogicDesignandApplication(数字逻辑设计及应用)92.11Graycode(格雷码)DigitalLogicDesignandApplication(数字逻辑设计及应用)构造方法ReflectedCode(反射码)直接构造
Thebitsofann-bitbinarycordwordarenumberedfromrighttoleft,from0ton-1.[对n
位二进制的码字从右到左编号(0~n-1)]
BitiofaGray-codecodewordis0ifbitsiandi+1ofthecorrespondingbinarycodewordarethesame,elsebitiis1.(若二进制码字的第i位和第i+1位相同,则对应的葛莱码码字的第i
位为0,否则为1。)10ReviewofChapter2
(第二章内容回顾)DigitalLogicDesignandApplication(数字逻辑设计及应用)FrombinarynumbertoGraycodeThewidthissame,theMSBissame;Fromlefttoright,ifabitinbinarynumberissameasitsleftbit,thegraycodeis0,ifitisdifferent,thegraycodeis1.Examples:binarynumber:1001001001100011Graycode:110110110101001011ReviewofChapter2
(第二章内容回顾)构造方法异或(XOR)运算:相异为1,相同为0Gn=Bn
Bn=GnGn-1=Bn⊕Bn-1Bn-1=Gn⊕Gn-1……G0=B1⊕B0B0=Gn⊕Gn-1⊕…⊕G0DigitalLogicDesignandApplication(数字逻辑设计及应用)12Chapter3DigitalCircuits(数字电路)GiveaknowledgeoftheElectricalaspectsofDigitalCircuits(介绍数字电路中的电气知识)DigitalLogicDesignandApplication(数字逻辑设计及应用)13ConsidersomeQuestions
(思考几个问题)在模拟的世界中如何表征数字系统?如何将物理上的实际值映射为逻辑上的0和1?什么时候考虑器件的逻辑功能;什么时候考虑器件的模拟特性?DigitalLogicDesignandApplication(数字逻辑设计及应用)14DigitalLogicDesignandApplication(数字逻辑设计及应用)3.1LogicSignalsandGates
(逻辑信号和门电路)HowtogettheHIGHandLOWVoltage(如何获得高、低电平)?HIGHto0or1(高电平对应0还是1)?VOUTVINVccR获得高、低电平的基本原理Positive(正逻辑)10Negative(负逻辑)101516SwitchesElectronicswitchesarethebasisofbinarydigitalcircuitsAswitchhasthreepartsSourceinput,andoutputCurrenttriestoflowfromsourceinputtooutputControlinputVoltagecontrolswhetherthatcurrentcanflow“off”“on”outputsourceinputoutputsourceinputcontrolinputcontrolinput1617SwitchesTheamazing(令人惊奇的)shrinking(逐渐减小的)switch1930s:Relays1940s:Vacuumtubes1950s:Discretetransistor1960s:Integratedcircuits(ICs)InitiallyjustafewtransistorsonICThentens,hundreds,thousands...relayvacuumtubediscretetransistorICquarter(toseetherelativesize)1718TheCMOSTransistorCMOStransistorBasicswitchinmodernICsSilicon--notquiteaconductororinsulator:
Semiconductor2.3gatesourcedrainoxideApositivevoltagehere...(a)ICpackageIC...attractselectronshere,turningthechannelbetweenthesourceanddrainintoaconductor1819TheCMOSTransistorCMOStransistorBasicswitchinmodernICsdoesnotconduct0conducts1gatenMOSdoesnotconduct1gatepMOSconducts02.31920Moore’sLawICcapacity(容量,集成度)doublingaboutevery18monthsforseveraldecadesKnownas“Moore’sLaw”afterGordonMoore,co-founderofIntelPredicted(预言)in1965predictedthatcomponentsperICwoulddoubleroughly(粗略地,大致上)everyyearorso20Moore’sLawForaparticular(特定的)numberoftransistors,theICareashrinksbyhalfevery18monthsConsiderhowmuchshrinkingoccursinjust10years(trydrawingit)Enablesincredibly(不能相信的,难以置信的)powerfulcomputationinincrediblytinydevices21Moore’sLawToday’sICsholdbillionsoftransistorsThefirstPentiumprocessor(early1990s)neededonly3millionAnIntelPentiumprocessorIChavingmillionsoftransistors223.1LogicSignalsandGates
(逻辑信号和门电路)DigitalLogicDesignandApplication(数字逻辑设计及应用)从物理的角度考虑电路如何工作,工作中的电气特性实际物理器件不可避免的时间延迟问题从逻辑角度输入、输出的逻辑关系
三种基本逻辑:与、或、非2324BooleanLogicGates
BuildingBlocksforDigitalCircuits
(BecauseSwitchesareHardtoWorkWith)“Logicgates”arebetterdigitalcircuitbuildingblocksthanswitches(transistors)Why?...2.4Abstraction(提取)reducescomplexity!2425BooleanAlgebraanditsRelationtoDigitalCircuitsTounderstandthebenefitsof“logicgates”vs.switches,weshouldfirstunderstandBooleanalgebra“Traditional”algebraVariablesrepresentrealnumbers(x,y)Operators(运算器)operateonvariables,returnrealnumbers(2.5*x+y-3)a2526BooleanAlgebraanditsRelationtoDigitalCircuitsBooleanAlgebraVariablesrepresent0or1onlyOperatorsreturn0or1onlyBasicoperatorsAND:aANDbreturns1onlywhenbotha=1andb=1OR:aORbreturns1ifeither(orboth)a=1orb=1NOT:NOTareturnstheoppositeofa(1ifa=0,0ifa=1)a261、BasicLogicFunction:AND
(基本逻辑运算:与)000010100111ABZLogicExpression
(逻辑表达式)Z=A·BSwitch:1-on,0-off(开关:1通,0断)Lamp:1-Light,0-out(灯:1亮,0不亮)Producea1outputifandonlyifitsinputsareall1(当且仅当所有输入全为1时,输出为1)TruthTable
(真值表)&ABZABZ(逻辑符号)ABZLogicCircuitDigitalLogicDesignandApplication(数字逻辑设计及应用)272、BasicLogicFunction:OR
(基本逻辑运算:或)LogicExpression(逻辑表达式):Z=A+BABZ真值表ABZProducea1outputifanyinputis1
(只要有任何一个输入为1,输出就为1)≥1ABZABZ逻辑符号000011101111TruthTableLogicCircuitDigitalLogicDesignandApplication(数字逻辑设计及应用)28AZ0110真值表LogicExpression(逻辑表达式):Y=A=A’AZRProduceanoutputvaluethatistheoppositeofitsinputvalue.(产生一个与输入相反的输出)UsuallycalledanInverter
(通常称为反相器)1ZAAZ(逻辑符号)DigitalLogicDesignandApplication(数字逻辑设计及应用)3、BasicLogicFunction:NOT
(基本逻辑运算:非)TruthTableLogicCircuit294、NANDandNORGates(与非和或非)NAND(与非)
LogicExpression
(逻辑表达式):Z=(A·B)’
LogicCircuit(逻辑符号):NOR(或非)
LogicExpression(逻辑表达式):Z=(A+B)’
LogicCircuit
(逻辑符号):&≥1DigitalLogicDesignandApplication(数字逻辑设计及应用)30DigitalLogicDesignandApplication(数字逻辑设计及应用)TruthTable(真值表)&≥1LogicalOperation(逻辑运算)
NAND(与非)
NOR(或非)
LogicCircuit(逻辑符号)
LogicExpression(逻辑表达式)
Y=(AžB)’‘
Y=(A+B)’‘AB
0
0
1
11
Y
1
1
1
0
Y
1
0
0
0
1003132BooleanAlgebraanditsRelationtoDigitalCircuitsDevelopedmid-1800’sbyGeorgeBooletoformalize(使成正式)
humanthoughtEx:“I’llgotolunchifMarygoesORJohngoes,ANDSallydoesnotgo.”LetFrepresentmygoingtolunch(1meansIgo,0Idon’tgo)Likewise(类似地),mforMarygoing,jforJohn,andsforSallyThenF=(mORj)ANDNOT(s)3233ConvertingtoBooleanEquationsQ1.Afiresprinkler(洒水器)systemshouldspray(喷)waterifhighheatissensedandthesystemissettoenabled.Answer:LetBooleanvariablehrepresent“highheatissensed,”erepresent“enabled,”andFrepresent“sprayingwater.”
Thenanequationis:F=hANDe.a3334ConvertingtoBooleanEquationsQ2.Acaralarmshouldsoundifthealarmisenabled,andeitherthecarisshakenorthedoorisopened.Answer:Letarepresent“alarmisenabled,”srepresent“carisshaken,”drepresent“doorisopened,”andFrepresent“alarmsounds.”
Thenanequationis:F=aAND(sORd).a34RelatingBooleanAlgebratoDigitalDesignBooleanalgebra(mid-1800s)Boole’sintent:formalizehumanthoughtSwitches(1930s)Shannon(1938)DigitaldesignShowedapplicationofBooleanalgebratodesignofswitch-basedcircuitsFortelephoneswitchingandotherelectronicuses35DigitalLogicDesignandApplication(数字逻辑设计及应用)3.2LogicFamilies(逻辑系列)同一系列的芯片具有类似的输入、输出及内部电路特征,但逻辑功能不同。不同系列的芯片可能不匹配CMOS系列TTL逻辑系列36DigitalLogicDesignandApplication(数字逻辑设计及应用)3.3CMOSLogic(CMOS
逻辑)CMOSLogiclevels(COMS逻辑电平)5.0V3.5V1.5V0.0VATypicalLogicCircuit:5-VoltPowerSupply(典型的5V电源电压)OtherPower-SupplyVoltages:3.3,2.5or1.8Volts(其它电源电压:3.3V,2.5V或1.8V)Logic1(High)[逻辑1(高态)]Logic0(Low)[逻辑0(低态)]37DigitalLogicDesignandApplication(数字逻辑设计及应用)2、MOSTransistors(MOS晶体管)TwoTypes:N-ChannelandP-Channel(分为:N沟道和P沟道)Drain(漏极)Source(源极)Gate(栅极)Vgs+N-Channel(N沟道)Source(源极)Drain(漏极)Gate(栅极)
+VgsP-Channel(P沟道)38DigitalLogicDesignandApplication(数字逻辑设计及应用)2、MOSTransistors(MOS晶体管)TwoTypes:N-ChannelandP-Channel(分为:N沟道和P沟道)Source(源极)Drain(漏极)Gate(栅极)
+VgsP-Channel(P沟道)Usually(通常):
Vgs
<=0
Vgs
=0
RdsVeryHigh
Off(截止状态)
Vgs
Rds
On(导通状态)39DigitalLogicDesignandApplication(数字逻辑设计及应用)2、MOSTransistors(MOS晶体管)TheGateofaMOStransistorhasaveryhighimpedance(阻抗).[Overmegohm(106ohms)][MOS晶体管栅极阻抗非常高(>兆欧)]Regardlessofgatevoltage(无论栅电压如何)
Almostnocurrentflowsfromthegatetosource,orfromthegatetodrain.(栅-源、栅-漏之间几乎没有电流)
(Leakage(漏出)Current,Lessthanmicroampere(漏电流,
A,10-6A)TheGateisCapacitively(容性地)coupledtothesourceanddrain
(栅极与源和漏极之间有容性耦合)
Thepowerneedtochargeanddischargethiscapacitance(电容)oneachinputsignaltransitionaccountsforanontrivial(非平凡的)portionofacircuit’spowerconsumption(信号转换时,电容充放电,功耗较大).40DigitalLogicDesignandApplication(数字逻辑设计及应用)MOS管的基本开关电路vI+–vO–+iD+VDDRDDGS只要电路参数选择合理输入低,截止,输出高输入高,导通,输出低41DigitalLogicDesignandApplication(数字逻辑设计及应用)3、BasicCMOSInverterCircuit
(基本的CMOS反相器)FunctionalBehavior
(工作原理)1、VIN=0.0VVGSN=0.0V,
TnOff(截止)VGSP=VIN–VDD=–5.0V,
TpOn(导通)VOUT
VDD=5.0VVDD=+5.0VVOUTVINTpTn423、BasicCMOSInverterCircuit
(基本的CMOS反相器)2、VIN=VDD=5.0VVGSN=5.0V
TnOn(导通)VGSP=VIN–VDD=0.0V
TpOff(截止)VOUT
0VDD=+5.0VVOUTVINTpTnDigitalLogicDesignandApplication(数字逻辑设计及应用)4344NOTgatex01F1010F1x0(a)10F0x1(b)Whentheinputis0Whentheinputis10110timeFx44DigitalLogicDesignandApplication(数字逻辑设计及应用)4、CMOSNAND(CMOS与非门)
FunctionalBehavior
(工作原理):1、EitherInputLow,(A、B至少有一个为低),ThenEitherT1,T3Off(T1、T3至少有一个截止)EitherT2,T4On(T2、T4至少有一个导通)ZisHigh[Z为高
VDD)]VDD=+5.0VZABT1T2T4T3454、CMOSNANDGate(CMOS与非门)2、BothInputsHigh(A、B都为高),ThenBothT1,T3On(T1、T3都导通)BothT2,T4Off(T2,T4都截止)
ZisLow[Z为低(
0V)]VDD=+5.0VZABT1T2T4T3DigitalLogicDesignandApplication(数字逻辑设计及应用)465、CMOSNORGate(CMOS或非门)FunctionalBehavior
(工作原理):1、BothInputsLow(A、B都为低),ThenBothT1、T3Off(T1、T3都截止)BothT2,T4On(T2,T4都导通)ZisHigh[Z为高(
VDD)]VDD=+5.0VZABT1T2T4T3DigitalLogicDesignandApplication(数字逻辑设计及应用)475、CMOSNORGate(CMOS或非门)FunctionalBehavior
(工作原理):2、EitherInputHigh(A、B至少有一个为高)ThenEitherT1、T3On(T1、T3至少有一个导通)EitherT2,T4Off(T2、T4至少有一个截止)ZisLow[Z为低(0V)]VDD=+5.0VZABT1T2T4T3DigitalLogicDesignandApplication(数字逻辑设计及应用)4849BuildingCircuitsUsingGatesRecall(回想)themotion-in-darkexampleTurnonlamp(F=1)whenmotionsensed(a=1)andnolight(b=0)F=aANDNOT(b)4950BuildingCircuitsUsingGatesBuildusinglogicgates,ANDandNOT,asshownWejustbuiltourfirstdigitalcircuit!5051Example:SeatBeltWarningLightSystemDesigncircuitforwarninglightSensorss=1:seatbeltfastened(系紧)k=1:keyinsertedCaptureBooleanequationseatbeltnotfastened,andkeyinsertedw=NOT(s)ANDk5152Example:SeatBeltWarningLightSystemConvertequationtocircuitTimingdiagramillustratescircuitbehaviorWesetinputstoanyvaluesOutputsetaccordingtocircuitaatimeInputsOutputs111000kswkswBeltWarnSeatbelt5253Moreexamples:SeatbeltwarninglightextensionsOnlyilluminate(照亮)warninglightifpersonisintheseat(p=1),andseatbeltnotfastenedandkeyinsertedw=pANDNOT(s)ANDkkpswBeltWarna5354Moreexamples:SeatbeltwarninglightextensionsaGivent=1for5secondsafterkeyinserted.Turnonwarninglightwhent=1(tocheckthatwarninglightsareworking)w=(pANDNOT(s)ANDk)ORtakwpstBeltWarn546、Fan-In(扇入)TheNumberofInputsthataGatehave
(门电路所具有的输入端的数目)TheAdditive“on”ResistanceofseriestransistorslimitstheFan–InofCMOSgates.
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年住房互换合同(1篇)
- 护理干预对老年患者跌倒风险的影响分析
- 病人休息与睡眠护理的科研进展
- 2026年装修耗材购销合同(1篇)
- 2026年劳保保护用品合同(1篇)
- 2026年木地板供货合同(1篇)
- 消化系统护理与肠内营养
- 癫痫患者康复指导与护理
- 护理竞赛团队协作与沟通技巧
- 市场营销原理与实践第17版第20章某省市场营销社会责任和道德
- 2026年二级建造师之二建公路工程实务考试题库500道带答案(b卷)
- 2025年海南省公务员考试真题试卷含答案
- 基于5G技术的智能工厂监控方案
- (2026年)气管切开非机械通气患者气道护理护理团体标准解读课件
- 解除劳务合同补偿协议
- 外墙施工成品保护方案
- 白血病患者化疗期间护理要点
- 2025年贵州省公安厅招聘警务辅助人员考试真题(含答案)
- 工贸企业安全生产管理制度
- 小学生芯片知识
- 自制唇膏的教学设计课件
评论
0/150
提交评论