




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
內(nèi)容主要取材于CS61C第1數(shù)制NumberBases(數(shù)的進(jìn)制Signed(有符合vsUnsigned(無符號(hào)SignExtension(符合擴(kuò)展航空航天大學(xué)計(jì)算機(jī)內(nèi)容主要取材于CS61C第1數(shù)制NumberSignedvs.Sign航空航天大學(xué)計(jì)算機(jī)MainframeEra:1950s-EnablingTech:ComputersBigPlayers:“BigIron”(IBM,Cost:$1M,Target:UsingCOBOL,Fortrantimesharing(分時(shí) 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/權(quán)衡(折衷GreatIdea#4: Summer2012--Lecture GreatIdea#5:MeasurementandAllowsdirectcomparisonsofarchitectures ficationofimprovementsItisallabouttimetofinishIncludesbothsetupandMatchapplicationandhardwaretoSpecialhardwarefeatures,likespecializedinstructions(e.g.matrixmanipulation)setup/建立locality/局部 Summersetup/建立locality/局部GeneAmdahlComputerPioneerPh.D.Wisconsin Summer2012--Lecture 內(nèi)容主要取材于CS61C第1數(shù)制NumberSignedvs.Sign航空航天大學(xué)計(jì)算機(jī)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假設(shè)[A]補(bǔ)由an-1an-2…a1a0表 an-10表示A為正an-11表示A為負(fù)[X]補(bǔ)與[-X]若[x]補(bǔ)則[x]x0x
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 企業(yè)設(shè)備購(gòu)買合同范本
- 代持股轉(zhuǎn)讓合同范例
- 買農(nóng)村房子合同范例
- 信托基金購(gòu)買合同范例
- 修理員聘用合同范例
- 代購(gòu)代加工合同范本
- 臨時(shí)借車合同范例
- 《格薩爾》史詩(shī)中的古代法律文化研究
- 冰箱購(gòu)貨合同范例
- 電地暖項(xiàng)目施工方案
- 農(nóng)業(yè)大數(shù)據(jù)分析
- 專題10 浮力(3大模塊知識(shí)清單+5個(gè)易混易錯(cuò)+3種方法技巧+典例真題解析)
- 醫(yī)藥招商銷售技巧培訓(xùn)
- 國(guó)家公務(wù)員考試(面試)試題及解答參考(2024年)
- 智慧食堂管理系統(tǒng)建設(shè)方案
- 2024年大學(xué)生參加學(xué)法普法知識(shí)競(jìng)賽考試題庫(kù)及答案
- 2023年醫(yī)院二甲復(fù)審核心制度理論考核試題
- 老年科護(hù)士進(jìn)修匯報(bào)
- 2024-2025學(xué)年初中音樂九年級(jí)下冊(cè)滬教版教學(xué)設(shè)計(jì)合集
- 鋼筆的修理 課件
評(píng)論
0/150
提交評(píng)論