第1页共3页2009-2010学年第1学期2009级《计算机导论》考试试题A卷考试时间:2009年月班级学号姓名请将答案写在答题纸上,写明题号,不必抄题,字迹工整、清晰;请在答题纸和试题纸上都写上你的班级,学号和姓名,交卷时请将试题纸、答题纸和草纸一并交上来。I、ChoiceQuestions(20questions,1scoreforeachquestion)1.Everycomputertodayisbasedonthe_____model.a.vonNeumannb.Microsoftc.Inteld.input/output2.TheCPUincludesasmallnumberofstoragebuffersthatholddatatemporarily,called________.a.cacheb.registersc.memoryd.diskdrives3.Tostoreabyte,youneed______electronicswitches.a.1b.4c.8d.164.AccordingtothevonNeumannmodel,_________arestoredinmemory.a.datab.programsc.algorithmd.aandb5.Computerscientistshavedefinedthreeconstructsforastructuresprogramoralgorithm,assertingthataprogrammustbemadeofacombinationofthem.WhichofthefollowingisNOTamongthem?a.Decisionb.Sequencec.Flowchartingd.Repetition5.6.Theoutputdatadependonthecombinationofthe________andtheprogram.a.memorysizeb.inputdatac.processormodeld.processorspeed7.In______numberrepresentation,therearetworepresentationsfor0a.sign-and-magnitude.b.one’scomplementc.two’scomplementd.aandb8.Theuniformrepresentationforstoringdataiscalled________.a.textb.abitpatternc.aswitchd.ISO9.Tounset(forceto0)allthebitsofabitpattern,makeamaskofall0sandthen______thebitpatternandthemask.a.ORb.NOTc.XORd.AND10.Abitpatternofthreebitscantakeonhowmanydifferentstates?a.sixteenb.eightc.fourd.three11.Aprogramisasetof________writtenina(n)________language.a.directions,humanb.mathematicaloperations,mathematicalc.codes,binaryd.instructions,computer12.A______busconnectstheCPUandmemory.第2页共3页a.controlb.addressc.datad.alloftheabove13.Arouteroperatesat______layeroftheOSImodel.a.alllayersb.thefirstfourlayersc.thefirstthreelayersd.application14.The______schedulercreatesaprocessfromajobandchangesaprocessbacktoajob.a.processb.queuec.jobd.virtual15.For______sort,n-1passesandtowloopsareneededtosortthedata..a.selectionb.insertionc.bubbled.alloftheabove16.Anoperatingsystemprogramcalledthe______getstheprogramintomemory.a.translatorb.loaderc.downloadd.processor17.Whenyoutrytostoreanumberthatisnotwithintherangedefinedbytheallocation,whathappens?a.Thesystemautomaticallyallocatesmorespace.b.Theprocessorhalts.c.Nothing;theprocessorjustdropstheextrabitsd.Yougetanoverflowerror.18.Inalinkedlist,eachelementcontains______.a.alinkandarecordb.dataandarecordc.dataandalinkd.alloftheabove19.Aprocessintherunningstategoestoreadystatewhen_______.a.getaccesstoCPUb.Timeslotexhaustedc.I/Orequestedd.itfinishesrunning20.Thebitpattern11000111_________tofliptheleftmostbits.a.XOR11111000b.OR11111000c.NOTd.AND11111000II、Questions(6questions,5scoresforeachquestion)1.What’sthedefinitionofanoperatingsystem?2.WhatarethesubsystemsofthevonNeumanncomputermodel?3.Namefourtypesofnetworkconnectingdevices.4.Definethethreeconstructsusedinstructuredprogramming.5.NamethelayersoftheOSImodel?6.What’stheformaldefinitionofanalgorithm?III、Calculation(5subjects,5scoresforeachsubject)1.Changethefollowing8-bittwo’scomplementnumberstodecimal.(1).1000000(2).01100100(3).11001000(4).11000011(5).110101012.Changethefollowingdecimalnumbersto8-bittwo’scomplementintegers,andthenconverttheresulttohexadecimal.(1).-48(2).25(3).-127(4).98(5).-553.Usingan8-bitallocation,firstconverteachofthefollowingnumberstotwo’scomplement,dotheoperation,andthenconverttheresulttohexadecimal.(1)35+63(2)35-63(3)-35+63(4)-35-63(5)63-1第2页共3页4.Showtheresultofthefollowingoperations,andthenconverttheresulttohexadecimal.(1)NOT129(2)15AND10(3)x55ORxAA(4)100AND255(5)(xFFXORxBB)AND(xFFORxBB)5.Changethe+12.625decimalnumberstobinarynumbers,andshowitin32-bitIEEEformat,andthenconverttheresulttohexadecimal.IV.AnalyzingandDesign(5subjects,5scoresforeachsubject)1.Usingthebubblesortalgorithm,manuallysortthefollowinglistandshowyourworkineachpass:12,6,78,31,50,46,99,2,20,442.Alistcontainsthefollowingelements.Usingthebinarysearchalgorithm,tracethestepsfollowedtofind66.Ateachstep,showthevaluesoffirst,lastandmid.2,5,18,28,30,40,66,1003Writeanalgorithminpseudocodetofindthesmallestofasetof10000numbers(thebiggestdatais255amongthenumbers).4.Writearecursivealgorithmtofindthecombinationofnobjectstakenkatatimeusingfollowingdefinition.C(n,k)=1,ifk=0orn=kC(n,k)=C(n-1,k)+(n-1,k-1),ifnk05.Imagingapowerplantthatpumpswatertoacityusingeightpumps(P8,P7,P6,P5,P4,P3,P2,andP1).Thestatesofthepumps(onoroff)canberepresentedby8-bitpattern.Forexample,thepattern10001111showsthatpumps1to4(fromright),and8areon(running)whilepumps5,6,and7areoff(shutdown).Howcanyoushutdownallpumps,aftertwominutes,letthepumpP2andP5running,andafteronehour,shutdowntheP2pumpandturnontheP6pumpsimultaneously,andremaintheP5runningtoo?