欢迎来到天天文库
浏览记录
ID:48776482
大小:872.00 KB
页数:17页
时间:2020-01-23
《CHAPTER 4 The Components of the System 3.ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、CHAPTER4TheComponentsoftheSystemUnitDataRepresentationBinarynumbersBinarynumberissimplyanumbercomprisedofonly0'sand1's.Computersusebinarynumbersbecauseit'seasyforthemtocommunicateusingelectricalcurrent--0isoff,1ison.Youcanexpressanybase10(ournumbersystem--whereeachdigitisbetween0and9)w
2、ithbinarynumbers.Theneedtotranslatedecimalnumbertobinaryandbinarytodecimal.Therearemanywaysinrepresentingdecimalnumberinbinarynumbers.(later)2Howdoesthebinarysystemwork?ItisjustlikeanyothersystemIndecimalsystemthebaseis10Wehave10possiblevalues0-9Inbinarysystemthebaseis2Wehaveonlytwopos
3、siblevalues0or1.Thesameasinanybase,0digithasnoncontribution,where1’shascontributionwhichdependsatthereposition.3Example3040510=30000+400+5=3*104+4*102+5*100101012=10000+100+1=1*24+1*22+1*204UnsignedRepresentationRepresentspositiveintegers.Unsignedrepresentationof157:Additionissimple:10
4、01+0101=1110.position76543210Bitpattern10011101contribution27242322205FractionRepresentationTorepresentfractionweneedotherrepresentations:FixedpointrepresentationFloatingpointrepresentation.6RepresentationofnegativenumbersIsarepresentationofnegativenumberspossible?Unfortunately:youcann
5、otjuststickanegativesigninfrontofabinarynumber.(itdoesnotworklikethat)Therearethreemethodsusedtorepresentnegativenumbers.SignedmagnitudenotationExcessnotationnotationTwo’scomplementnotation7Unicode-representationASCIIcodecanrepresentonly128=27characters.ItonlyrepresentstheEnglishAlphab
6、etplussomecontrolcharacters.Unicodeisdesignedtorepresenttheworldwideinterchange.Ituses16bitsandcanrepresents32,768characters.Forcompatibility,thefirst128UnicodearethesameastheoneoftheASCII.8ColourrepresentationColourscanrepresentedusingasequenceofbits.256colours–howmanybits?Hintforcalc
7、ulatingTofigureouthowmanybitsareneededtorepresentarangeofvalues,figureoutthesmallestpowerof2thatisequaltoorbiggerthanthesizeoftherange.Thatis,findxfor2x=>25624-bitcolour–howmanypossiblecolorscanberepresented?Hints16millionpossiblecolours(why16millions?)924-bits--theTruecolour24-bitco
此文档下载收益归作者所有