![數(shù)字邏輯設(shè)計(jì)及應(yīng)用課件_第1頁(yè)](http://file4.renrendoc.com/view/118b26736fc5fa49a1e743d320804fad/118b26736fc5fa49a1e743d320804fad1.gif)
![數(shù)字邏輯設(shè)計(jì)及應(yīng)用課件_第2頁(yè)](http://file4.renrendoc.com/view/118b26736fc5fa49a1e743d320804fad/118b26736fc5fa49a1e743d320804fad2.gif)
![數(shù)字邏輯設(shè)計(jì)及應(yīng)用課件_第3頁(yè)](http://file4.renrendoc.com/view/118b26736fc5fa49a1e743d320804fad/118b26736fc5fa49a1e743d320804fad3.gif)
![數(shù)字邏輯設(shè)計(jì)及應(yīng)用課件_第4頁(yè)](http://file4.renrendoc.com/view/118b26736fc5fa49a1e743d320804fad/118b26736fc5fa49a1e743d320804fad4.gif)
![數(shù)字邏輯設(shè)計(jì)及應(yīng)用課件_第5頁(yè)](http://file4.renrendoc.com/view/118b26736fc5fa49a1e743d320804fad/118b26736fc5fa49a1e743d320804fad5.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
Chapter2NumberSystemsandcodes(數(shù)系與編碼)NumericData-NumberSystemsandtheirConversions
(數(shù)值信息——數(shù)制及其轉(zhuǎn)換)
NonnumericData-Codes
(非數(shù)值信息——編碼)DigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)1Chapter2NumberSystemsandReviewofChapter2(第二章內(nèi)容回顧)Binary,Octal,andHexadecimalNumbers(二進(jìn)制、八進(jìn)制、十六進(jìn)制)PositionalNumberSystem(按位計(jì)數(shù)制)DigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)2ReviewofChapter2(第二章內(nèi)容回顧)BReviewofChapter2(第二章內(nèi)容回顧)GeneralPositional-Number-SystemConversion(常用按位計(jì)數(shù)制的轉(zhuǎn)換)ANumberinanyRadixtoRadix10:Expandingtheformulausingradix-10arithmetic(任意進(jìn)制數(shù)
十進(jìn)制數(shù):利用位權(quán)展開)DigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)3ReviewofChapter2(第二章內(nèi)容回顧)GReviewofChapter2(第二章內(nèi)容回顧)GeneralPositional-Number-SystemConversion(常用按位計(jì)數(shù)制的轉(zhuǎn)換)ANumberinRadix10toanyRadix:RadixMultiplicationorDivision(十進(jìn)制
其它進(jìn)制:基數(shù)乘除法)Note:DecimalFractionPartsConversion[注意:小數(shù)部分的轉(zhuǎn)換(誤差)]DigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)4ReviewofChapter2(第二章內(nèi)容回顧)GReviewofChapter2(第二章內(nèi)容回顧)AdditionandSubtractionofNondecimalNumbers(非十進(jìn)制的加法和減法)(Table2-3)
進(jìn)位輸入Cin、進(jìn)位輸出Cout、本位和S
借位輸入Bin、借位輸出Bout、本位差DDigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)5ReviewofChapter2(第二章內(nèi)容回顧)AReviewofChapter2(第二章內(nèi)容回顧)RepresentationofNegativeNumbers
(負(fù)數(shù)的表示)Signed-Magnitude[符號(hào)-數(shù)值(原碼)]ComplementNumberSystems(補(bǔ)碼數(shù)制)Radix–Complement(基數(shù)補(bǔ)碼)DiminishedRadix–Complement[基數(shù)減1補(bǔ)碼(基數(shù)反碼)]DigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)6ReviewofChapter2(第二章內(nèi)容回顧)RReviewofChapter2(第二章內(nèi)容回顧)BinarySigned-Magnitude,Ones’–Complement,andTwo’s–ComplementRepresentation
(二進(jìn)制的原碼、反碼、補(bǔ)碼)正數(shù)的原碼、反碼、補(bǔ)碼表示相同負(fù)數(shù)的原碼表示:符號(hào)位為1負(fù)數(shù)的反碼表示:符號(hào)位不變,其余在原碼基礎(chǔ)上按位取反在|D|的原碼基礎(chǔ)上按位取反(包括符號(hào)位)負(fù)數(shù)的補(bǔ)碼表示:反碼+1DigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)7ReviewofChapter2(第二章內(nèi)容回顧)B2.5.4Two’s–ComplementRepresentation
(二進(jìn)制補(bǔ)碼表示法)Ann-bitTwo’s-Complementrangeis(n位二進(jìn)制補(bǔ)碼表示范圍):
–2n-1~+(2n-1–1)
OnlyonerepresentationsofZero(零只有一種表示)ObtainaTwo’s-Complement(二進(jìn)制補(bǔ)碼的求取):
Ones’–Complement(反碼)+1(為什么??)ExpandingtheSignBit(符號(hào)位擴(kuò)展)DigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)82.5.4Two’s–ComplementRepr2.5RepresentationofNegativeNumbers(負(fù)數(shù)的表示)Example2.5.2:Writethe8-bitsigned-magnitude,two’s-complementforeachofthesebinarynumbers.(分別寫出下面二進(jìn)制數(shù)的8位符號(hào)–數(shù)值碼、補(bǔ)碼)(–1101)2(–0.1101)2DigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)92.5RepresentationofNegati2.5RepresentationofNegativeNumbers(負(fù)數(shù)的表示)DigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)
1、(–1101)22、(–0.1101)21、5位二進(jìn)制表示:原碼反碼補(bǔ)碼1110110010100112、8位二進(jìn)制表示:原碼反碼補(bǔ)碼100011011111001011110011[[D]反]反=D[[D]補(bǔ)]補(bǔ)=D102.5RepresentationofNegati2.6Two’s–ComplementAdditionandSubtraction(二進(jìn)制補(bǔ)碼的加法和減法)AdditionRules:Addedbyordinarybinaryaddition(加法:按普通二進(jìn)制加法相加)P.39SubtractionRules:Takingitstwo’scomplement,thenadd(減法:將減數(shù)求補(bǔ),再相加)DigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)112.6Two’s–ComplementAdditi2.6Two’s–ComplementAdditionandSubtraction(二進(jìn)制補(bǔ)碼的加法和減法)DigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)
+20010-31101
+
+5
+
0101
+
-5
+
1011
+70111-811000
+70111+10001
+
-4
+
1100
+
-6
+
1010
+310011-51011122.6Two’s–ComplementAdditi13Adder/SubtractorExample:CalculatorPreviouscalculatorusedseparateadderandsubtractorDIPswitches108-bitregisterCALCLEDsefclkld88800888882x10110wiciAABBSScowo8-bitadder8-bitsubtractor1313Adder/SubtractorExample:Ca14Adder/SubtractorExample:CalculatorImprovebyusingadder/subtractor,andtwo’scomplementnumbersDIPswitches108-bitregister8-bitadder/subtractorsubCALCLEDseSABfclkld1088881414Adder/SubtractorExample:Ca2.6Two’s–ComplementAdditionandSubtraction(二進(jìn)制補(bǔ)碼的加法和減法)Overflow(溢出)如果加法運(yùn)算產(chǎn)生的和超出了數(shù)制表示的范圍,則結(jié)果發(fā)生了溢出(Overflow)。
對(duì)于二進(jìn)制補(bǔ)碼,加數(shù)的符號(hào)相同,和的符號(hào)與加數(shù)的符號(hào)不同。(或者,Cin
與Cout不同)P.41對(duì)于無符號(hào)二進(jìn)制數(shù),若最高有效位上發(fā)生進(jìn)位或借位,就指示結(jié)果超出范圍。
-51011+70111
+
-6
+
1010
+
+3
+
0011
-1110101=
+5+101010=
-6
DigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)152.6Two’s–ComplementAdditi16OverflowSometimesresultcan’tberepresentedwithgivennumberofbitsEithertoolargemagnitudeofpositiveornegativeEx.4-bittwo’scomplementadditionof0111+0001(7+1=8).But4-bittwo’scomplementcan’trepresentnumber>70111+0001=1000WRONGanswer,1000intwo’scomplementis-8,not+8Adder/subtractorshouldindicatewhenoverflowhasoccurred,soresultcanbediscarded1616OverflowSometimesresultcan17DetectingOverflow:Method1Fortwo’scomplementnumbers,overflowoccurswhenthetwonumbers’signbitsarethesamebutdifferfromtheresult’ssignbitIfthetwonumbers’signbitsareinitiallydifferent,overflowisimpossibleAddingpositiveandnegativecan’texceedlargestmagnitudepositiveornegative01111000+0001signbitsoverflow(a)11110111+0100overflow(b)10001111+1011nooverflow(c)Ifthenumbers’signbitshavethesamevalue,whichdiffersfromtheresult’ssignbit,overflowhasoccurred.1717DetectingOverflow:Method118DetectingOverflow:Method2Evensimplermethod:Detectdifferencebetweencarry-intosignbitandcarry-outfromsignbit01111111001000+0001overflow(a)11100010111+0100overflow(b)10000001111+1011nooverflow(c)Ifthecarryintothesignbitcolumndiffersfromthecarryoutofthatcolumn,overflowhasoccurred.1818DetectingOverflow:Method22.10BinaryCodesforDecimalNumbers
(十進(jìn)制數(shù)的二進(jìn)制編碼)DigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)Asetofn-bitstringsinwhichdifferentbitstringsRepresentdifferentnumbersorotherthings.
(用于表示不同數(shù)或其它事件的一組n位二進(jìn)制碼的集合)192.10BinaryCodesforDecima2.10BinaryCodesforDecimalNumbers
(十進(jìn)制數(shù)的二進(jìn)制編碼)Howtorepresenta1-bitDecimalnumberwitha4-bitBinarycode(如何用4位二進(jìn)制碼表示1位十進(jìn)制碼)?——BinaryCodedDecimal(BCD碼)DigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)202.10BinaryCodesforDecimal2.10BinaryCodesforDecimalNumbers
(十進(jìn)制數(shù)的二進(jìn)制編碼)HowtorepresentaNegativeBCDnumber(負(fù)的BCD數(shù)如何表示)?Signed-MagnitudeRepresentation:Encodingofthesignbitisarbitrary(符號(hào)-數(shù)值表示:符號(hào)位的編碼任意)10’s-complement:0000indicatesplus,1001indicatesminus.(十進(jìn)制補(bǔ)碼表示:0000正,1001負(fù))AdditionofBCDDigits(BCD數(shù)的加法)P.50DigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)212.10BinaryCodesforDecimalDigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)22DigitalLogicDesignandAppli2.10BinaryCodesforDecimalNumbers
(十進(jìn)制數(shù)的二進(jìn)制編碼)(Table2-9)DigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)BCDCode2421CodeExcess-3(余3碼)BiquinaryCode(二五混合碼)1-out-of-10(10中取1碼)
WeightedCode(加權(quán)碼)Self-ComplementCode自反碼232.10BinaryCodesforDecimaDigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)24DigitalLogicDesignandAppli8421codeNaturalcode,justlike4-bitbinarynumbers;Eachdigitisweighted;Ithas10validcodewordsand6invalidcodewords.BCDcodes258421codeBCDcodes25Eachdigitisweighted;Self-complementing;UseMSBtoexpresshigher/lowerpart;Ithas10validcodesand6invalidcodes.2421codesBCDcodes26Eachdigitisweighted;2421coBCDcodesExcess-3codeItsdigitisnotweighted;8421code+“0011”;Self-complementing.27BCDcodesExcess-3codeItsdigiExamples:useBCDcodefordecimalnumbersA=19468421code:A=00011001010001102421code:A=0001111101001100Excess-3code:A=0100110001111001BCDcodes28Examples:BCDcodes281-out-of-10codeOnehotcode:Itisveryusefulincontrolsystems.Onehotcodes291-out-of-10codeOnehotcode:OTwohotcodesBiquinarycode
7-bits;twohotcode;First2bitsisonehotcodeforhigher/lowerrange;Last5bitsisonehotcodeintherange.Error-detectingproperty!
30TwohotcodesBiquinarycode30Fromonecodetoitsneighbor,onlyonebitchanged,notransitionstate.Temperaturecode31Fromonecodetoitsneighbor,2.11Graycode(格雷碼)DigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)322.11Graycode(格雷碼)DigitalLo2.11Graycode(格雷碼)DigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)特點(diǎn):任意相鄰碼字間只有一位數(shù)位變化最高位的0和1只改變一次最大數(shù)回到0也只有一位碼元不同332.11Graycode(格雷碼)DigitalLo2.11Graycode(格雷碼)DigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)構(gòu)造方法直接構(gòu)造
Thebitsofann-bitbinarycordwordarenumberedfromrighttoleft,from0ton-1.[對(duì)n
位二進(jìn)制的碼字從右到左編號(hào)(0~n-1)]BitiofaGray-codecodewordis0ifbitsiandi+1ofthecorrespondingbinarycodewordarethesame,elsebitiis1.(若二進(jìn)制碼字的第i位和第i+1位相同,則對(duì)應(yīng)的格雷碼碼字的第i
位為0,否則為1。)ReflectedCode(反射碼)342.11Graycode(格雷碼)DigitalLoGraycodesTarget:codeforcontinueschangednumbers(inbinarysystem)topreventwrongcodehappenedintransitiontime;Property:Ineachpairofsuccessivecodewords,onlyonebitchanges.35GraycodesTarget:codeforconGraycodesFrombinarynumbertoGraycodeThewidthissame,theMSBissame;Fromlefttoright,ifabitinbinarynumberissameasitsleftbit,thegraycodeis0,ifitisdifferent,thegraycodeis1.Examples:binarynumber:1001001001100011Graycodes:110110110101001036GraycodesFrombinarynumbertError-detectingcodeInformationword+checkingbit37Error-detectingcodeInformatioDigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)2.12CharacterCodes(字符編碼)
ASCII碼(P36表2-11)
ASCIIcode:128Keyboardsigns,7-bitUsedforkeyboardordisplaydevice38DigitalLogicDesignandAppliDigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)2.13CodesforActions,Conditions,andStates(動(dòng)作、條件和狀態(tài)的編碼)
使用b位二進(jìn)制編碼來表示n個(gè)不同狀態(tài)Word:adigitalstringtorepresentanobject
Usenbits,wecanmake2ndifferentwords;Tomakenwords,youmustusebits.39DigitalLogicDesignandAppliDigitalLogicDesignandApplication(數(shù)字邏輯設(shè)計(jì)及應(yīng)用)2.16CodesforSerialDataTransmissionandStorage(用于串行數(shù)據(jù)傳輸與存儲(chǔ)的編碼)Parallelway
usen-linetotransmitann-bitscodewords;
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 現(xiàn)代家居裝飾風(fēng)格與心理健康關(guān)系探討
- 構(gòu)建以服務(wù)功能為導(dǎo)向的綠色生態(tài)環(huán)境教育體系
- 生物醫(yī)藥與健康產(chǎn)業(yè)的投資潛力研究
- 現(xiàn)代化技術(shù)與醫(yī)療中心的高層建筑設(shè)計(jì)思考
- 生態(tài)城市建設(shè)中環(huán)境科學(xué)的應(yīng)用研究
- Unit 5 We're family Period 3 (說課稿)-2024-2025學(xué)年外研版(三起)(2024)英語三年級(jí)上冊(cè)
- 2024-2025學(xué)年高中生物 第四部分 淺嘗現(xiàn)代生物技術(shù)說課稿 浙科版選修1
- 2024-2025學(xué)年高中物理 第四章 電磁感應(yīng) 5 電磁感應(yīng)現(xiàn)象的兩類情況(1)說課稿 新人教版選修3-2
- 9古代科技 耀我中華-獨(dú)領(lǐng)風(fēng)騷的古代技術(shù)創(chuàng)造(說課稿)2023-2024學(xué)年統(tǒng)編版道德與法治五年級(jí)上冊(cè)
- 26 手術(shù)臺(tái)就是陣地 說課稿-2024-2025學(xué)年統(tǒng)編版語文三年級(jí)上冊(cè)001
- 2025版茅臺(tái)酒出口業(yè)務(wù)代理及銷售合同模板4篇
- 2025年N1叉車司機(jī)考試試題(附答案)
- 《醫(yī)院財(cái)務(wù)分析報(bào)告》課件
- 2024年考研政治試題及答案
- 2024-2025學(xué)年人教版數(shù)學(xué)六年級(jí)上冊(cè) 期末綜合卷(含答案)
- 天津市部分區(qū)2023-2024學(xué)年高二上學(xué)期期末考試 物理 含解析
- 2025年初級(jí)社會(huì)工作者綜合能力全國(guó)考試題庫(kù)(含答案)
- 2024年濰坊護(hù)理職業(yè)學(xué)院?jiǎn)握新殬I(yè)適應(yīng)性測(cè)試題庫(kù)附答案
- 《鉗工基本知識(shí)》課件
- 第八期:風(fēng)電典型事故案例剖析(二)
- DB63T 2357-2024 ?;烦簝?chǔ)罐安全管理規(guī)范
評(píng)論
0/150
提交評(píng)論