版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
内容主要取材于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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 专利技术许可(技术进出口)合同范本
- 合伙工程承包合同
- 个人土地买卖契约
- 人才培训交流中心交流人员自主创业协议书
- 家庭室内设计合同模板
- 教育合作方协议
- 公共设施致害赔偿协议
- 2024学校零星维修协议范本
- 私人借款协议书范例
- 离职协议书模板
- 10《我们所了解的环境污染》第一课时从白色污染说起(教学设计)部编版道德与法治四年级上册
- 广东省深圳市2023-2024学年高一上学期语文期中试卷(含答案)
- 酒店年会推广销售方案
- 2024年《高等教育心理学》教师岗前培训考试复习题库(含答案)
- 2024义务教育道德与法治课程标准(2022版)
- 第十二章-车船税
- GB/T 4706.114-2024家用和类似用途电器的安全第114部分:饮用水处理装置的特殊要求
- 第一、二单元复习课件 2024-2025学年统编版七年级历史上册
- 外包司机合同范本
- 2.2.2 脊椎动物-鱼(第1课时)课件-2024-2025学年人教版生物七年级上册
- 食品加工机械 食材净化清洗设备 编制说明
评论
0/150
提交评论