l1-基本認識計算機學院專業(yè)基礎(chǔ)課_第1頁
l1-基本認識計算機學院專業(yè)基礎(chǔ)課_第2頁
l1-基本認識計算機學院專業(yè)基礎(chǔ)課_第3頁
l1-基本認識計算機學院專業(yè)基礎(chǔ)課_第4頁
l1-基本認識計算機學院專業(yè)基礎(chǔ)課_第5頁
已閱讀5頁,還剩37頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

內(nèi)容主要取材于CS61C第1數(shù)制NumberBases(數(shù)的進制Signed(有符合vsUnsigned(無符號SignExtension(符合擴展航空航天大學計算機內(nèi)容主要取材于CS61C第1數(shù)制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/權(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航空航天大學計算機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]補由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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論