版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
內(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)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 數(shù)據(jù)庫巡檢報(bào)告
- 2025年汝州職業(yè)技術(shù)學(xué)院高職單招職業(yè)技能測試近5年常考版參考題庫含答案解析
- 2025年朔州陶瓷職業(yè)技術(shù)學(xué)院高職單招語文2018-2024歷年參考題庫頻考點(diǎn)含答案解析
- 專項(xiàng)07 用轉(zhuǎn)化思想求不規(guī)則圖形的角度
- 專題01 先秦時(shí)期:中國境內(nèi)早期人類與文明的起源、早期國家與社會(huì)變革(練習(xí))
- 中班戶外主題活動(dòng)策劃方案五篇
- 幼兒園綜治宣傳月活動(dòng)策劃方案三篇
- 公司企業(yè)管理咨詢合同
- 擋土墻施工合同
- 車聯(lián)網(wǎng)技術(shù)推廣項(xiàng)目合同
- 2024年湖南高速鐵路職業(yè)技術(shù)學(xué)院高職單招數(shù)學(xué)歷年參考題庫含答案解析
- 上海鐵路局招聘筆試沖刺題2025
- 國旗班指揮刀訓(xùn)練動(dòng)作要領(lǐng)
- 春季安全開學(xué)第一課
- 植物芳香油的提取 植物有效成分的提取教學(xué)課件
- 肖像繪畫市場發(fā)展現(xiàn)狀調(diào)查及供需格局分析預(yù)測報(bào)告
- 2021-2022學(xué)年遼寧省重點(diǎn)高中協(xié)作校高一上學(xué)期期末語文試題
- 同等學(xué)力英語申碩考試詞匯(第六版大綱)電子版
- 墓地個(gè)人協(xié)議合同模板
- 2024年部編版初中語文各年級(jí)教師用書七年級(jí)(上冊(cè))
- 中日合同范本
評(píng)論
0/150
提交評(píng)論