【文档说明】计算机基础_全英文版的课件分解.ppt,共(78)页,1.424 MB,由小橙橙上传
转载请保留链接:https://www.ichengzhen.cn/view-76470.html
以下为本文档部分文字说明:
“IntroductiontoComputerScience”计算机文化基础USTBComputerDepartment“IntroductiontoComputerScience”•Class:Total30hoursLecture16hours,Lab14h
ours•Grading:Finalexam70%Others30%•Website:http://ucb.ustb.edu.cn–Username:S学号–Password:123456•Instructo
r:TaohongZhangContact:waterswordzth@163.comContents•Chapter1:ComputersandDigitalBasics•Chapter2:ComputerHardwa
re•Chapter3:ComputerSoftware•Chapter4:OS•Chapter5:Network•Chapter6:CompressChapter1ComputersanddigitalbasicsWheny
ouhavecompletedthischapteryoushouldbeableto:•Definetheterm―computer‖,―microcomputer‖–knowthedigitalrevolution–knowthehistoryofcomputerdevel
opment–knowthetypeofcomputerandfunctionofcomputer–Differentiatebetweendataandinformation,analoganddi
gital–Describehowdigitaldevicesrepresentnumbers,text,images,andsoundmasternumberandcode.storageformofinformation•numbersystemandconversionofnumb
erSectionAallthingsdigitalTheDIGITALREVOLUTION•Whatisthedigitalrevolution?•Thedigitalrevolutionisanongoingprocessofsoci
al,political,andeconomicchangebroughtbydigitaltechnology.•Whattechnologiesarefuelingthedigitalrevolution?•Digitalelectronics,computers,c
ommunications,networks,theWeb,anddigitization•Whatcausedthesuddenupswingincomputerownership?•Thenetworkan
dtheWebDigitizationistheprocessofconvertingtext,numbers,sound,•Acomputernetworkisagroupofcomputerslinkedbywiredorwirele
sstechnologytosharedataandresources.•TheInternetisaglobalcomputernetwork•TheWeb(shortforWorldWideWeb)isacollectionoflinkeddocuments,graphics,and
soundsthatcanbeaccessedovertheInternet.SectionAallthingsdigitalConcepts:CONVERGENCE–Whatisconvergence?
(P.8ofE)–Howdoesconvergenceaffectthetypicalconsumer?–QualitySectionAallthingsdigitalDIGITALSOCIETYWhatisacomputer?(VonNeumann’sdefinition)
Acomputerisamultipurposedevicethatacceptsinput,processdata,storesdata,andproducesoutput,allaccordingtoaseriesofstoredinstructions(P14.)•Adopt
binarysystem•StoreInformationSectionBDigitalDevicesAcomputeracceptsinput•―Input‖:–Thewordsandsymbolsinadocument,–numb
ersforacalculation,–pictures,–temperaturesfromathermostat,–audiosignalsfromamicrophone,–andinstructionsforcompletingaprocess;•Anin
putdevicegathersandtranslatesinputintoaformthatthecomputercanprocess.–Keyboardisthemain(standard)inputdeviceSectionB
DigitalDevicesAcomputerproduceoutput•―output‖:resultsproducedbyacomputer–Reports–Documents–Graphs–Music•Themainoutputdevice:–monitor–pr
interSectionBDigitalDevicesAcomputerprocessesdata•data–referstothesymbolsthatrepresentfacts,objects,andideas•―processdata
‖:–Performingcalculations–Modifyingdocumentsandpictures–Sortinglistsofwordsornumbers(p15F.1-13)–Drawinggraphs,•Acomputerprocessesdataina
devicecalledthecentralprocessingunit(CPU)SectionBDigitalDevicesAcomputerstoresdata•―Storedata‖:performautomatically–Memory-datawai
tingtobeused–Storage-dataleftonapermanentbasiswhileitisnotneededforprocess•File-isanamedcollectionofdat
athatexistsonastoragemediumSectionBDigitalDevices•computerprogram---Theseriesofinstructionsthattellscomputerhowtocarryoutprocessin
gtasks.•Software--programs•Whatkindofsoftwaredocomputerrun?–Systemsoftware(P.16)–Applicationsoftware(P.16)Section
BDigitalDevicesWhat’ssosignificanttostoreinstructionsTheEvolutionofComputerHistory1.TheFirstGeneration-VacuumTubes(1946-1
956)(电子管)1946ENIAC(Electronicnumericalintegratorandcalculator)General-purposeelectronicdigitalcomputerWartimeneedsDecimalProgrammedmanually195
2EDVAC(TheVonNeumannMachine)(Electronicdiscretevariableautomaticcomputer)Stored-programconceptHadgener
alstructureandfunctionTheEvolutionofComputer•Weight:30t•Storage:80byte•Speed:5000/s1950sThebirthofComputerIndust
ryCommercialComputersIBM:Seriesof700/70002.TheSecondGeneration:Transistors(1957-1964)(晶体管)1947BellLabsinven
tedtransistorThelate1950sNCR,RCADeliverthenewtechnologyIBM7094Sizeofmemorygrewfrom2Kto32K.Memorycycletime
(thetimetoaccessonewordofmemory)fellfrom30µsto1.4µs.Note:1K=210=1024TheEvolutionofComputer3.TheThirdGeneration:
IntegratedCircuits(1965-1971)4.LaterGenerations(1972-至今)Large-scaleintegration(LSI):>1000componentsV
ery-large-scaleintegration(VLSI):>100,000componentsMicroprocessors:->microcomputer(pc)AllofthecomponentsofaCPUonasinglechipthedifferenceofcomput
erandmicrocomputer:1)microprocessor;2)busstructureTheEvolutionofComputer代次起止年份所用电子元器件数据处理方式运算速度应用领域第一代1946~1957电子管汇编语言、代码程序几千~几万次/秒国防及高科技第二代1958~
1964晶体管高级程序设计语言几万~几十万次/秒工程设计、数据处理第三代1965~1970中、小规模集成电路结构化、模块化程序设计、实时处理几十万~几百万次/秒工业控制、数据处理第四代1970~今大规模、超大规模集成电路分
时、实时数据处理、计算机网络几百万~上亿条指令/秒工业、生活等各方面计算机发展的四个阶段Chinese“神威”computer•384CPU•384,000,000,000/s•Memorysize48GB•Harddisksize2.5
TBTheFunctionsofComputerFunctions:SciencecomputationInformationdisposalProcesscontrolComputeraidedengineer(CAE)Artifici
alintelligence(AI)TheCategoryofComputerCategory(usage,cost,size,capability)commonlyusedcomputercategories1)Microcomputer(personalcompu
ter)2)servers3)Mainframes4)Supercomputers1.Personalcomputer•Microprocessor-basedcomputingdeviceforanindividualWorkstation:Twomeanings–1.anordinarype
rsonalcomputerconnectedtoanetwork–2.powerfuldesktopcomputersforhigh-performancetasks(suchasCAD)SectionBDigitalDevices2.Server•Servec
omputersonanetworksupplyingdataClient:requestsdatafromaserverisreferredtoasaclientSectionBDigitalDevices3.MainframeLa
rge,fast,expensive;Business,government;Providecentralizedstorage,processingandmanagementforlargeamountofdata;simu
ltaneouslyhandlethousandsofusers.SectionBDigitalDevices4.Supercomputer----thefastestcomputersintheworldFastest,mostex
pensive;Designedfor“computer-intensive”task,suchasmolecularcalculations,atmosphericmodelingorsimulatingnuclearexplosionsSectionBDigitalDevices计算机的分类数
字计算机模拟计算机数模混合计算机按处理对象按使用范围通用计算机专用计算机按规模……巨型计算机大/中型计算机小型计算机微型计算机工作站或服务器Datarepresentationbasic:•whatisdata?datareferstothesymbolsthatrepresentpe
ople,events,things,andideas.datacanbeaname,anumber,thecolorsinaphoto,orthenoteinamusicalcomposition.•ThedifferenceofDataandinformationdataisusedbymac
hine,suchascomputer;informationisusedbyhumans.SectionC.DigitalDataRepresentationDigitalDataRepresentation–Datarepresentation•theformd
ataisstored,processed,andtransmitted–Analoganddigital•thedifferencebetweenanaloganddigital–Digitaldataistext,numberthatco
nvertedintodiscretedigitssuchas0sand1s.–Analogdataisrepresentedusinganinfinitescaleofvalues.SectionCDigitalDataRepresentation1.Re
presentingnumber–NumericData•Numbersusedinarithmeticoperations–Binarynumbersystem•0and1SectionCDigitalDataRepresentationComputerstore,pr
ocessandtransmitdatawithbinaryformAcomputerusesabitasthebuildingblockformorecomplexmessages,whichareconstructedwithaseriesofbi
ts.•1bitcanconveytwounitsofinformation.SectionCDigitalDataRepresentation1.Representingnumberunitsofbin
arysystem1bit1byte=8bit1word=2byte1kB(byte)=210B1MB(MegaByte)=210KB1GB(GigaByte)=210MB1TB(Tricro)=210GBNumber(数制)SomeNotation:
•Base/radix(基数)•Digits(数字符号)•Weight(位权)数制基数数字符号十进制100,1,2,3,4,5,6,7,8,9二进制20,1八进制80,1,2,3,4,5,6,7十六进制160,1,2,3,4,5,
6,7,8,9,A,B,C,D,E,FSectionCDigitalDataRepresentationMultinomialunwrappedfromthenumberaccordingtotheweight
:1)TheDecimalSystem:(4723.75)10=4×103+7×102+2×101+3×100+7×10-1+5×10-22)TheBinarySystem:(11101.01)2=1×24+1×23+1×22+0×21+1×20+0×2-1+
1×2-2SectionCDigitalDataRepresentation1.Representingnumber3)ThehexadecimalsystemBase,orradixof16,digits(0,1,2,3,4,5,6,7,8,9,
A,B,C,D,E,F)S={...s2s1s0.s-1s-2s-3...}S=Sn-116n-1+Sn-216n-2+…+S1161+S0160+S-116-1+…+S-m16-mF1.3=15*161+1*160+3*16-1SectionCDi
gitalDataRepresentation1.Representingnumber4)TheoctalsystemBase,orradixof8,digits(0,1,2,3,4,5,6,7)S={...s2s1s0.s
-1s-2s-3...}S=Sn-18n-1+Sn-28n-2+…+S181+S080+S-18-1+…+S-m8-m23.3=2*81+7*80+3*8-183=?SectionCDigitalDataRepresentation1)Conversionbe
tweenBinaryandDecimalToconvertfromdecimaltobinary,theintegerandfractionalpartsarehandledseparately.NumberConversiona)
ConvertdecimalintegerNintobinaryform:N=(1×2k)+(Rk×2k-1)+...+(R3×22)+(R2×21)+(R1×20)RepeateddivisionEx.Decimal11Qu
otientRemainder11/2=515/2=212/2=101/2=01NumberConversion1011(11)10=(1011)2b)Fractionalpartinvolvedrepeatedmultiplication.F=(a-1×1/2)+(a-2×1/22)+(a-
3×1/23)+...Thisprocessisnotnecessarilyexact.Ex.Decimal0.81ProductIntegralPart.1100110.81×2=1.6210.62×2=1.2410.24×2=0.4800.48×2=0.9
600.96×2=1.9210.92×2=1.841(0.81)10=(0.110011)2,(approximate)Ex.Decimal0.25ProductIntegralpart0.25×2=0.500.50×2=1.010.251
0=0.01(exact)012)ConversionbetweenHexadecimalandDecimalBase16(0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F)0000=01000=80001=11001=90010=21010=A0011=31
011=B0100=41100=C0101=51101=D0110=61110=E0111=71111=FHexadecimalDecimalEx.1A16=(116×161)+(A16×160)=(110×161)+(101
0×160)=26BinaryHexadecimal110111100001=DE116DE13)ConversionbetweenOctalandDecimalBase8(0,1,2,3,4,5,6,7
)000=0001=1010=2011=3100=4101=5110=6111=7OctalDecimalEx.178=(18×81)+(78×80)=(8)+(7)=15BinaryOctal101111001=5718571整型数的存储•机器数:将一个数在机器中的
存储形式(即编码)称为机器数。•在计算机中带符号整数是采用补码表示的•带符号数的最高位用来表示数的符号,一般用“0”表示“+”,用“1”表示“-”。1.机器数与真值#ofBits---------816Range-------------
------------------------0255065,535整型数的原码、反码和补码正数:原码、反码、补码相同。符号位为0,数值为对应的二进制数。例如:+109[+109]原=[+109]反=[+109]补=01101101•原码:符号位
为1,数值为绝对值的二进制数。例:[-109]原=11101101•反码:将原码除符号位外,逐位取反。例:[-109]反=10010010•补码:将反码末位加1。例:[-109]补=10010011负数:ArithmeticandLogicRuleArithmetic加0+0=01
+0=0+1=11+1=10减0-0=01-0=11-1=00-1=1乘0*0=00*1=1*0=01*1=1除0/1=01/1=1Logic与0∧0=00∧1=01∧0=01∧1=1或0∨0=00∨1=11∨0=11∨1=1非非0为1非1为0ExampleofAri
thmeticandLogic•ex3:a=1100,b=0110a∨b、a∧b、ˉa110011001100∨0110∧0110逻辑非为:111001000011•ex1:101.01+110.011011.10ex2:101.111+11.0111001.0102.Representingsy
mbolsHowtodenotecharacter?a)ASCIIcoding(AmericanStandardCodeforInformationInterchange)uses7bitstorepres
ent27Symbols(128symbols),includinguppercaseandlowercaseletters,specialcontrolcodes,numerals,andpunctuations
ymbols.SectionCDigitalDataRepresentationASCIIRule•Onebyte(8bitsbinarycode)representsonecharacter0Thetopofbyt
eis―0‖Theothers(7bits)canhave128binarycodes.Ex:00000000-01111111Represent128characters.SectionCDigitalDataRepresentationASCII
RuleA为(01000001)2=65记住:0字符的ASCII码是48A字符的ASCII码是65a字符的ASCII码是97a与A的ASCII码之差是32b)Chinesecode:GB-2312•《信息交换
用汉字编码字符集——基本集》/GB2312-80•7445Chineseandgraphsymbol:common:202;sequence:60;number:22;English:52;Japan:169;Greek:48;Russia:66Chinese:6763
;(3755;3008)•TwobytesrepresenteachChineseorsymbol.SectionCDigitalDataRepresentation高八位低八位例如:“啊”的国标码为(3021)16―住”……(
5721)16汉字的编码各种代码之间的关系:汉字输入输入码(外码)国标码机内码输出码(字形码)汉字输出高位置“1”•包括:信息交换码(国标码)、机内码、输入码和输出码•机内码(亦称内码):汉字(符号)在计算机内部的二进制代码。输入码(外码)•输入码:汉字输入时使
用的编码。例如:“国”的输入码全拼:guo;五笔字形码:lgy;区位码:2590典型的输入码有:全拼、五笔字形、微软输入法、智能ABC输入法、搜狗拼音输入法、区位码等。输出码(字模、字型码)输出码:汉字输出时使用的编码。以点阵形式表示。如16×16点阵、24×24点阵、32×32点阵等
一个16×16点阵汉字输出码所占存储空间:16/8×16=32个字节16x16点阵汉字及编码24x24点阵汉字32x32点阵汉字Difference:1.Imagequality;2.Theamountrequiredtostoretheimage;3.Theamountoftim
erequiredtotransmittheimage4.Howeasytomodifytheimageandsoon3.RepresentingImagesSectionCDigitalDataRepresentationBitmapgraphicmethodofa
black-and-whiteimage–monochromegraphic1pixelcanberepresentedby1bit.GrayscalegraphicsGrayscalegraphic:displayabitmapimageusingshadesofgrayor―grayc
lasses‖(blackandwhitephotos)256-grayscalegraphic1pixelcanberepresentedby8bits.Afullscreen256-grayscalegraphicat640*480resolutionrequi
res307,200bytes.ColorgraphicsColorgraphic:displayabitmapimageusingcolor16color:1pixelcanhave16color
,need4bits256color:1pixelcanhave256color,need8bits16.7millioncolors(24-bitortrue-colorgraphic)color:need3bytestopresent:RedGree
nBluewidth:271height:300color:2size:9.9KBwidth:271height:300color:4size:19.8KBExampleofgraphSectionCDigitalDataRepresenta
tionwidth:271height:300color:256size:79.4KBwidth:271height:300color:truecolorsize:238.2KBExampleofgraphSectionCDigitalDataRepre
sentationComputationforstorage•Tostoreatruecolorimage–resolution352×288–Colorbyte3B–storage=352×288×3=297KB•Ifenhanceimageresoluti
on–storage=768×1024×3=2.25MBDecreasethegraphicstorageandtransmissiontimeApproximator:Makinganimagephysicallysmallerbyshrinkingitorcropp
ingitwilldecreasethenumberofpixelsrequiredtorepresentthegraphic.Compression:Sizeofgraphicfilecanbereducedbytechni
queknownascompressionDithering:reducethenumberofcolorsinagraphic.VectorgraphicandDigitalVideoVectorgraphic
Differencebetweenvectorgraphicandbitmapgraphic?vectorgraphic:consistofasetofinstructionsthatrecreatesapicture.Youcanu
sevectorgraphicssoftwaretodrawapicture,CIRCLE40Y200150means:createacirclewith40pixelsradius,colorityellow,andplacethecenterofthecircle
200pixelsfromtheleftofthescreenand150pixelsfromthetopofthescreenDigitalvideoComposedofaseriesofframes.Eachframeisastillpicture.Avideodisplay30fram
espersecond.Waveformaudio:adigitalrepresentationofsound.Torecordsound,samplesofthesoundarecollectedatperiodic
intervalsandstoredasnumericdata.Samplingrate:thenumberoftimespersecondthatthesoundismeasuredduringtherecordingprocess.Expressedinhe
rtz(Hz)4.RepresentingAudioExampleofAudioencode采样点t1t2t3t4t5t6t7...幅值0011010101111001101111011110...Analogsignalstechniqueparam
eterSamplingrate(Hzex:11.025kHz/22.05kHz)Samplingprecision(bitex:8bits/16bits)Tracknumber(single、double)采样频率11KHz8位量化采样频率22KHz16位量化
Circuitsandchips•What’sacomputerchip?thetermscomputerchip,microchip,andchiporiginatedastechnicaljargonforintegrate
dcircuit.SectionCDigitalDataRepresentation–integratedcircuitisansuper-thinsliceofsemiconductingmaterialpackedwithmicroscopiccircuitelements,suchaswir
es,transistors,capacitors,logicgates,andresistors.(p27f1-30)SectionD.DigitalprocessingProgramsandinstructionsets:•Howdodigitaldevicespro
cessdata?–Thedataismanipulatedunderthecontrolofacomputerprogram.–Thehuman-readableversionofaprogramiscalledsourcecode.
Howdoessourcecodegetconverted?Theprocedurefortranslatingsourcecodeinto0sand1scanbeaccomplishedbyacompileroraninte
rpreter.–Acompilerconvertsallthestatementsinaprograminasinglebatch,andtheresultingcollectionofinstruct
ions,calledobjectcode,isplacedinanewfile.(p30f1-34)DigitalprocessingSectionDDigitalProcessing•“语言”是人机交流的工具•程序是用“语言”写成的
计算机可以识别的“文章”•用于编写计算机可以执行的程序的语言称为程序设计语言机器语言机器指令0或1代码与语言习惯差别很大难以学习和记忆依赖机器的类型汇编语言用助记符代替机器代码;用变量代替各类地址克服记忆的难点其他与假期语言类似高级语言类似数学语言、接近自然
语言、具有通用性和可移植性、不依赖具体的计算机类型高级程序的编译运行方式可执行程序编译程序高级语言程序目标程序连接程序编译连接Compiler–Aninterpreterconvertsandexecutesonestatementatatimewhiletheprogramisrunning.执
行解释程序高级语言程序解释Interpreter高级程序的解释运行方式•Whatdoestheconversionprocessproduce?–Instructionset:collectionofpreprogra
mmedactivitiesisdesignedtobegeneralpurposesothatprogrammerscanuseitincreativewaysforthewidevarietyoftasksperformedbyallkindso
fdigitaldevices.–Instruction:eachinstructionhasacorrespondingsequenceof0sand1s.E.gadd----00000100–Machinelanguage:canbedirec
tlyexecutedbytheprocessor’scircuitryDigitalprocessing•Amachinecodeinstructionhastwoparts:theopcodeandtheoperand.•Eg:ins
truction:add10000010000000001DigitalprocessingOpcodeOperand•P31f1-36Components:ProgramControlCentralProcessingUnitA
rithmetic–LogicUnit(ALU)MainmemoryI/OEquip-mentregisterProcessorlogicProcessorlogic•Whathappenswhenacomputerexecutesaninstruction?(p32
f1-38)1.Fetchinstruction4.Incrementpointertothenextinstruction3.Executeinstruction2.Interpretinstruc
tion•Whatroledoesthecontrolunitplay?(p32f1-39)Processorlogic•WhatdoestheALUswingintoaction?(p32f1-40)