數(shù)電課件數(shù)字邏輯_第1頁(yè)
數(shù)電課件數(shù)字邏輯_第2頁(yè)
數(shù)電課件數(shù)字邏輯_第3頁(yè)
數(shù)電課件數(shù)字邏輯_第4頁(yè)
數(shù)電課件數(shù)字邏輯_第5頁(yè)
已閱讀5頁(yè),還剩33頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

Chapter2

Numbersystemsandcodes

Codesindigitalsystem22.8BinaryCodesforDecimalNumber(十進(jìn)制數(shù)的二進(jìn)制編碼)BinaryCodes

Coding:istonameathingorastate.BinaryCode:isasetofn-bitbinarystringswhichareusedtorepresentdifferentthingsorstates.“編碼”是對(duì)一個(gè)事件或狀態(tài)“命名”.“二進(jìn)制編碼”就是用二進(jìn)制串對(duì)事件或狀態(tài)命名.CodeWord:isaparticularcombinationofnbit-values.“碼字”是指有確切含義的特定的n位組合.2.8BinaryCodesforDecimalNumber(十進(jìn)制數(shù)的二進(jìn)制編碼)

n-bitbinarycodescanrepresentatmost2n

thingsorstates.TorepresentNstates,atleast㏒2Nbitsareneeded.Ceilingfunction(上限函數(shù))BinaryCodes4Torepresenttendigits(0~9),atleast

bitsareneeded.BinaryCodesforDecimalNumberSomeofthecommondecimalcodes:(Table2-9)BCD(8421)2421Excess-3(余3碼)Biquinary(二五混合碼)1-out-of-10(10中取1碼)2.8BinaryCodesforDecimalNumber(十進(jìn)制數(shù)的二進(jìn)制編碼)5BinaryCodesforDecimalNumberBCD(binary-codeddecimal)47.9610=()8421BCD

01000111.100101102.8BinaryCodesforDecimalNumber(十進(jìn)制數(shù)的二進(jìn)制編碼)---encodes0~9bytheir4-bitbinaryrepresentation---weighted(加權(quán)碼)---Ithas10validcodewordsand6invalidcodewords.

6BCD(binary-codeddecimal)

BCDaddition:similartoadding4-bitunsignedbinarynumbers.Ifaresultexceeds1001,itmustbecorrectedbyadding6.4+)590100+)010110019+)5141001+)01011110+)0110101009+)8171001+)100010001+)011010111BinaryCodesforDecimalNumber2.8BinaryCodesforDecimalNumber(十進(jìn)制數(shù)的二進(jìn)制編碼)72421(binary-codeddecimal)

BinaryCodesforDecimalNumber2.8BinaryCodesforDecimalNumber(十進(jìn)制數(shù)的二進(jìn)制編碼)plementin

自反碼:各位取反,正好是十進(jìn)制對(duì)9的自補(bǔ)碼。---weighted(加權(quán)碼)---Ithas10validcodesand6invalidcodes.8Excess-3(binary-codeddecimal)

BinaryCodesforDecimalNumber2.8BinaryCodesforDecimalNumber(十進(jìn)制數(shù)的二進(jìn)制編碼)---余3碼---Itsdigitisnotweighted;plementing;---8421code+“0011”.Examples:useBinarycodesfordecimalnumberA=19468421code:A=00011001010001102421code:A=0001111101001100Excess-3code:A=0100110001111001

Binarycodesfordecimaldigits

---十進(jìn)制數(shù)的二進(jìn)制編碼Binarycodesfordecimaldigits

---十進(jìn)制數(shù)的二進(jìn)制編碼11Biquinary(binary-codeddecimal)

BinaryCodesforDecimalNumber2.8BinaryCodesforDecimalNumber(十進(jìn)制數(shù)的二進(jìn)制編碼)---二五混合碼

---7-bits;twohotcode;5bitsisonehotcode---Error-detectingproperty!

121-out-of-10

(binary-codeddecimal)

BinaryCodesforDecimalNumber2.8BinaryCodesforDecimalNumber(十進(jìn)制數(shù)的二進(jìn)制編碼)---10中取1碼

---Onehotcode:Onlyonelineishot!Codesincontrolsystems數(shù)碼管工作原理15Otherdecimalcodes

