number systems - university of st thomas数字系统-圣汤姆斯大学

number systems - university of st thomas数字系统-圣汤姆斯大学

ID:33975052

大小:76.80 KB

页数:16页

时间:2019-03-03

number systems - university of st thomas数字系统-圣汤姆斯大学_第1页
number systems - university of st thomas数字系统-圣汤姆斯大学_第2页
number systems - university of st thomas数字系统-圣汤姆斯大学_第3页
number systems - university of st thomas数字系统-圣汤姆斯大学_第4页
number systems - university of st thomas数字系统-圣汤姆斯大学_第5页
资源描述:

《number systems - university of st thomas数字系统-圣汤姆斯大学》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库

1、NumberSystemsPositionalnumbersystemsWholenumbersFractionsAccuracyCopyright1993-95,ThomasP.SturmFundamentalsofComputerScience16NumberSystemsConceptofaPositionalNumberSystemWhatdoes4,752(base10)represent(inbase10)?4x100040004x103+7x1007007x102+5x10505x101+2x122x100

2、Sowhatdoes1011(base2)represent(inbase10)?1x881x230x400x221x221x211x111x20Whilethismakesanicedefinition,itisfartoomuchworkfor"practical"use-binarynumbersgettobelongFundamentalsofComputerScience16NumberSystemsCountingRevisitedDecimalBinaryOctalHexadecimal0000111121

3、02231133410044510155611066711177810001089100111910101012A11101113B12110014C13110115D14111016E15111117F161000020101710001211118100102212191001123132010100241421101012515221011026162310111271724110003018251100131192611010321A2711011331B2811100341C2911101351D3011110

4、361E3111111371F321000004020FundamentalsofComputerScience16NumberSystemsFasterConversionofBinarytoDecimalDibble-Dabble,Horner'sMethod,Algorithm1.11.Startattheleft,startwith02.Addinleadingdigit3.Ifthere'sanotherdigit,multiplytotalby2,addinnextdigit,repeatthisstepun

5、tilyoureachtheradix(binary)point.Ex:11010(binary)convertedtobase10is:0+11x22+13x26+06x212+113x226+026FundamentalsofComputerScience16NumberSystemsEvenFasterinYourHeadEx:11010010110(binary)convertedtobase10is:(inyourhead1,3,6,13,26,52,105,210,421,843,1686)Whichhasj

6、ustgottobealotquickerthan1024+512+128+16+4+2(notevencountingthetimeittakestogeneratethepowersof2)FundamentalsofComputerScience16NumberSystemsFastDecimaltoBinaryConversion(Dibble-Dabble,Horner'sMethod,Algorithm1.2)Sinceallevennumbersendin0(binary),andalloddnumbers

7、endin1(binary),andsincedivisionby2yieldsa0remainderforevennumbersanda1remainderforoddnumbers,theremainderafterdivisionby2givesyoutheLSB(leastsignificantbit)ofthecorrespondingbinarynumber.Justrepeatthisprocessuntilyougeta0quotientEx:Convert75(decimal)tobinary2

8、752

9、

10、37+12

11、18+12

12、9+02

13、4+12

14、2+02

15、1+00+1Now,thetricktoremember,theLSBisONTOP,soreadtheanswerfromthebottomup:75(decimal)=1001011(binary)FundamentalsofComputerScience1

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。