【文档说明】计算机科学引论-第二版课件.ppt,共(35)页,802.500 KB,由小橙橙上传
转载请保留链接:https://www.ichengzhen.cn/view-77403.html
以下为本文档部分文字说明:
1.11IntroductionFoundationsofComputerScienceCengageLearning1.2DefinetheTuringmodelofacomputer.DefinethevonNeumannmodelof
acomputer.Describethethreecomponentsofacomputer:hardware,data,andsoftware.Listtopicsrelatedtocomputerhardware.Listtopicsrelatedtodata
.Listtopicsrelatedtosoftware.Discusssomesocialandethicalissuesrelatedtotheuseofcomputers.Giveashorthistoryofcomputers.
ObjectivesAfterstudyingthischapter,thestudentshouldbeableto:1.31-1TURINGMODELTheideaofauniversalcomputationaldevicewasfirst
describedbyAlanTuringin1937.Heproposedthatallcomputationcouldbeperformedbyaspecialkindofamachine,nowcalledaTuringmachine.Hebasedthemodelontheactions
thatpeopleperformwheninvolvedincomputation.Heabstractedtheseactionsintoamodelforacomputationalmachinethathasreallychangedtheworl
d.1.4DataprocessorsBeforediscussingtheTuringmodel,letusdefineacomputerasadataprocessor.Usingthisdefinition,acomputeractsasablackboxthatacceptsinpu
tdata,processesthedata,andcreatesoutputdata(Figure1.1).Althoughthismodelcandefinethefunctionalityofacomputert
oday,itistoogeneral.Inthismodel,apocketcalculatorisalsoacomputer(whichitis,inaliteralsense).Figure1.1Asinglepurposecomputingmachine1.5Progr
ammabledataprocessorsTheTuringmodelisabettermodelforageneral-purposecomputer.Thismodeladdsanextraelementtothespecificcomputingma
chine:theprogram.Aprogramisasetofinstructionsthattellsthecomputerwhattodowithdata.Figure1.2showstheTuringmodel.Figure1.2AcomputerbasedontheTuringmo
del1.6Figure1.3Thesameprogram,differentdata1.7Figure1.4Thesamedata,differentprograms1.8TheuniversalTuringmach
ineAuniversalTuringmachine,amachinethatcandoanycomputationiftheappropriateprogramisprovided,wasthefirstdescriptionofamoderncomputer.Itcanbepr
ovedthataverypowerfulcomputerandauniversalTuringmachinecancomputethesamething.Weneedonlyprovidethedataandtheprogram—th
edescriptionofhowtodothecomputation—toeithermachine.Infact,auniversalTuringmachineiscapableofcomputinganythingthatiscomputable.1.91-2VONNEUMANN
MODELComputersbuiltontheTuringuniversalmachinestoredataintheirmemory.Around1944–1945,JohnvonNeumannproposedt
hat,sinceprogramanddataarelogicallythesame,programsshouldalsobestoredinthememoryofacomputer.1.10ComputersbuiltonthevonNeumannmodeldivideth
ecomputerhardwareintofoursubsystems:memory,arithmeticlogicunit,controlunit,andinput/output(Figure1.5).FoursubsystemsFigure1.
5ThevonNeumannmodel1.11ThevonNeumannmodelstatesthattheprogrammustbestoredinmemory.Thisistotallydifferentfromthearchitectureofearlycomputersinwh
ichonlythedatawasstoredinmemory:theprogramsfortheirtaskwasimplementedbymanipulatingasetofswitchesorbychangingthe
wiringsystem.Thememoryofmoderncomputershostsbothaprogramanditscorrespondingdata.Thisimpliesthatboththedataandprogramsshouldhavethesameformat
,becausetheyarestoredinmemory.Infact,theyarestoredasbinarypatternsinmemory—asequenceof0sand1s.Thestoredprogramconcept1.12AprograminthevonNeuma
nnmodelismadeofafinitenumberofinstructions.Inthismodel,thecontrolunitfetchesoneinstructionfrommemory,decodesit,thenexecute
sit.Inotherwords,theinstructionsareexecutedoneafteranother.Ofcourse,oneinstructionmayrequestthecontrolunittojumptosomepreviousorfollowinginstruct
ion,butthisdoesnotmeanthattheinstructionsarenotexecutedsequentially.SequentialexecutionofaprogramwastheinitialrequirementofacomputerbasedonthevonN
eumannmodel.Today’scomputersexecuteprogramsintheorderthatisthemostefficient.Sequentialexecutionofinstructions1.131-3COMPUTERCO
MPONENTSWecanthinkofacomputerasbeingmadeupofthreecomponents:computerhardware,data,andcomputersoftware.1.14Computer
hardwaretodayhasfourcomponentsunderthevonNeumannmodel,althoughwecanhavedifferenttypesofmemory,differenttypesofinput/outputsubsystem
s,andsoon.WediscusscomputerhardwareinmoredetailinChapter5.ComputerhardwareThevonNeumannmodelclearlydefinesacomputerasadataproc
essingmachinethatacceptstheinputdata,processesit,andoutputstheresult.Data1.15ThemainfeatureoftheTuringorvonNeumann
modelsistheconceptoftheprogram.Althoughearlycomputersdidnotstoretheprograminthecomputer’smemory,theydidusetheconceptof
programs.Programmingthoseearlycomputersmeantchangingthewiringsystemsorturningasetofswitchesonoroff.Programm
ingwasthereforeataskdonebyanoperatororengineerbeforetheactualdataprocessingbegan.Computersoftware1.16Figure1.6Progr
amanddatainmemory1.17Figure1.7Aprogrammadeofinstructions1.181-4HISTORYInthissectionwebrieflyreviewthehistoryofcomputingandcomputers.Wedi
videthishistoryintothreeperiods.1.19Mechanicalmachines(before1930)Duringthisperiod,severalcomputingmachineswereinventedtha
tbearlittleresemblancetothemodernconceptofacomputer.Inthe17thcentury,BlaisePascal,aFrenchmathematicianandphilosopher,inventedPascaline.In
thelate17thcentury,aGermanmathematiciancalledGottfriedLeibnitzinventedwhatisknownasLeibnitz’Wheel.Thefirstmachinethatusedtheideaofstor
ageandprogrammingwastheJacquardloom,inventedbyJoseph-MarieJacquardatthebeginningofthe19thcentury.1.20In1823,C
harlesBabbageinventedtheDifferenceEngine.Later,heinventedamachinecalledtheAnalyticalEnginethatparallelsthe
ideaofmoderncomputers.In1890,HermanHollerith,workingattheUSCensusBureau,designedandbuiltaprogrammermachinethatcouldautomaticallyread,tally
,andsortdatastoredonpunchedcards.1.21Thebirthofelectroniccomputers(1930–1950)Between1930and1950,sever
alcomputerswereinventedbyscientistswhocouldbeconsideredthepioneersoftheelectroniccomputerindustry.Theearlycomputersofthisperioddid
notstoretheprograminmemory—allwereprogrammedexternally.Fivecomputerswereprominentduringtheseyears:ABCZ1MarkI.
ColossusENIACEarlyelectroniccomputers1.22ThefirstcomputerbasedonvonNeumann’sideaswasmadein1950attheUniversityofPennsylvaniaandwascalledEDVAC.Atthe
sametime,asimilarcomputercalledEDSACwasbuiltbyMauriceWilkesatCambridgeUniversityinEngland.Computersbase
donthevonNeumannmodel1.23Computergenerations(1950–present)Computersbuiltafter1950moreorlessfollowthevonNeumannmodel.Theyhavebecomefaster,smalle
r,andcheaper,buttheprincipleisalmostthesame.Historiansdividethisperiodintogenerations,witheachgenerationwitn
essingsomemajorchangeinhardwareorsoftware(butnotinthemodel).Thefirstgeneration(roughly1950–1959)ischaracte
rizedbytheemergenceofcommercialcomputers.Firstgeneration1.24Second-generationcomputers(roughly1959–1965)us
edtransistorsinsteadofvacuumtubes.Twohigh-levelprogramminglanguages,FORTRANandCOBOLinventedandmadeprogrammingeasier.SecondgenerationTheinv
entionoftheintegratedcircuitreducedthecostandsizeofcomputersevenfurther.Minicomputersappearedonthemarket.Cannedprograms,pop
ularlyknownassoftwarepackages,becameavailable.Thisgenerationlastedroughlyfrom1965to1975.Thirdgeneration1.25Thefourthgene
ration(approximately1975–1985)sawtheappearanceofmicrocomputers.Thefirstdesktopcalculator,theAltair8800,becameavailabl
ein1975.Thisgenerationalsosawtheemergenceofcomputernetworks.FourthgenerationThisopen-endedgenerationstartedin1985.Ithaswitn
essedtheappearanceoflaptopandpalmtopcomputers,improvementsinsecondarystoragemedia(CD-ROM,DVDandsoon),
theuseofmultimedia,andthephenomenonofvirtualreality.Fifthgeneration1.261-5SOCIALANDETHICALISSUESComputersciencehascreatedsomeperipheralissues,the
mostprevalentofwhichcanbecategorizedassocialandethicalissues.1.27SocialissuesComputershavecreatedsomearguments.Weintroducesomeofth
eseargumentshere.Somepeoplethinkthatcomputershavecreatedakindofdependency,whichmakespeople’slivesmoredifficult.DependencySocialjusticeisan
otherissueweoftenhearabout.Theadvocatesofthisissuearguethatusingcomputersathomeisaluxurybenefitthatnotallpeoplecanafford.Thecostofacomputer,pe
ripheraldevices,andamonthlychargeforInternetaccessisanextraburdenonlow-incomepeople.Socialjustice1.28Thecon
ceptofdigitaldividecoversboththeissuesofdependencyandsocialjusticediscussedabove.Theconceptdividessocietyintotwogroups:thosewhoareelectr
onicallyconnectedtotherestofsocietyandthosewhoarenot.Digitaldivide1.29EthicalissuesComputershavecreatedsomeethicalissues.Wei
ntroducesomeofthesehere.Computersallowcommunicationbetweentwopartiestobedoneelectronically.However,muchneeds
tobedonetomakethistypeofcommunicationprivate.Societyispayingabigpriceforprivateelectroniccommunication.Net
worksecuritymaycreatethistypeofprivacy,butitneedseffortandcostsalot.Privacy1.30Anotherethicalissueinacomputeri
zedsocietyiscopyright:whoownsdata?TheInternethascreatedopportunitiestoshareideas,buthasalsobroughtwithitafurtherethicalissue:ele
ctroniccopyright.CopyrightComputersandinformationtechnologyhavecreatednewtypesofcrime.Hackershavebeenabletoaccessman
ycomputersintheworldandhavestolenalotofmoney.ViruscreatorsdesignnewvirusestobesentthroughtheInternetan
ddamagetheinformationstoredincomputers.Althoughtherearemanyanti-virusprogramsinusetoday,societyispayi
ngabigpriceforthistypeofcrime,whichdidnotexistbeforethecomputerandInternetera.Computercrime1.311-6COMPUTERSCIENCEASADIS
CIPLINEWiththeinventionofcomputers,anewdisciplinehasevolved:computerscience.Likeanyotherdiscipline,computersciencehasnowdi
videdintoseveralareas.Wecandividetheseareasintotwobroadcategories:systemsareasandapplicationsareas.Thisbookisabreadth-firstapproachtoallth
eseareas.Afterreadingthebook,thereadershouldhaveenoughinformationtoselectthedesiredareaofspecialty.1.321-7OUTLINEOFTHECOURSEAftert
hisintroductorychapter,thebookisdividedintofiveparts.PartI:DatarepresentationandoperationThispartincludesChapters2,3,and4.Chapter2discussesnumbersyst
ems;howaquantitycanberepresentedusingsymbols.Chapter3discusseshowdifferentdataisstoredinsidethecomputer.Chapter4discussessomeprimi
tiveoperationsonbits.1.33PartII:ComputerhardwareThispartincludesChapters5and6.Chapter5givesageneralideaofcomputerhardware,discuss
ingdifferentcomputerorganizations.Chapter6showshowindividualcomputersareconnectedtomakecomputernetworksandinternetworks(in
ternets).PartIII:ComputersoftwareThispartincludesChapters7,8,9and10.Chapter7discussesoperatingsystems.Chapter8showshowproblemsolvingi
sreducedtowritinganalgorithmfortheproblem.Chapter9takesajourneythroughthelistofcontemporaryprogramminglanguages.Chapter10i
sareviewofsoftwareengineering.1.34PartIV:DataorganizationandabstractionPartIVincludesChapters11,12,13and14.Chapter11discussdatastr
uctures,collectingdataofthesameordifferenttypeunderonecategory.Chapter12discussesabstractdatatypes.Chapter13s
howshowdifferentfilestructurescanbeusedfordifferentpurposes.Chapter14discussesdatabases.PartV:AdvancedtopicsT
hispartcoversChapters15,16,17and18.Chapter15discussesdatacompression.Chapter16exploressomeissuestodowithsecurity.Chapter17d
iscussesthetheoryofcomputation.Chapter18isanintroductiontoartificialintelligence,atopicwithday-to-daychallengesi
ncomputerscience.McGraw-Hill©TheMcGraw-HillCompanies,Inc.,20002021