2.8BinaryCodesforDecimalNumber(十進(jìn)制數(shù)的二進(jìn)制編碼)ASCIIcodes128Keyboardsigns,7-bitHowareyou!100100011011111110111010000011000011110010110010101000001111001110111111101010100001ASCIIcodes182810=()8421=()2421=()excess-3=()biquinary=()1-out-of-1000101000001011100101101101001001001000

Payattentiontothedifferencebetweenbinarycodesandbinarynumbers:2810=(00101000)8421=(11100)2BinaryCodesforDecimalNumber2.8BinaryCodesforDecimalNumber(十進(jìn)制數(shù)的二進(jìn)制編碼)Codesforlowpowerdesign

Whenbinarycodedatachanged,transitionstatesmaybehappened

:0111—10000111—0011—0001—0000---10000111—1111---1011---1010---1000

Transitionstatesmaycauselargepowerconsumptionanddataerror202.9Graycode(葛萊碼)——

一種可靠性編碼Characteristic:Onlyonebitchangesbetweeneachpairofsuccessivecodewords.012345670000010100111001011101110000010110101101111011003-bitbinarycodeandGraycodeBinaryCodeGrayCodeDecimalNumber21Characteristic:Onlyonebitchangesbetweeneachpairofsuccessivecodewords.Mechanicalencodingdisk2.9Graycode(葛萊碼)——

一種可靠性編碼22HowtoconstructaGraycode?2.9Graycode(葛萊碼)——

一種可靠性編碼Method:FrombinarynumbertoGraycodeThewidthissame;TheMSBissame;Compareeachbitwithitsleftone:Samebecodeto0;Differbecodeto1.Examples:

binarynumber:1001001001100011Graycodes:1101101101010010Graycodes24

Examples(Graycode):

1-bit012-bit000111103-bit0000010110101101111011004-bit0000000100110010011001110101010011001101…HowtoconstructaGraycode?2.9Graycode(葛萊碼)——

一種可靠性編碼25Binary

BnBn-1···Bi+1Bi···B1B0 Gray

GnGn-1···Gi+1Gi···G1G0

Gn=Bn,Gi=Bi+1⊕Bi

Example.

(0101)2

(0111)GrayBinary-to-GrayCode26

Gray

GnGn-1···Gi···G1G0

Binary

BnBn-1···Bi+1Bi···B1B0

Bn=Gn,Bi=Bi+1⊕GiExample. (01 0 1)Gray

(01 1 0)2Gray-to-BinaryCode27Example. (100010101001)Excess-3=( )Gray

(1000

1010

1001)

Excess-3

(576)10

(1001000000)2

(1101100000)Gray

28Example. (10000111.11)2=( )BCD (10000111.11)2(135.75)10

(000100110101.01110101)BCDExample.

(21)10=()Gray=()Excess-3

(21)10=(10101)2=(11111)Gray

(21)10=(01010100)Excess-3

Parallelwayusen-linetotransmitann-bitscodewords;transmitann-bitscodewordsinonetimeperiod;Codestransmitwayindigitalcircuit29ComputerPrinter10110010t0t1Serialway

useonelinetotransmitann-bitscodewords;transmitann-bitscodewordsinntimeperiod;CodestransmitwayindigitalcircuitComputer10110010t0t1t2t3t4t5t6t7ModemSummaryofChap.2ConversionofnumbersystemsRepresentationofnegativenumbers

s-m、two’scomplement、one’scomplementAdditionoftwo’scomplementcomplementbits+1(subtraction)、overflowBinarycodesofdecimalnumbers

BCDcode、2421code、excess-3codeGraycode32Homework2.332.35Supplementary:

WritetheGraycodesforthefollowingbinarycodes.

(1)1001(2)1101000111Chap2Homework(P74~78)2.1(a)(d)(e)(i)(j)2.2(e)(f),2.3(e)2.5(e)(i)(j)2.6(a)(b)(h)Supplementary: 1.2510=?2,

105.20710=?2(errorε<0.05

)2.7(b)(d),2.8(b)(d)2.11,2.12,2.252.33,2.35Supplementary:WritetheGraycodesforthefollowingbinarycodes.(1)1001(2)110100011134Chapter3DigitalCircuitsTheelectricalaspectsofdigitalcircuits

(數(shù)字電路中的電氣知識(shí))353.1LogicSignalsandGates(邏輯信號(hào)與門電路)BasiclogicgatesORgateTruthtable(真值表)000010100111ABZZ=A·BANDgateNOTgateZ=A+BZ=A’000011101111ABZAZ011

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝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ù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 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ì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論