




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
内容主要取材于CS61C第1数制NumberBases(数的进制Signed(有符合vsUnsigned(无符号SignExtension(符合扩展航空航天大学计算机内容主要取材于CS61C第1数制NumberSignedvs.Sign航空航天大学计算机MainframeEra:1950s-EnablingTech:ComputersBigPlayers:“BigIron”(IBM,Cost:$1M,Target:UsingCOBOL,Fortrantimesharing(分时 Summer2012--Lecture puterEra:BigPlayers:Digital,Cost:$10k,Target:Labs&Using:C,UNIX Summer2012--Lecture PCEra:Mid1980s-MidBigPlayers:Apple,Cost:$1k,Target:Consumers Using:Basic,Java,Windows Summer2012--Lecture Post-PCEra:Late2000s-alMobileDevices(PMD):EnablingTech:Wirelessnetworking,BigPlayers:Apple,Nokia,Cost:$500,Target:ConsumersontheUsing:ObjectiveC,Android Summer2012--Lecture Post-PCEra:Late2000s-EnablingTech:LocalAreaNetworks,broadbandBigPlayers: ,Target:Transientusersoruserswhocannotaffordhigh-endequipment Summer2012--Lecture AdvancedRISCMachineinstructionsetinsideYouwilllearnhowtodesignandprogramarelatedRISCcomputer:MIPSinstructioninstructionset
YouwilllearnaboutMIPSprocessor,cache(高缓存MemoryI/Ointhis Summer2012--Lecture WhatisthiscourseItisaboutthehardware-softwareinterface(接口Whatdoestheprogrammerneedtoknowtoachievethehighestpossibleperformance(性能)?Uselow-levelprogramminglanguages(closertounderlyinghardware)Allowsustotalkaboutkeyhardwarefeaturesinhigher-leveltermsAllowsprogrammerstoharnessunderlyinghardwareparallelism(并行性)forhighperformance包括MIPSprocessor、memory、I/O Summer2012--Lecture energyefficentWhyNot80x86vs.energyefficentOncelearnone,easytopickup80x86instructionsetisnot≈FullsuitcasethenaddclothesonwaytoClasstimeprecious;whyspendonclient(PostPCera)vs.fastprocessorofdesktop(PCera)MIPSrepresentsmorepopularinstruction2010:6.1BARM,0.3B80x86(20XMachineApplication(ex:
(Mac
I/ODatapath&DigitalDigitalCircuitCircuitSixGreatIdeasComputerMoore’sPrincipleofLocality/MemoryPerformanceMeasurement&Dependabilityvialayer/layer/层次locality/局部性memory 层次measurement/度GreatIdea#1:LevelsofProgram(e.g.Program(e.g.
$t0,seyna
can
Program(e.g.MachineProgramAssemMachineProgram
$t1,anuanu101011111100011001011000
ords,colors,data,logic,(e.g.blockdiagrams)LogicCircuitDescription(CircuitSchematicDiagrams)representation/interpretation/解释schematicdiagram/原理representation/interpretation/解释schematicdiagram/原理Predicts:Predicts:Transistorperchipdoublesevery2years#of#oftransistorsonanintegratedcircuit B.S.Caltransistor/ Summer Lecture transistor/GreatIdea#3:PrincipleofLocality/MemoryHierarchydistancefromTrade-offinspeedandcostvs.capacity!virtualmemory/虚 器tradeoff/权衡(折衷GreatIdea#4: Summer2012--Lecture GreatIdea#5:MeasurementandAllowsdirectcomparisonsofarchitectures ficationofimprovementsItisallabouttimetofinishIncludesbothsetupandMatchapplicationandhardwaretoSpecialhardwarefeatures,likespecializedinstructions(e.g.matrixmanipulation)setup/建立locality/局部 Summersetup/建立locality/局部GeneAmdahlComputerPioneerPh.D.Wisconsin Summer2012--Lecture 内容主要取材于CS61C第1数制NumberSignedvs.Sign航空航天大学计算机NumberGreatIdea#1:LevelsofInsideacomputer,everythingstoredasasequenceof0’sand1’s(bits)Eventhisis HowdowerepresentnumbersinthisLet’sstartwith Summer2012--Lecture NumberKeyterminology:digit(d)andbaseValueofi-thdigitisd×Biwhereistartsat0andincreasesfromrighttoleftndigitnumberdn-1dn-2...value=dn-1Bn-1+dn-2Bn-2+...+d1B1+InbaseB,eachdigitisoneofBpossibleBaseisnotatedeitherasaprefixor Summer2012--Lecture CommonlyUsedNumber–Symbols:0,1,2,3,4,5,6,7,8,Notation:9472ten=Binary(baseSymbols:0,Notation:101011two=Symbols:0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,Notation:2A5Dhex= Summer2012--Lecture NumberBase3219472ten= + + + + + + + + +9472ten= + + +=0xA15=0b10100001 Summer2012--Lecture BitsCanRepresentndigitsinbaseBcanrepresentatmostBnEachofthendigitsisoneofBpossibleHavemorethings?AddmoreExample:Logicalvalues(1bit)–0isFalse,1isExample:26lettersrequire5bits(25=32>Example:Studentsinthisclass(?Forconvenience,cangroupintonibbles(4bits)bytes(8setup/建立locality/局部 Summersetup/建立locality/局部UnsignedRepresentnon-negative(unsigned)integersusingbase00000000000000000000000000000000two=00000000000000000000000000000001two=00000000000000000000000000000010two= 01111111111111111111111111111101two=01111111111111111111111111111110two=01111111111111111111111111111111two=10000000000000000000000000000000two=10000000000000000000000000000001two=10000000000000000000000000000010two= 11111111111111111111111111111101two=11111111111111111111111111111110two=11111111111111111111111111111111two= Summer2012--Lecture Numbersreallyhavedigits,buthardwarecanonlystoreafinitenumberofthem(fixed)UsuallyignoreleadingLeftmostismostsignificantbitRightmostisleastsignificantbitOverflowiswhentheresultofanarithmeticoperationcan’tberepresentedbythehardwarebits0b0000000001
mostsignificantbit/最高有效位overflow/arithmetic/mostsignificantbit/最高有效位overflow/arithmetic/SignedProgramsoftenneedtodealwithnegativenumbers,sohowdoweencodethese?nbitscanrepresent2ndifferentIdeally,wanttherangeevenlysplitbetweenpositiveandnegativeCanweencodetheminsuchawaythatwecanusethesamehardwareregardlessofwhetherthenumbersaresignedorunsigned? Summer2012--Lecture SignandMSBgivessign:0ispositive,1isnegative,restofbitstreatedasunsigned(magnitude)–Examples:0b10000010=-2,0b00000111=7Twozeros!0b00…0(+0)and0b10…0(-Cannotreuseunsigned Summer2012--Lecture Two’sMinormodificationofone’s–“Shift”representationofnegativenumbersdownbyonetoremoveduplicatezero10000...
00001These“shifted”by
numeralalwaysincrementstheintegerTonegate:complementthebitsandadd Summer2012--Lecture Sign
Two’s00000000000000000000000000000000two=00000000000000000000000000000001two=00000000000000000000000000000010two= 01111111111111111111111111111101two=01111111111111111111111111111110two=01111111111111111111111111111111two=10000000000000000000000000000000two=10000000000000000000000000000001two=10000000000000000000000000000010two= 11111111111111111111111111111101two=11111111111111111111111111111110two=11111111111111111111111111111111two= Summer2012--Lecture A A nn2i0)A2ii2A0(即an11A2n12ii假设[A]补由an-1an-2…a1a0表 an-10表示A为正an-11表示A为负[X]补与[-X]若[x]补则[x]x0x
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025企业员工岗前安全培训考试试题B卷附答案
- 知到智慧树网课:病理学(浙江中医药大学)章节测试满分答案
- 2025家电维修服务合同协议书
- 2025广告代理合作协议合同样本
- 2025年闭式冷却塔项目合作计划书
- 2025【个人与企业借款协议书】个人与企业借款合同模板
- 2025年植物施药保护机械项目建议书
- 2025网络科技有限公司用工合同样本
- 2025签订房屋买卖合同前需要注意的问题
- 《金融衍生品交易培训教程》课件
- 2025劳动合同范本下载打印
- 微生物检验的基础知识试题及答案
- 2025年北京市三类人员安全员c3证考试题库及答案
- (四调)武汉市2025届高中毕业生四月调研考试 地理试卷(含答案)
- 海南省海口市(2024年-2025年小学五年级语文)统编版期中考试((上下)学期)试卷及答案
- 球形网架屋面板安装专项施工方案
- 2023年昆明安宁市广播电视台(融媒体中心)招聘笔试模拟试题及答案解析
- 整形美容医院5月营销活动政策方案
- 全文《中国式现代化》PPT
- 中国华电集团公司火电厂烟气脱硫工程(石灰石石膏湿法)设计导则(a版)
- 封条模板A4直接打印版
评论
0/150
提交评论