【文档说明】计算机科学引论-第二版课件.ppt,共(35)页,802.500 KB,由小橙橙上传
转载请保留链接:https://www.ichengzhen.cn/view-77403.html
以下为本文档部分文字说明:
1.11IntroductionFoundationsofComputerScienceCengageLearning1.2DefinetheTuringmodelofacomputer.DefinethevonNeumannmodelo
facomputer.Describethethreecomponentsofacomputer:hardware,data,andsoftware.Listtopicsrelatedtocompute
rhardware.Listtopicsrelatedtodata.Listtopicsrelatedtosoftware.Discusssomesocialandethicalissuesrelatedtotheuseofcomputers.
Giveashorthistoryofcomputers.ObjectivesAfterstudyingthischapter,thestudentshouldbeableto:1.31-1TURINGMODELTheid
eaofauniversalcomputationaldevicewasfirstdescribedbyAlanTuringin1937.Heproposedthatallcomputationcouldbeperformedbyaspecialki
ndofamachine,nowcalledaTuringmachine.Hebasedthemodelontheactionsthatpeopleperformwheninvolvedincomputation.He
abstractedtheseactionsintoamodelforacomputationalmachinethathasreallychangedtheworld.1.4DataprocessorsBe
forediscussingtheTuringmodel,letusdefineacomputerasadataprocessor.Usingthisdefinition,acomputeractsasablackboxthatacceptsinputdata,processesthedata,
andcreatesoutputdata(Figure1.1).Althoughthismodelcandefinethefunctionalityofacomputertoday,itistoogeneral.Inthismodel,apocketcalculatorisalsoacompu
ter(whichitis,inaliteralsense).Figure1.1Asinglepurposecomputingmachine1.5ProgrammabledataprocessorsTheTuringm
odelisabettermodelforageneral-purposecomputer.Thismodeladdsanextraelementtothespecificcomputingmachine:theprogr
am.Aprogramisasetofinstructionsthattellsthecomputerwhattodowithdata.Figure1.2showstheTuringmodel.Figure1.2Acompu
terbasedontheTuringmodel1.6Figure1.3Thesameprogram,differentdata1.7Figure1.4Thesamedata,differentprograms1.8Theuniv
ersalTuringmachineAuniversalTuringmachine,amachinethatcandoanycomputationiftheappropriateprogramisprovided,wasthefirstdescriptionofamoderncomputer.I
tcanbeprovedthataverypowerfulcomputerandauniversalTuringmachinecancomputethesamething.Weneedonlyprovidethedataandt
heprogram—thedescriptionofhowtodothecomputation—toeithermachine.Infact,auniversalTuringmachineiscapableofcom
putinganythingthatiscomputable.1.91-2VONNEUMANNMODELComputersbuiltontheTuringuniversalmachinestoredataintheirmemory.Arou
nd1944–1945,JohnvonNeumannproposedthat,sinceprogramanddataarelogicallythesame,programsshouldalsobestoredinthememoryofacomputer.1.10Comp
utersbuiltonthevonNeumannmodeldividethecomputerhardwareintofoursubsystems:memory,arithmeticlogicunit,controlunit,andinput/output(Figure1.5).Fours
ubsystemsFigure1.5ThevonNeumannmodel1.11ThevonNeumannmodelstatesthattheprogrammustbestoredinmemory.Thisistotallydifferentfromthearchitectureo
fearlycomputersinwhichonlythedatawasstoredinmemory:theprogramsfortheirtaskwasimplementedbymanipulatingasetofswitchesorbychangingthewiringsystem.The
memoryofmoderncomputershostsbothaprogramanditscorrespondingdata.Thisimpliesthatboththedataandprogramsshouldhavethesameformat,becausethey
arestoredinmemory.Infact,theyarestoredasbinarypatternsinmemory—asequenceof0sand1s.Thestoredprogramconcept1.12AprograminthevonNeumannmodelisma
deofafinitenumberofinstructions.Inthismodel,thecontrolunitfetchesoneinstructionfrommemory,decodesit,thenexecutesit.Inotherwords,th
einstructionsareexecutedoneafteranother.Ofcourse,oneinstructionmayrequestthecontrolunittojumptosomepreviou
sorfollowinginstruction,butthisdoesnotmeanthattheinstructionsarenotexecutedsequentially.Sequentialexecutionofaprogra
mwastheinitialrequirementofacomputerbasedonthevonNeumannmodel.Today’scomputersexecuteprogramsintheorderthatisthemostefficie
nt.Sequentialexecutionofinstructions1.131-3COMPUTERCOMPONENTSWecanthinkofacomputerasbeingmadeupofthreecomponents:comp
uterhardware,data,andcomputersoftware.1.14ComputerhardwaretodayhasfourcomponentsunderthevonNeumannmodel,althoughwecanhavedifferenttypesofmemory,di
fferenttypesofinput/outputsubsystems,andsoon.WediscusscomputerhardwareinmoredetailinChapter5.ComputerhardwareThevonNeumannmod
elclearlydefinesacomputerasadataprocessingmachinethatacceptstheinputdata,processesit,andoutputstheresul
t.Data1.15ThemainfeatureoftheTuringorvonNeumannmodelsistheconceptoftheprogram.Althoughearlycomputersdidnotstor
etheprograminthecomputer’smemory,theydidusetheconceptofprograms.Programmingthoseearlycomputersmeantchangingthewiringsystemsorturningaseto
fswitchesonoroff.Programmingwasthereforeataskdonebyanoperatororengineerbeforetheactualdataprocessingbegan.Computersoftware1.16Figure1.
6Programanddatainmemory1.17Figure1.7Aprogrammadeofinstructions1.181-4HISTORYInthissectionwebrieflyreviewthehistoryofcomputingan
dcomputers.Wedividethishistoryintothreeperiods.1.19Mechanicalmachines(before1930)Duringthisperiod,severalcomputingmachin
eswereinventedthatbearlittleresemblancetothemodernconceptofacomputer.Inthe17thcentury,BlaisePascal,aFrenchmathemati
cianandphilosopher,inventedPascaline.Inthelate17thcentury,aGermanmathematiciancalledGottfriedLeibnitzinventedwhatisknownasLeibnitz’Wh
eel.ThefirstmachinethatusedtheideaofstorageandprogrammingwastheJacquardloom,inventedbyJoseph-MarieJacquarda
tthebeginningofthe19thcentury.1.20In1823,CharlesBabbageinventedtheDifferenceEngine.Later,heinventedamachinecalledtheAnalytical
Enginethatparallelstheideaofmoderncomputers.In1890,HermanHollerith,workingattheUSCensusBureau,designedan
dbuiltaprogrammermachinethatcouldautomaticallyread,tally,andsortdatastoredonpunchedcards.1.21Thebirthofelectroniccomputers(1930–1950)Between193
0and1950,severalcomputerswereinventedbyscientistswhocouldbeconsideredthepioneersoftheelectroniccompute
rindustry.Theearlycomputersofthisperioddidnotstoretheprograminmemory—allwereprogrammedexternally.Fivecomputerswereprominentduringtheseyears:A
BCZ1MarkI.ColossusENIACEarlyelectroniccomputers1.22ThefirstcomputerbasedonvonNeumann’sideaswasmadein1950attheUniversity
ofPennsylvaniaandwascalledEDVAC.Atthesametime,asimilarcomputercalledEDSACwasbuiltbyMauriceWilkesatCambridgeUniversityinEngland.Computersbasedonthevon
Neumannmodel1.23Computergenerations(1950–present)Computersbuiltafter1950moreorlessfollowthevonNeumannmodel.Theyhavebecomefaster,smaller
,andcheaper,buttheprincipleisalmostthesame.Historiansdividethisperiodintogenerations,witheachgenerationwitnessingsomemajorchangeinhardwareorsoft
ware(butnotinthemodel).Thefirstgeneration(roughly1950–1959)ischaracterizedbytheemergenceofcommercialcomputers.Firstgener
ation1.24Second-generationcomputers(roughly1959–1965)usedtransistorsinsteadofvacuumtubes.Twohigh-levelpr
ogramminglanguages,FORTRANandCOBOLinventedandmadeprogrammingeasier.SecondgenerationTheinventionoftheinteg
ratedcircuitreducedthecostandsizeofcomputersevenfurther.Minicomputersappearedonthemarket.Cannedprograms,popu
larlyknownassoftwarepackages,becameavailable.Thisgenerationlastedroughlyfrom1965to1975.Thirdgeneration1.25Thefourthgenerat
ion(approximately1975–1985)sawtheappearanceofmicrocomputers.Thefirstdesktopcalculator,theAltair8800,becameavailablein1975.Thisgenerat
ionalsosawtheemergenceofcomputernetworks.FourthgenerationThisopen-endedgenerationstartedin1985.Ithaswitnessedthe
appearanceoflaptopandpalmtopcomputers,improvementsinsecondarystoragemedia(CD-ROM,DVDandsoon),theuseofmultimedia,andthephenomenonofvirtual
reality.Fifthgeneration1.261-5SOCIALANDETHICALISSUESComputersciencehascreatedsomeperipheralissues,the
mostprevalentofwhichcanbecategorizedassocialandethicalissues.1.27SocialissuesComputershavecreatedsomearguments.Weintroducesomeofthes
eargumentshere.Somepeoplethinkthatcomputershavecreatedakindofdependency,whichmakespeople’slivesmoredifficult.DependencySocialjusticeisanotheri
ssueweoftenhearabout.Theadvocatesofthisissuearguethatusingcomputersathomeisaluxurybenefitthatnotallpeoplecanaf
ford.Thecostofacomputer,peripheraldevices,andamonthlychargeforInternetaccessisanextraburdenonlow-incomep
eople.Socialjustice1.28Theconceptofdigitaldividecoversboththeissuesofdependencyandsocialjusticediscussedabove.Theconcept
dividessocietyintotwogroups:thosewhoareelectronicallyconnectedtotherestofsocietyandthosewhoarenot.Digitaldivide1.29EthicalissuesComputershav
ecreatedsomeethicalissues.Weintroducesomeofthesehere.Computersallowcommunicationbetweentwopartiestobedoneelectronic
ally.However,muchneedstobedonetomakethistypeofcommunicationprivate.Societyispayingabigpriceforprivateelectroniccommunication.Netwo
rksecuritymaycreatethistypeofprivacy,butitneedseffortandcostsalot.Privacy1.30Anotherethicalissueinacomputerizedsocietyiscopyright:whoownsdata?T
heInternethascreatedopportunitiestoshareideas,buthasalsobroughtwithitafurtherethicalissue:electroniccopyright.CopyrightCompu
tersandinformationtechnologyhavecreatednewtypesofcrime.Hackershavebeenabletoaccessmanycomputersintheworldandhavest
olenalotofmoney.ViruscreatorsdesignnewvirusestobesentthroughtheInternetanddamagetheinformationstoredincomp
uters.Althoughtherearemanyanti-virusprogramsinusetoday,societyispayingabigpriceforthistypeofcrime,whichdidnotexistbeforethecomputerandInterneter
a.Computercrime1.311-6COMPUTERSCIENCEASADISCIPLINEWiththeinventionofcomputers,anewdisciplinehasevolved:co
mputerscience.Likeanyotherdiscipline,computersciencehasnowdividedintoseveralareas.Wecandividetheseareasintotwobroadcategories:systemsareasandappl
icationsareas.Thisbookisabreadth-firstapproachtoalltheseareas.Afterreadingthebook,thereadershouldhaveenoughinformationtosele
ctthedesiredareaofspecialty.1.321-7OUTLINEOFTHECOURSEAfterthisintroductorychapter,thebookisdividedintofiveparts.Par
tI:DatarepresentationandoperationThispartincludesChapters2,3,and4.Chapter2discussesnumbersystems;howaquantitycanberepresent
edusingsymbols.Chapter3discusseshowdifferentdataisstoredinsidethecomputer.Chapter4discussessomeprimitiveoperationsonbits.1.33PartII:Computerha
rdwareThispartincludesChapters5and6.Chapter5givesageneralideaofcomputerhardware,discussingdifferentcomputerorgan
izations.Chapter6showshowindividualcomputersareconnectedtomakecomputernetworksandinternetworks(intern
ets).PartIII:ComputersoftwareThispartincludesChapters7,8,9and10.Chapter7discussesoperatingsystems.Chapter8showshowproblemsolvingisreducedtowritingana
lgorithmfortheproblem.Chapter9takesajourneythroughthelistofcontemporaryprogramminglanguages.Chapter10isareviewofsoftw
areengineering.1.34PartIV:DataorganizationandabstractionPartIVincludesChapters11,12,13and14.Chapter11discus
sdatastructures,collectingdataofthesameordifferenttypeunderonecategory.Chapter12discussesabstractdatatypes.Chapter13showshowdifferentfilestructuresca
nbeusedfordifferentpurposes.Chapter14discussesdatabases.PartV:AdvancedtopicsThispartcoversChapters15
,16,17and18.Chapter15discussesdatacompression.Chapter16exploressomeissuestodowithsecurity.Chapter17discussesthetheoryofcomputation.Chapter18isani
ntroductiontoartificialintelligence,atopicwithday-to-daychallengesincomputerscience.McGraw-Hill©TheMcGraw-
HillCompanies,Inc.,20002021