您好,欢迎访问三七文档
ComputerEnglishChapter3NumberSystemsandBooleanAlgebraKeypoints:Keypoints:uusefultermsanddefinitionssefultermsanddefinitionsofNumbersystemandBooleanofNumbersystemandBooleanAlgbraAlgbraDifficultpoints:Difficultpoints:CConversiononversionoftheoftheNumberNumberSystemsandSystemsandBooleanBooleanAlgbraAlgbraRequirements:Requirements:1.ConceptsofNumberSystemandtheirconversion2.BooleanAlgebra3.Moore’sLaw4.NewWords&Expressions:hexadecimaladj.;n.radixn.,octaladj.;n.alphabetn.fractionaladj.,wholenumbern.remaindern.significantfiguren.quotientn.algorithmn.complementn.carryn.3.1NumberSystemsAbbreviations:Binary-codedhexadecimal(BCH)Theuseofthemicroprocessorrequiresaworkingknowledgeofbinary,decimal,andhexadecimalnumberingsystems.Thissectionprovidesabackgroundforthosewhoareunfamiliarwithnumbersystems.Conversionsbetweendecimalandbinary,decimalandhexadecimal,andbinaryandhexadecimalaredescribed.3.1NumberSystemsBeforenumbersareconvertedfromonenumberbasetoanother,thedigitsofanumbersystemmustbeunderstood.Earlyinoureducation,welearnedthatadecimal,orbase10,numberwasconstructedwith10digits:0through9.Thefirstdigitinanynumberingsystemisalwaysazero.Forexample,abase8(octal)numbercontains8digits:0through7;abase2(binary)numbercontains2digits:0and1.3.1.1Digits—1010098()8072()20lIfthebaseofanumberexceeds10,theadditionaldigitsusethelettersofthealphabet,beginningwithanA,Forexample,abase12numbercontains12digits:0through9,followedbyAfor10andBfor11,Notethatabase10numberdoesnotcontaina10digit,justasabase8numberdoesnetcontainan8digit.Themostcommonnumberingsystemsusedwithcomputersaredecimal,binary,andhexadecimal(base16).(Manyyearsagooctalnumberswerepopular.)Eachsystemisdescribedandusedinthissectionofthechapter.3.1.1Digits10A121209A10B11101088(16)Oncethedigitsofanumbersystemareunderstood,largernumbersareconstructedbyusingpositionalnotation.Ingradeschool,welearnedthatthepositiontotheleftoftheunitspositionwasthetensposition,thepositiontotheleftofthetenspositionwasthehundredsposition,andsoforth.(Anexampleisthedecimalnumber132:Thisnumberhas1hundred,3tens,and2units.)Whatprobablywasnotlearnedwastheexponentialvalueofeachposition:Theunitspositionhasaweightof100or1;thetenspositionhasweightof101,or10;andthehundredspositionhasaweightof102,or100.3.1.2PositionalNotation(132,—)l00110110102l00Theexponentialpowersofthepositionsarecriticalforunderstandingnumbersinothernumberingsystems.Thepositiontotheleftoftheradix(numberbase)point,calledadecimalpointonlyinthedecimalsystem,isalwaystheunitspositioninanynumbersystem.Forexample,thepositiontotheleftofthebinarypointisalways20or1;thepositiontotheleftoftheoctalpointis80or1.Inanycase,anynumberraisedtoitszeropowerisalways1,ortheunitsposition.3.1.2PositionalNotation20180111Thepositiontotheleftoftheunitspositionisalwaysthenumberbaseraisedtothefirstpower;inadecimalsystem,thisisl01,orl0.Inabinarysystem,itis21,or2;andinanoctalsystemitis81,or8.Therefore,an11decimalhasadifferentvaluefroman11binary.The1ldecimaliscomposedof1tenplus1unitandhasavalueof11units;whilethebinarynumber11iscomposedof1twoplus1unit,foravalueof3decimalunits.The11octalhasavalueof9units.3.1.2PositionalNotation110110212818111111—1011111—2—13119Inthedecimalsystem,positionstotherightofthedecimalpointhavenegativepowers.Thefirstdigittotherightofthedecimalpointhasavalueof10-1,or0.1.Inthebinarysystem,thefirstdigittotherightofthebinarypointhasavalueof2-1,or0.5.Ingeneral,theprinciplesthatapplytodecimalnumbersalsoapplytonumbersinanyothernumbersystem.3.1.2PositionalNotation10-10.1,—2-10.5Example3-1showsa110.101inbinary(oftenwrittenas110.1012).Italsoshowsthepowerandweightorvalueofeachdigitposition.Toconvertabinarynumbertodecimal,addtheweightsofeachdigittoformitsdecimalequivalent.The110.1012isequivalenttoa6.625indecimal(4+2+0.5+0.125).Noticethatthisisthesumof22(or4)plus21(or2),but20(or1)isnotaddedbecausetherearenodigitsunderthisposition.Thefractionpartiscomposedof2-1(0.5)plus2-3(or.125),butthereisnodigitunderthe2-2(or.25).3.1.2PositionalNotation3-1110.101(110.1012)110.1016.625(4+2+0.5+0.125)22(4)21(2)20(1)2-1(0.5),2-3(0.125)2-2(0.25)Thepriorexampleshaveshownthattoconvertfromanynumberbasetodecimal,determinetheweightsorvaluesofeachpositionofthenumber,andthensumtheweightstoformthedecimalequivalent.Supposethata125.78octalisconvertedtodecimal.Toaccomplishthisconversion,firstwritedowntheweightsofeachpositionofthenumber.ThisappearsinExample3-2.Thevalueof125.78is85.875decimal,or1×64plus2×8plus5×1plus7×.125.3.1.3ConversiontoDecimal125.78()3-2125.7885.8751×64+2×8+5×1+7×0.125Noticethattheweightofthepositiontotheleftoftheunitspositionis8.Thisis8times1.Thennoticethattheweightofthenextpositionis64,or8times8.Ifanotherpositionexisted,itwouldbe64times8,or512.Tofindtheweightofthenexthigher-orderposition,multiplytheweightofthecurrentpositionbythenumberbase(or8,inthisexample).Tocalculatetheweightsofpositiontotherightoftheradixpoint,dividebythenumberbase.Intheoctalsystem,thepositionimmediatelytothefightoftheoctalpointis1/8,or.125.Thenextpositionis.125/8,or.015625,whichcanalsobewrittenas1/64.3.1.3
本文标题:《计算机专业英语》Number Systems and Boolean Algebra
链接地址:https://www.777doc.com/doc-6453289 .html