版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
2024/1/23BUPT-PRF1Lecture1
Introduction:Computers&Programming萬巖2024/1/23BUPT-PRF2ContentComputerHistory&HardwareHistoryHardwareBits&BytesComponentsComputerSoftware&ProgrammingLanguageDevelopmentofC(Textbook1.1,1.2)2024/1/23BUPT-PRF3HistoryAtanasoff-BerryComputer(ABC,1937)HumanoperatormanipulatedexternalwiringElectricalNumericalIntegratorandComputer(ENIAC,1946)Vacuumtubes(電子管)MarkI(1944)Mechanicalrelayswitches(繼電器開關(guān))ElectronicDelayedStorageAutomaticComputer(EDSAC,1949)IncorporatedaformofmemoryTheprinciplewasdevelopedbyJohnVonNeumann2024/1/23BUPT-PRF4History:ElectricalNumericalIntegratorandComputer(ENIAC,1946)
-Vacuumtubes2024/1/23BUPT-PRF51.1ComputerHardwareComputersareconstructedfromphysicalcomponentsreferredtoasHardwareHardwarefacilitatesthestorageandprocessingofdataunderthedirectionofastoredprogram–
SoftwareComputerhardwaredoesnotstoredatausingthesamesymbolsthathumansdo2024/1/23BUPT-PRF61.2Components2024/1/23BUPT-PRF7CentralProcessingUnit(CPU)Controlunit:directsandmonitorstheoveralloperationofthecomputerKeepstrackofwherethenextinstructionresidesIssuesthesignalsneededtobothreaddatafromandwritedatatootherunitsinthesystemExecutesallinstructionsArithmeticandLogicUnit(ALU):performsallofthecomputations,suchasaddition,subtraction,comparisons,andsoon,thatacomputerprovidesCPUsareconstructedasasinglemicrochip,whichisreferredtoasamicroprocessor2024/1/23BUPT-PRF8Microprocessor2024/1/23BUPT-PRF9MainMemoryUnitStoresdataandinstructionsassequenceofbytesAprogrammustresideinmainmemoryifitistooperateonthecomputerConstructedasRandomAccessMemory(RAM)EverysectionofmemorycanbeaccessedrandomlyasquicklyasanyothersectionDataislostwhenpoweristurnedoffSizeisusuallyspecifiedinbytes(MBorGB)2024/1/23BUPT-PRF10SecondaryStorageUsedaspermanentstorageforprogramsanddataMagnetictape,magneticdisks,andCD-ROMsDirectaccessstoragedevice(DASD):allowsacomputertoreadorwriteanyonefileorprogramindependentofitspositiononthestoragemediumMagneticharddiskconsistsofrigidplattersthatspintogetheronacommonspindleInitially,themostcommonmagneticdiskstoragedevicewastheremovablefloppydisk2024/1/23BUPT-PRF11Input/OutputUnitTheinput/output(I/O)unitprovidesaccesstothecomputer,allowingittoinputandoutputdataItistheinterfacetowhichperipheraldevices(外圍設(shè)備),suchaskeyboards,console(控制臺)screens,andprinters,areattached2024/1/23BUPT-PRF121.ComputerHardware:SummaryHaveyouusedcomputersbefore?When?Forwhatpurpose?Hardware:(describeyourcomputer)CentralProcessingUnit(CPU):ALU,controlMemory:primarystorageSecondarystorage:harddisk,floppydisk,flashingdisk,compactdiskI/Odevices:keyboard,mouse,monitor,projector,printer,scanner…,etc.2024/1/23BUPT-PRF131.3Bits(位)andBytes(字節(jié))ThesmallestandmostbasicdataiteminacomputerisabitOpenorclosedswitch0or1Thegroupingof8bitstoformalargerunitisreferredtoasabyteCanrepresentanyoneof256distinctpatternsThecollectionsofpatternsconsistingof0sand1susedtorepresentletters,singledigits,andothersinglecharactersarecalledcharactercodes(字符碼),suchasASCII.2024/1/23BUPT-PRF142.ComputerSoftware&ProgrammingLanguagesSoftware:OperatingSystem(OS,操作系統(tǒng)),Tools,Applicationsoftware,etc.Programming:writinginstructionsinalanguagethatthecomputercanrespondtoandthatotherprogrammerscanunderstandProgramminglanguage:setofinstructionsthatcanbeusedtoconstructaprogram2024/1/23BUPT-PRF152.ComputerSoftware&ComputerLanguagesComputerprogramminglanguagearedesigned(1)tomaketheprogrammingprocesseasier;(2)tocapitalizeonaspecialfeatureofthehardware;(3)tomeetaspecialrequirementofanapplicationDifferentlevelsHighlevellanguageLowlevellanguageAssemblylanguageMachineLanguageThefirstprogramminglanguagetolearnisC,ahighlevellanguage.2024/1/23BUPT-PRF16MachineLanguage
(機器語言)Executableprogram(可執(zhí)行程序):programthatcanoperateacomputerExecutableprogramsarewrittenwithbinarynumbers,whichisacomputer’sinternallanguage(machinelanguage)Anexampleofasimplemachinelanguageprogramcontainingtwoinstructionsis:01000000000010(+)10000000000011(-)2024/1/23BUPT-PRF17AssemblyLanguage
(匯編語言)Machine
languageismachinedependableandtimeconsumingtowriteAssemblylanguage:
usesthesubstitutionofword-likesymbolsfortheoperation,anddecimalnumbersandlabelsformemoryaddressesLOADfirstADDsecondMULfactorSTOREanswer2024/1/23BUPT-PRF18AssemblyLanguage(continued)2024/1/23BUPT-PRF19Low-andHigh-LevelLanguagesMachineandassemblylanguagesarelow-levellanguagesbecausetheybothuseinstructionsthataredirectlytiedtoonetypeofcomputerAHighlevellanguageusesinstructionsthatresemblehumanlanguages,suchasEnglish,andcanberunonallcomputers.CisaHigh-levellanguageAnswer=(first+second)*factorAFirstBookofANSIC,FourthEdition20Low-andHigh-LevelLanguagesProgramswritteninacomputerlanguagearereferredtoassourceprogramsandsourcecodeWheneachstatementinahigh-levelsourceprogramistranslatedindividuallyandexecutedimmediatelyupontranslation,theprogramminglanguageiscalledaninterpretedlanguageInterpreter:programthattranslateseachstatementinahigh-levelsourceprogramandexecutesitimmediatelyupontranslation2024/1/23BUPT-PRF21Low-andHigh-LevelLanguages(continued)Compiledlanguage:thestatementsinahigh-levelsourceprogramaretranslatedasacompleteunitbeforeanyindividualstatementisexecutedCompilerTheoutputproducedbythecompileriscalledanobjectprogram(目標(biāo)程序)Linker:combinesadditionalmachinelanguagecodewiththeobjectprogramtocreateafinalexecutableprogram2024/1/23BUPT-PRF22Low-andHigh-LevelLanguages(continued)2024/1/23BUPT-PRF23
CompilationProcess:SummaryCompilationprocessistotranslateahigh-levelprogramminglanguagetolower-levelmachinelanguage(seefigure).Edit(編輯)
asourcefile;Compile(編譯)thesourcefile(transferahighlevelprogramminglanguagetothelowerlevelmachinelanguage);Link(鏈接)compiledobjectfilestoanexecutablefiles;Debug(調(diào)試)process:syntaxerrors,logicerrorsTerms:Edit,compile,linkSourcefile(),objectfile,executablefileFilename,sourcefile,rootname,extensionAFirstBookofANSIC,FourthEdition24ProceduralandObject-OrientedLanguagesProcedurallanguage:instructionsareusedtocreateself-containedunits,calledproceduresProcedure:acceptsdataasinputandtransformsitinsomemannertoproduceaspecificresultasoutputAlsocalledfunctionormethodProceduresconformingtostructureguidelinesareknownasstructuredproceduresAFirstBookofANSIC,FourthEdition25ProceduralandObject-OrientedLanguages(continued)Structuredlanguage:high-levelprocedurallanguage(e.g.,C)thatenforcesstructuredproceduresObject-orientedlanguages:languageswithobjectorientationsuchasC++,Java,VisualBasic,andC#AFirstBookofANSIC,FourthEdition26ProceduralandObject-OrientedLanguages(continued)AFirstBookofANSIC,FourthEdition27ApplicationandSystemSoftwareApplicationsoftware:programswrittentoperformparticulartasksrequiredbyusersSystemsoftware:collectionofprogramsthatmustbereadilyavailabletoanycomputersystemtoenablethecomputertooperateAFirstBookofANSIC,FourthEdition28ApplicationandSystemSoftware(continued)Operatingsystem:setofsystemprogramsusedtooperateandcontrolacomputerMultiusersystem:handlesmultipleusersconcurrentlyOperatingsystemsthatpermiteachusertorunmultipleprogramsarereferr
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 產(chǎn)業(yè)園區(qū)租房居間合同樣本
- 通信工程居間合同范例
- 淺析HAZOP分析技術(shù)在項目設(shè)計階段的應(yīng)用
- 醫(yī)療器械銷售及維修服務(wù)合同協(xié)議
- 進口采購合同范本
- 農(nóng)莊租賃合同范本
- 全新裝修房出租合同范本
- 聘任勞動合同范本
- 2025年唇形密封圈項目投資可行性研究分析報告
- 土方施工承包合同
- 房地產(chǎn)調(diào)控政策解讀
- 產(chǎn)前診斷室護理工作總結(jié)
- 2024-2025學(xué)年八年級數(shù)學(xué)人教版上冊寒假作業(yè)(綜合復(fù)習(xí)能力提升篇)(含答案)
- 《AP內(nèi)容介紹》課件
- 醫(yī)生定期考核簡易程序述職報告范文(10篇)
- 安全創(chuàng)新創(chuàng)效
- 《中國糖尿病防治指南(2024版)》更新要點解讀
- 初級創(chuàng)傷救治課件
- 2024年社會工作者(中級)-社會綜合能力考試歷年真題可打印
- 《處理人際關(guān)系》課件
- 五年級行程問題應(yīng)用題100道
評論
0/150
提交評論