【文档说明】计算机科学引论-第二版课件.ppt,共(35)页,802.500 KB,由小橙橙上传
转载请保留链接:https://www.ichengzhen.cn/view-77403.html
以下为本文档部分文字说明:
1.11IntroductionFoundationsofComputerScienceCengageLearning1.2DefinetheTuringmodelofacomputer.DefinethevonNeumannmodelofacomputer.Describ
ethethreecomponentsofacomputer:hardware,data,andsoftware.Listtopicsrelatedtocomputerhardware.Listtopicsrelatedtodata.Listtopicsrelatedtosoftware.
Discusssomesocialandethicalissuesrelatedtotheuseofcomputers.Giveashorthistoryofcomputers.ObjectivesAfterst
udyingthischapter,thestudentshouldbeableto:1.31-1TURINGMODELTheideaofauniversalcomputationaldevicewasfirstdescribedby
AlanTuringin1937.Heproposedthatallcomputationcouldbeperformedbyaspecialkindofamachine,nowcalledaTuringmachine.Heb
asedthemodelontheactionsthatpeopleperformwheninvolvedincomputation.Heabstractedtheseactionsintoamodelforacomputationalmachineth
athasreallychangedtheworld.1.4DataprocessorsBeforediscussingtheTuringmodel,letusdefineacomputerasadataprocessor.Usingthisdefinition,ac
omputeractsasablackboxthatacceptsinputdata,processesthedata,andcreatesoutputdata(Figure1.1).Althoughthismodelcandefinethefunctionalityofacomputer
today,itistoogeneral.Inthismodel,apocketcalculatorisalsoacomputer(whichitis,inaliteralsense).Figure1.1Asinglepurposecomputingmachine1.5Pr
ogrammabledataprocessorsTheTuringmodelisabettermodelforageneral-purposecomputer.Thismodeladdsanextraelementtothes
pecificcomputingmachine:theprogram.Aprogramisasetofinstructionsthattellsthecomputerwhattodowithdata.Figu
re1.2showstheTuringmodel.Figure1.2AcomputerbasedontheTuringmodel1.6Figure1.3Thesameprogram,differentdata1.7Figure
1.4Thesamedata,differentprograms1.8TheuniversalTuringmachineAuniversalTuringmachine,amachinethatcandoany
computationiftheappropriateprogramisprovided,wasthefirstdescriptionofamoderncomputer.Itcanbeprovedthataverypowerfulcomputerandaunivers
alTuringmachinecancomputethesamething.Weneedonlyprovidethedataandtheprogram—thedescriptionofhowtodothecomputation—toeithermachine.Infac
t,auniversalTuringmachineiscapableofcomputinganythingthatiscomputable.1.91-2VONNEUMANNMODELComputersbuiltontheTuringuniversalmachinestor
edataintheirmemory.Around1944–1945,JohnvonNeumannproposedthat,sinceprogramanddataarelogicallythesame,programsshouldalsobestoredinthememor
yofacomputer.1.10ComputersbuiltonthevonNeumannmodeldividethecomputerhardwareintofoursubsystems:memory,arithmeticlogicunit,controlunit,and
input/output(Figure1.5).FoursubsystemsFigure1.5ThevonNeumannmodel1.11ThevonNeumannmodelstatesthattheprogrammustbestoredinmemory.
Thisistotallydifferentfromthearchitectureofearlycomputersinwhichonlythedatawasstoredinmemory:theprogramsfortheirtaskwasimplementedbymanipula
tingasetofswitchesorbychangingthewiringsystem.Thememoryofmoderncomputershostsbothaprogramanditscorrespondingdata.Thisimpliesthatbot
hthedataandprogramsshouldhavethesameformat,becausetheyarestoredinmemory.Infact,theyarestoredasbinarypat
ternsinmemory—asequenceof0sand1s.Thestoredprogramconcept1.12AprograminthevonNeumannmodelismadeofafinitenumberofinstructions.Int
hismodel,thecontrolunitfetchesoneinstructionfrommemory,decodesit,thenexecutesit.Inotherwords,theinstructionsareexecutedoneaf
teranother.Ofcourse,oneinstructionmayrequestthecontrolunittojumptosomepreviousorfollowinginstruction,butthisdoesnotmeanthattheinstructionsare
notexecutedsequentially.SequentialexecutionofaprogramwastheinitialrequirementofacomputerbasedonthevonNeumannmode
l.Today’scomputersexecuteprogramsintheorderthatisthemostefficient.Sequentialexecutionofinstructions1.131-3COMPUTERCOMPONENTSWecanthinkofacomput
erasbeingmadeupofthreecomponents:computerhardware,data,andcomputersoftware.1.14ComputerhardwaretodayhasfourcomponentsunderthevonN
eumannmodel,althoughwecanhavedifferenttypesofmemory,differenttypesofinput/outputsubsystems,andsoon.Wediscussco
mputerhardwareinmoredetailinChapter5.ComputerhardwareThevonNeumannmodelclearlydefinesacomputerasadataprocessing
machinethatacceptstheinputdata,processesit,andoutputstheresult.Data1.15ThemainfeatureoftheTuringorvo
nNeumannmodelsistheconceptoftheprogram.Althoughearlycomputersdidnotstoretheprograminthecomputer’smemory,theydidusetheconceptofprograms.Progr
ammingthoseearlycomputersmeantchangingthewiringsystemsorturningasetofswitchesonoroff.Programmingwasthereforeataskdonebyanoperatororengineerbeforet
heactualdataprocessingbegan.Computersoftware1.16Figure1.6Programanddatainmemory1.17Figure1.7Aprogrammadeofinstructions1.181-4HISTORYInthissectionw
ebrieflyreviewthehistoryofcomputingandcomputers.Wedividethishistoryintothreeperiods.1.19Mechanicalmachines(before1930)Duringthisperiod,
severalcomputingmachineswereinventedthatbearlittleresemblancetothemodernconceptofacomputer.Inthe17thcentury,BlaisePascal,aFrenchmathematicianandp
hilosopher,inventedPascaline.Inthelate17thcentury,aGermanmathematiciancalledGottfriedLeibnitzinventedwhatiskno
wnasLeibnitz’Wheel.ThefirstmachinethatusedtheideaofstorageandprogrammingwastheJacquardloom,inventedbyJoseph-MarieJacquardatthebeg
inningofthe19thcentury.1.20In1823,CharlesBabbageinventedtheDifferenceEngine.Later,heinventedamachinecalledtheAnalyticalEngi
nethatparallelstheideaofmoderncomputers.In1890,HermanHollerith,workingattheUSCensusBureau,designedandbuiltaprogrammermachine
thatcouldautomaticallyread,tally,andsortdatastoredonpunchedcards.1.21Thebirthofelectroniccomputers(1930–1950)Between1930and195
0,severalcomputerswereinventedbyscientistswhocouldbeconsideredthepioneersoftheelectroniccomputerindustry.
Theearlycomputersofthisperioddidnotstoretheprograminmemory—allwereprogrammedexternally.Fivecomputerswereprominentduringtheseyears:
ABCZ1MarkI.ColossusENIACEarlyelectroniccomputers1.22ThefirstcomputerbasedonvonNeumann’sideaswasmadein1950attheUniversityofP
ennsylvaniaandwascalledEDVAC.Atthesametime,asimilarcomputercalledEDSACwasbuiltbyMauriceWilkesatCambridgeUniversi
tyinEngland.ComputersbasedonthevonNeumannmodel1.23Computergenerations(1950–present)Computersbuiltafter1950moreorlessfollowt
hevonNeumannmodel.Theyhavebecomefaster,smaller,andcheaper,buttheprincipleisalmostthesame.Historiansdividethisperiodintogenerations,witheachge
nerationwitnessingsomemajorchangeinhardwareorsoftware(butnotinthemodel).Thefirstgeneration(roughly1950–1959)isch
aracterizedbytheemergenceofcommercialcomputers.Firstgeneration1.24Second-generationcomputers(roughly1959–1965)usedtransistorsinsteado
fvacuumtubes.Twohigh-levelprogramminglanguages,FORTRANandCOBOLinventedandmadeprogrammingeasier.Secondg
enerationTheinventionoftheintegratedcircuitreducedthecostandsizeofcomputersevenfurther.Minicomputersappearedonthemarket.Cannedprograms,popularlykn
ownassoftwarepackages,becameavailable.Thisgenerationlastedroughlyfrom1965to1975.Thirdgeneration1.25Thefourthgen
eration(approximately1975–1985)sawtheappearanceofmicrocomputers.Thefirstdesktopcalculator,theAltair8800,becameavailablein1975
.Thisgenerationalsosawtheemergenceofcomputernetworks.FourthgenerationThisopen-endedgenerationstartedin1985.Ithaswitnesse
dtheappearanceoflaptopandpalmtopcomputers,improvementsinsecondarystoragemedia(CD-ROM,DVDandsoon),theuseofmultim
edia,andthephenomenonofvirtualreality.Fifthgeneration1.261-5SOCIALANDETHICALISSUESComputersciencehascreatedsomeper
ipheralissues,themostprevalentofwhichcanbecategorizedassocialandethicalissues.1.27SocialissuesComputershavecreatedsomearguments.Wein
troducesomeoftheseargumentshere.Somepeoplethinkthatcomputershavecreatedakindofdependency,whichmakespeople’slivesmoredifficult.De
pendencySocialjusticeisanotherissueweoftenhearabout.Theadvocatesofthisissuearguethatusingcomputersathomeisal
uxurybenefitthatnotallpeoplecanafford.Thecostofacomputer,peripheraldevices,andamonthlychargeforInternetaccessisanextraburdenonlow-incomepe
ople.Socialjustice1.28Theconceptofdigitaldividecoversboththeissuesofdependencyandsocialjusticediscussedabove.T
heconceptdividessocietyintotwogroups:thosewhoareelectronicallyconnectedtotherestofsocietyandthosewhoarenot.Digitaldivide1.29Ethica
lissuesComputershavecreatedsomeethicalissues.Weintroducesomeofthesehere.Computersallowcommunicationbetweentwopartiestobedoneelectronically.
However,muchneedstobedonetomakethistypeofcommunicationprivate.Societyispayingabigpriceforprivateelectroniccommunication.Networksecuritymaycreatethis
typeofprivacy,butitneedseffortandcostsalot.Privacy1.30Anotherethicalissueinacomputerizedsocietyiscopyright:whoownsdata?TheInternet
hascreatedopportunitiestoshareideas,buthasalsobroughtwithitafurtherethicalissue:electroniccopyright.CopyrightComputersand
informationtechnologyhavecreatednewtypesofcrime.Hackershavebeenabletoaccessmanycomputersintheworldandhavestolenalotofmoney.Viruscreatorsdesignnew
virusestobesentthroughtheInternetanddamagetheinformationstoredincomputers.Althoughtherearemanyanti-virusprogramsinusetoday,societyispayingabigpr
iceforthistypeofcrime,whichdidnotexistbeforethecomputerandInternetera.Computercrime1.311-6COMPUTERSCIENCEASADISCIPLINEWiththeinventiono
fcomputers,anewdisciplinehasevolved:computerscience.Likeanyotherdiscipline,computersciencehasnowdividedintoseveralareas.Wecandividetheseareasin
totwobroadcategories:systemsareasandapplicationsareas.Thisbookisabreadth-firstapproachtoalltheseareas.Afterreadingthebook,thereader
shouldhaveenoughinformationtoselectthedesiredareaofspecialty.1.321-7OUTLINEOFTHECOURSEAfterthisintroductorychapter,t
hebookisdividedintofiveparts.PartI:DatarepresentationandoperationThispartincludesChapters2,3,and4.Cha
pter2discussesnumbersystems;howaquantitycanberepresentedusingsymbols.Chapter3discusseshowdifferentdataisstoredinsidethecomputer.Chap
ter4discussessomeprimitiveoperationsonbits.1.33PartII:ComputerhardwareThispartincludesChapters5and6.Chapter5g
ivesageneralideaofcomputerhardware,discussingdifferentcomputerorganizations.Chapter6showshowindividualcomputersareconnectedtomakecomputernet
worksandinternetworks(internets).PartIII:ComputersoftwareThispartincludesChapters7,8,9and10.Chapter7discussesoperatingsystems.Chapter
8showshowproblemsolvingisreducedtowritinganalgorithmfortheproblem.Chapter9takesajourneythroughthelistofcontemporaryprogramminglanguages.Chapter10isa
reviewofsoftwareengineering.1.34PartIV:DataorganizationandabstractionPartIVincludesChapters11,12,13and14.Chapt
er11discussdatastructures,collectingdataofthesameordifferenttypeunderonecategory.Chapter12discussesabstractdatatypes.Chapter13showshowdiffe
rentfilestructurescanbeusedfordifferentpurposes.Chapter14discussesdatabases.PartV:AdvancedtopicsThispartcove
rsChapters15,16,17and18.Chapter15discussesdatacompression.Chapter16exploressomeissuestodowithsecurity.Chapter17discussesth
etheoryofcomputation.Chapter18isanintroductiontoartificialintelligence,atopicwithday-to-daychallengesincomputerscien
ce.McGraw-Hill©TheMcGraw-HillCompanies,Inc.,20002021