资源描述
HowComputerWorks?,ByMark2011August,WhatistheInputdata?,WhatInputtoHumanBrainVideo,Audio,LanguageWhatinputtoCPUVideo,Audio,Language,Howtodescribeinformation,TextVideoAudioNumber,Digitalbits0,1,Allinformationisrepresentedusingbinarynumbers:01001000111,HighandLow,5V,0V,High,Low,High:1Low:0,論理回路記号(LogicCircuit),論理積(AND),論理和(OR),排他的論理和(XOR),否定(NOT),ExclusiveOR,x,y,z,x,y,z,論理積(AND),論理和(OR),排他的論理和(XOR),否定(NOT),2入力違、出力12者不同时,输出1,x,y,z,x,z,x,y,z,x,y,z,NAND,NOR,AND+NOT,OR+NOT,x,y,z,x,y,z,AND,OR,内部電子回路?,10,5V0V,電圧対応,x,y,z,AND,練習問題1,x,y,z,t,t,t,0V,0V,0V,5V,5V,5V,練習問題2,x,y,z,t,t,t,0V,0V,0V,5V,5V,5V,x,y,z,論理和(OR),練習問題3,x,y,z,t,t,t,0V,0V,0V,5V,5V,5V,排他的論理和(XOR),x,y,z,Whyusebinarynumber,Onesignalcandescribe1/0=2statesNsignalscandescribe2x2x22=2nCanbecalculate(+-*/),在电路上用n根信号线可以表示2n种状态.,0000STOP0001RUN0010PAUSE,BitCombinations,Eachadditionalbitdoublesthenumberofpossiblecombinations,BitCombinations,EachcombinationcanrepresentaparticularitemThereare2NcombinationsofNbitsTherefore,Nbitsareneededtorepresent2Nuniqueitems,21=2items,22=4items,23=8items,24=16items,25=32items,Howdoescomputerknowtext,Hi,Heather.,Englishcharacter-ASCIIcode(1byte)汉字-2bytecode,进位,Add,ABS,C,2進数半加算器,半加算器,B1,A1,S1,C2,加算値,桁上,練習問題,全加算器,B3,A3,S3,C,全加算器,B2,A2,S2,C3,半加算器,B1,A1,S1,C2,桁上,2進数全加算器,A2,B2,C2,S2,C3,全加算器,B2,A2,S2,C3,C2,XOR,XOR,AND,AND,OR,進数進数進数,進数,進数,進数,基数,桁数字,進数,整数進数,小数進数,進数,進数進数変換,整数場合,StoringInformation,927892799280928192829283928492859286,10011010,KB210=1024,MB220(over1million),GB230(over1billion),TB240(over1trillion),kilobytemegabytegigabyteterabyte,TheCentralProcessingUnit(CPU),ACPUisonachipcalledamicroprocessorItcontinuouslyfollowsthefetch-decode-executecycle:,TheCentralProcessingUnit,TheCPUcontains:,Arithmetic/LogicUnit,Registers,ControlUnit,Smallstorageareas,Performscalculationsandmakesdecisions,Coordinatesprocessingsteps,実行直前,Commandregister,contentsindex,00,000,00000,00000,Arithmetic,Commanddecode,Indexregister,5bitsCPU,Computersonlyknowbinarynumbers,CPU,MainMemory,StepbyStep,実行第段階,命令,番地,01,101,01101,00000,累算器,命令呼出、解読,Load,命令解読器,番地,000LoadA(A累算器持),CPUinstructions,1.CPUinstructionsmachinelanguage0001110101012.HowtotellcomputertodoComputersonlyacceptbinarybits.(machinelanguage)3.assemblylanguageeasytounderstandbyhumanassemblylanguage:machinelanguage=1:14.highlevellanguage,ADD=20SUB=21LD=14,X=5;Y=x+5;,Software(Program),CPUinstructionsTellcomputerwhattodoCommonprogramlanguageC,C+,VC,VB,JAVA,PHP,
展开阅读全文