计算机中的二进制表达课件_第1页
计算机中的二进制表达课件_第2页
计算机中的二进制表达课件_第3页
计算机中的二进制表达课件_第4页
计算机中的二进制表达课件_第5页
已阅读5页,还剩19页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

计算机中的二进制表达ExampleRepresentationRealWorldTobe,ornottobe:thatisthequestion:Whether'tisnoblerinthemindtosufferTheslingsandarrowsofoutrageousfortune,Ortotakearmsagainstaseaoftroubles,Andbyopposingendthem?Todie:tosleep;Nomore;andbyasleeptosayweendTheheart-acheandthethousandnaturalshocksThatfleshisheirto,'tisaconsummationDevoutlytobewish'd.--WilliamShakespeare-(fromHamletAct3,Scene1)ComputerWorld101010001101111100000011000101010100011011001100110011000101110111011111100010101011010100010110111011000101010110001011011101001000100010101010111010101011011010010111101010001101111100000011000101010100011011001100110011000101110111011111100010101011010100010110111011000101010110001011011101001000100010101010111010101011011010010111101010001101111100000011000101010100011011001100110011000101110111011111100010101011010100010110111011000101010110001011011101001000100010101010111010101011011010010111…InternalandExternalRepresentationofDataRealWorldIntegers:34SignedIntegers:

-156DecimalNumbers:

-23.431Text:HelloMusic:HeyJudePictures:ComputerWorldZerosandOnes:

110101IntegerRepresentationWeuseabase10numbersystem(Decimal)

0,1,2,3,4,5,6,7,8,92,359

tenshundredsthousandsones100101102103Computersuseabase2numbersystem(Binary)

0,1

110101

202122232425ConversionfromBinarytoDecimal1x25+1x24+0x23+1x22+0x21+1x20=53YouTryit:Whatarethefollowingbinarynumbersindecimal?11011101100110111

110101

202122232425ConversionfromDecimaltoBinaryPerformrepeateddivisionsby2Keeptrackoftheremainders19/2 quotient=9 remainder=19/2 quotient=4 remainder=14/2 quotient=2 remainder=02/2 quotient=1 remainder=01/2 quotient=0 remainder=1Stopwhenthequotientis0Decimalnumber19inbinaryis10011YouTryitConvertthefollowingdecimalnumberstobinary123153AdditiononBinary0+0=01+0=10+1=11+1=10(carrythe1) 1101 11010

+1001

+10011FixedSizesforNumbersOncomputersafixednumberofdigitsaretypicallyusedtostoreanumber

(8,16,32,or64bitsarecommon)Thedecimalnumber3inbinaryis11,butusingafixedsizeof8bitsitwouldberepresentedas00000011Tryaddingthebinarynumbersusingafixedsizeof8bits: 11011001

+10001011InternalandExternalRepresentationofDataRealWorldIntegers:34SignedIntegers:

-156DecimalNumbers:

-23.431Text:HelloMusic:HeyJudePictures:√SignedIntegers-134Sign/MagnitudeNotation110000110magnitudeSign0=positive1=negativeNotfrequentlyusedoncomputers2numbersforzeroNoteasytoadd/subtractSignedIntegers-134Two’sComplementNotation(forfixedsizewindow16)Calculatethemagnitudeinbinary

0000000010000110Flipthebits

1111111101111001Addone

1111111101111010YouTryit -129 -151InternalandExternalRepresentationofDataRealWorldIntegers:34SignedIntegers:

-156DecimalNumbers:

-23.431Text:HelloMusic:HeyJudePictures:√√DecimalNumbers5.75Writethe5inbinaryandthe0.75inbinary5 –1010.75 –0.11Normalizethenumber,keepingtrackofMantissaandExponent: ±MxB±E

M–Mantissa B–Base(weusebase2) E–ExponentUsedfixedsizewindow(16bits) Firstbitissign Next9bitsareMantissa Nextbitissign Last5bitsareExponentYouTryIt:-8.25 11.5TextFixedSizeWindowrepresentsacharacterASCII(8bits) pg141intextUnicode(16bits) represents65,636 charactersBinaryRepresentationofSoundandImagesMultimediadataissampledtostoreadigitalformwithorwithoutdetectabledifferencesRepresentingsounddataSounddatamustbedigitizedforstorageinacomputerDigitizingmeansperiodicsamplingofamplitudevaluesBinaryRepresentationofSoundandImages(continued)Fromsamples,originalsoundcanbeapproximatedToimprovetheapproximationSamplemorefrequentlyUsemorebitsforeachsamplevalueFigure4.5DigitizationofanAnalogSignal(a)SamplingtheOriginalSignal(b)RecreatingtheSignalfromtheSampledValuesRepresentingimagedataImagesaresampledbyreadingcolorandintensityvaluesatevenintervalsacrosstheimageEachsampledpointisapixelImagequalitydependsonnumberofbitsateachpixelBinaryRepresentationofSoundandImages(continued)PicturesForeachpixelkeeptrackof:RGBvalues0-255(8-bit)WhyBinaryRepresentationElectronicdevicesaremostreliableinabistableenvironmentBistableenvironmentDistinguishingonlytwoelectronicstatesCurrentflowingornotDirectionofflowComputersarebistable:binaryrepresentationsMagneticcoreHistoricdeviceforcomputermemoryTinymagnetizedrings;flowofcurrentsetsthedirectionofmagneticfieldBinaryvalues0and1arerepresentedusingthedirectionofthemagneticfieldBinaryStorageDevicesFigure4.9U

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论