首页 《计算机专业英语》电子教案-孙建忠 第3章

《计算机专业英语》电子教案-孙建忠 第3章

举报
开通vip

《计算机专业英语》电子教案-孙建忠 第3章ComputerEnglishChapter3NumberSystemsandBooleanAlgebraChapter3NumberSystemsandBooleanAlgebraKeypoints:usefultermsanddefinitionsofNumbersystemandBooleanAlgbraDifficultpoints:ConversionoftheNumberSystemsandBooleanAlgbraChapter3NumberSystemsandBooleanAlgebraRequir...

《计算机专业英语》电子教案-孙建忠 第3章
ComputerEnglishChapter3NumberSystemsandBooleanAlgebraChapter3NumberSystemsandBooleanAlgebraKeypoints:usefultermsanddefinitionsofNumbersystemandBooleanAlgbraDifficultpoints:ConversionoftheNumberSystemsandBooleanAlgbraChapter3NumberSystemsandBooleanAlgebraRequirements:1.ConceptsofNumberSystemandtheirconversion2.BooleanAlgebra3.Moore’sLaw4.科技英语中 数学 数学高考答题卡模板高考数学答题卡模板三年级数学混合运算测试卷数学作业设计案例新人教版八年级上数学教学计划 公式的读法Chapter3NumberSystemsandBooleanAlgebraNewWords&Expressions:hexadecimaladj.十六进制的;n.十六进制 radixn.根,基数octaladj.八进制的;n.八进制 alphabetn.字母 关于同志近三年现实表现材料材料类招标技术评分表图表与交易pdf视力表打印pdf用图表说话 pdf fractionaladj.分数的,小数的 wholenumbern.整数remaindern.余数 significantfiguren.有效数字quotientn.商 algorithmn.算法complementn.补码,余角 carryn.进位3.1NumberSystemsAbbreviations:Binary-codedhexadecimal(BCH)二进制编码的十六进制Chapter3NumberSystemsandBooleanAlgebraTheuseofthemicroprocessorrequiresaworkingknowledgeofbinary,decimal,andhexadecimalnumberingsystems.Thissectionprovidesabackgroundforthosewhoareunfamiliarwithnumbersystems.Conversionsbetweendecimalandbinary,decimalandhexadecimal,andbinaryandhexadecimalaredescribed.3.1NumberSystems使用微处理器需要掌握二进制、十进制和十六进制数制系统的基本知识,本节为那些不熟悉数制系统的读者提供这方面的背景知识。说明了十进制与二进制之间、十进制与十六进制之间,及二进制与十六进制之间的转换。Chapter3NumberSystemsandBooleanAlgebraBeforenumbersareconvertedfromonenumberbasetoanother,thedigitsofanumbersystemmustbeunderstood.Earlyinoureducation,welearnedthatadecimal,orbase10,numberwasconstructedwith10digits:0through9.Thefirstdigitinanynumberingsystemisalwaysazero.Forexample,abase8(octal)numbercontains8digits:0through7;abase2(binary)numbercontains2digits:0and1.3.1.1Digits将数从—种数制向另一种数制转换之前,必须了解数的计数系统。在早期教育中,我们已学习了十进制数,或以10为基的数,它由10个数字组成:0到9。任何计数制的第一个数字总是零,这种规则适用于任何其他数制。例如,以8为基的数(八进制)包含8个数字:0到7,而以2为基的数(二进制)包含2个数字:0和l。Chapter3NumberSystemsandBooleanAlgebraIfthebaseofanumberexceeds10,theadditionaldigitsusethelettersofthealphabet,beginningwithanA,Forexample,abase12numbercontains12digits:0through9,followedbyAfor10andBfor11,Notethatabase10numberdoesnotcontaina10digit,justasabase8numberdoesnetcontainan8digit.Themostcommonnumberingsystemsusedwithcomputersaredecimal,binary,andhexadecimal(base16).(Manyyearsagooctalnumberswerepopular.)Eachsystemisdescribedandusedinthissectionofthechapter.3.1.1Digits如果基数大于10,其余数字用从A开始的字母表示,例如,以12为基的数包含12个数字,0到9,之后用A代表10,B代表11。注意,以10为基的数不包含数字10,如同以8为基的数不包括数字8一样。计算机中最通用的计数制是十进制、二进制、八进制和十六进制(基为16)。每种计数制都将在本节中进行说明和应用。Chapter3NumberSystemsandBooleanAlgebraOncethedigitsofanumbersystemareunderstood,largernumbersareconstructedbyusingpositionalnotation.Ingradeschool,welearnedthatthepositiontotheleftoftheunitspositionwasthetensposition,thepositiontotheleftofthetenspositionwasthehundredsposition,andsoforth.(Anexampleisthedecimalnumber132:Thisnumberhas1hundred,3tens,and2units.)Whatprobablywasnotlearnedwastheexponentialvalueofeachposition:Theunitspositionhasaweightof100or1;thetenspositionhasweightof101,or10;andthehundredspositionhasaweightof102,or100.3.1.2PositionalNotation一旦我们理解了计数制的数字后,就可用位计数法构造更大的数值。在小学时我们都学过个位的左边一位是十位,十位左边一位是百位,以此类推(例如十进制数132,这个数字有—个百,三个十和两个一)。或许我们没有学过每个位的指数值:个位的权为l00,即1;十位的权为101或10;而百位的权为102或l00。Chapter3NumberSystemsandBooleanAlgebraTheexponentialpowersofthepositionsarecriticalforunderstandingnumbersinothernumberingsystems.Thepositiontotheleftoftheradix(numberbase)point,calledadecimalpointonlyinthedecimalsystem,isalwaystheunitspositioninanynumbersystem.Forexample,thepositiontotheleftofthebinarypointisalways20or1;thepositiontotheleftoftheoctalpointis80or1.Inanycase,anynumberraisedtoitszeropowerisalways1,ortheunitsposition.3.1.2PositionalNotation位的指数幂在理解其他计数制中的数时是个关键。基数小数点,在十进制中称为十进制小数点,其左边的位在任何数制中都是个位。例如,二进制小数点左边的位是20或1。而八进制小数点左边的位是80或1。在任何情况下,任何数的零次幂总是1,或1个单位。Chapter3NumberSystemsandBooleanAlgebraThepositiontotheleftoftheunitspositionisalwaysthenumberbaseraisedtothefirstpower;inadecimalsystem,thisisl01,orl0.Inabinarysystem,itis21,or2;andinanoctalsystemitis81,or8.Therefore,an11decimalhasadifferentvaluefroman11binary.The1ldecimaliscomposedof1tenplus1unitandhasavalueof11units;whilethebinarynumber11iscomposedof1twoplus1unit,foravalueof3decimalunits.The11octalhasavalueof9units.3.1.2PositionalNotation个位左边的位总是基数的1次幂,在十进制系统中是101,或10;在二进制中是21,或2;而在八进制中是81,或8。因此,十进制的11与二进制的11具有不同的数值。十进制11表示—个10加上一个1,其值为11;二进制11表示—个2加上—个1,其值为3;八进制11的值为9。Chapter3NumberSystemsandBooleanAlgebraInthedecimalsystem,positionstotherightofthedecimalpointhavenegativepowers.Thefirstdigittotherightofthedecimalpointhasavalueof10-1,or0.1.Inthebinarysystem,thefirstdigittotherightofthebinarypointhasavalueof2-1,or0.5.Ingeneral,theprinciplesthatapplytodecimalnumbersalsoapplytonumbersinanyothernumbersystem.3.1.2PositionalNotation在十进制系统中,对于十进制小数点右边的位,它的幂为负数。十进制小数点右边第一位数的值为10-1,或0.1。在二进制中,二进制小数点右边第—位数的值为2-1或0.5。一般来说,十进制使用的计数法可以用于任何其他数制。Chapter3NumberSystemsandBooleanAlgebraExample3-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.2PositionalNotation例3-1给出了一个二进制数110.101(通常写成110.1012),也给出了这个数每个位的幂、权和值。为了把二进制数转换为十进制,将每位数字的权相加,就得到了它的等效十进制值。二进制110.101等于十进制的6.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)。Chapter3NumberSystemsandBooleanAlgebraThepriorexampleshaveshownthattoconvertfromanynumberbasetodecimal,determinetheweightsorvaluesofeachpositionofthenumber,andthensumtheweightstoformthedecimalequivalent.Supposethata125.78octalisconvertedtodecimal.Toaccomplishthisconversion,firstwritedowntheweightsofeachpositionofthenumber.ThisappearsinExample3-2.Thevalueof125.78is85.875decimal,or164plus28plus51plus7.125.3.1.3ConversiontoDecimal前面的例子说明了将任何其他基数的数转换为十进制数时,十进制数的值取决于该数每个位上的权或值,它们的和就是等效的十进制数值。假定要将125.78(八进制)转换为十进制。为了完成这个转换,首先写出该数每一位数的权,如例3-2所示,125.78的值是十进制的85.875,即164+28+51+70.125。Chapter3NumberSystemsandBooleanAlgebraNoticethattheweightofthepositiontotheleftoftheunitspositionis8.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.3ConversiontoDecimal注意,该数个位左边那位的权是8(18)。再前一位的权是64(88)。如果存在更前一位,则其权将是512(648)。将当前位的权乘上基数,就可得到更高一位的权(本例中是乘8)。而计算小数点右边那些位的权,需要用基数去除。在八进制中,紧跟八进制小数点右边的那位的权是1/8,即0.125。下一位是0.125/8,即0.015625,也可以写成1/64。Chapter3NumberSystemsandBooleanAlgebraHexadecimalnumbersareoftenusedwithcomputers.A6A.CH(Hforhexadecimal)isillustratedwithitsweightsinExample3-3.Thesumofitsdigitsis106.75,or106.Thewholenumberpartisrepresentedwith616plus10(A)1.Thefractionpartis12(C)asanumeratorand16(16-1)asthedenominator,or12/16,whichisreducedto3/4.3.1.3ConversiontoDecimal计算机经常使用十六进制。例3-2给出了一个十六进制数6A.CH(H表示十六进制),以及它的权。它的各位数值之和是106.75,即106。整数部分用616加10(A)1表示;分数部分用12(C)作为分子,16作为分母(16-1),或表示为12/16,化简得3/4。Chapter3NumberSystemsandBooleanAlgebraConversionsfromdecimaltoothernumbersystemsaremoredifficulttoaccomplishthanconversiontodecimal.Toconvertthewholenumberportionofanumbertodecimal,dividebytheradix.Toconvertthefractionalportion,multiplybytheradix.3.1.4ConversionFromDecimal由十进制转换成其他进制比由其他进制转换成十进制困难。转换十进制整数部分时,要用基数去除,转换分数部分时,要用基数去乘它们。Chapter3NumberSystemsandBooleanAlgebraWholeNumberConversionfromDecimal.Toconvertadecimalwholenumbertoanothernumbersystem,dividebytheradixandsavetheremaindersassignificantdigitsoftheresult.Analgorithmforthisconversionasisfollows:1.Dividethedecimalnumberbytheradix(numberbase).2.Savetheremainder(firstremainderistheleastsignificantdigit),3.Repeatsteps1and2untilthequotientiszero.3.1.4ConversionFromDecimal转换十进制整数部分将十进制整数转换成其他数制时,要用基数去除,并且保存余数,作为结果的有效数字。这种转换的算法如下:1.用基数除十进制数。2.保存余数(最先得到的余数是最低有效位数字)。3.重复步骤l和2,直到商为零。Chapter3NumberSystemsandBooleanAlgebraConvertingfromaDecimalFraction.Conversionfromdecimalfractiontoanothernumberbaseisaccomplishedwithmultiplicationbytheradix.Forexample,toconvertadecimalfractionintobinary,multiplyby2.Afterthemultiplication,thewholenumberportionoftheresultissavedasasignificantdigitoftheresult,andthefractionalremainderisagainmultipliedbytheradix.Whenthefractionremainderiszero,multiplicationends.Notethatsomenumbersarenever-ending.Thatis,azeroisneveraremainder.Analgorithmforconversionfromadecimalfractionisasfollows3.1.4ConversionFromDecimal转换十进制小数部分转换10进制小数部分是用基数乘来完成的。例如,要将十进制小数转换成二进制,要用2乘。乘法之后,乘积的整数部分保存起来作为结果的一个有效位,剩余的小数再用基数2去乘。当剩余的小数部分为0时,乘法结束。有些数可能永远不会结束,即余数总不为0。转换十进制小数部分的算法如下:Chapter3NumberSystemsandBooleanAlgebra1.Multiplythedecimalfractionbytheradix(numberbase).2.Savethewholenumberportionoftheresult(evenifzero)asadigit.Notethatthefirstresultiswrittenimmediatelytothefightoftheradixpoint.3.Repeatsteps1and2,usingthefractionalpartofstep2untilthefractionalpartofstep2iszero.3.1.4ConversionFromDecimal1.用基数乘十进制小数。2.保存结果的整数部分(即使是零)作为一位数。注意,第一个得到的结果写在紧挨着小数点的右边。3.用步骤2的小数部分重复步骤l和2,直到步骤2的小数部分是零。Chapter3NumberSystemsandBooleanAlgebraBinary-codedhexadecimal(BCH)isusedtorepresenthexadecimaldatainbinarycode.Abinary-codedhexadecimalnumberisahexadecimalnumberwrittensothateachdigitisrepresentedbya4-bitbinarynumber.ThevaluesfortheBCHdigitsappearinTable3--1.HexadecimalnumbersarerepresentedinBCHcodebyconvertingeachdigittoBCHcode,withaspacebetweeneachcodeddigit.3.1.5Binary-CodedHexadecimal二进制编码的十六进制(BCH)是用二进制编码表示的十六进制数据,二进制编码的十六进制数是将十六进制数的每一位都用4位二进制数表示。表3-1给出了BCH数的值。用BCH表示十六进制数时,将每个十六进制数字都转换成BCH码,并且每个数位之间用空格分开。Chapter3NumberSystemsandBooleanAlgebraThepurposeofBCHcodeistoallowabinaryversionofahexadecimalnumbertobewritteninaformthatcaneasilybeconvertedbetweenBCHandhexadecimal.Example3-8showsaBCHcodednumberconvertedbacktohexadecimalcode.3.1.5Binary-CodedHexadecimalBCH码的目的在于能将十六进制数以二进制的形式写出,使BCH与十六进制之间转换很容易。例3-8表示如何将BCH代码数据转换为十六进制码。Chapter3NumberSystemsandBooleanAlgebraAttimes,dataarestoredincomplementformtorepresentnegativenumbers.Therearetwosystemsthatareusedtorepresentnegativedata:radixandradix-1complements.Theearliestsystemwastheradix-1complement,inwhicheachdigitofthenumberissubtractedfromtheradix-1togeneratetheradix-1complementtorepresentanegativenumber.3.1.6Complements有时,数据以补码的形式存储,以便表示负数。有两种表示负数的方式:补码和反码(基数减l的补),最早的方式是反码。为了得到负数的反码表示,用基数-1减去该数的每一个数位上的数字。Chapter3NumberSystemsandBooleanAlgebraExample3-9showshowthe8-bitbinarynumber01001100isone's(radix-1)complementedtorepresentitasanegativevalue.Noticethateachdigitofthenumberissubtractedfromonetogeneratetheradix-1(one's)complement.Inthisexample,thenegativeof01001100is10110011.Thesametechniquecanbeappliedtoanynumbersystem,asillustratedinExample3-10,inwhichthefifteen's(radix-l)complementofa5CDhexadecimaliscomputedbysubtractingeachdigitfromafifteen.3.1.6Complements例3-9表示了如何将8位二进制数01001100对l取补(基数减1的补),以便表示成—个负数。注意,用1减去该数的每一位数字,以便生成反码。在此例中,01001100的负数是10110011。同样的技术可适用于任何数制。如例3-10所示,十六进制数5CD的反码是从15(基-1)中减去它的每一位数字得到的。Chapter3NumberSystemsandBooleanAlgebraToday,theradix-1complementisnotusedbyitself;itisusedasastepforfindingtheradixcomplement.Theradixcomplementisusedtorepresentnegativenumbersinmoderncomputersystems.(Theradix-1complementwasusedintheearlydaysofcomputertechnology.)Themainproblemwiththeradix-1complementisthatanegativeorapositivezeroexists;intheradixcomplementsystem,onlyapositivezerocanexist.3.1.6Complements如今,反码已不单独使用,而作为求补码的一个步骤使用,补码是当代计算机系统表示负数的方法(反码用于早期的计算技术中)。反码的主要问题是它存在负零或者正零,而补码系统中只能存在正零。Chapter3NumberSystemsandBooleanAlgebraToformtheradixcomplement,firstfindtheradix-1complement,andthenaddaonetotheresult.Example3-11showshowthenumber01001000isconvertedtoanegativevaluebytwo's(radix)complementingit.3.1.6Complements为得到补码,先求反码,然后将1加到结果上。例3-11表示了如何通过对2(基为2)取补的方式,将数01001000转换成负数。Chapter3NumberSystemsandBooleanAlgebraToprovethata01001000istheinverse(negative)ofa10110111,addthetwotogethertoforman8-digitresult.Theninthdigitisdroppedandtheresultiszerobecausea0l00100isapositive72,whilea10110111isanegative72.Thesametechniqueappliedtoanynumbersystem.Example3-12showshowtheinverseofa345hexadecimalisfoundbyfirstfifteen'scomplementingthenumber,andthenbyaddingonetotheresulttoformthesixteen’scomplement.Asbefore,iftheoriginal3-digitnumber345isaddedtotheinverseofCBB,theresultisa3-digit000.Asbefore,thefourthbit(carry)isdropped.Thisprovesthat345istheinverseofCBB.3.1.6Complements为验证01001000是10111000的反(负数),将两者相加得到一个8位结果。去掉第9位数字,结果是零。因为01001000是正数72,而10110111是负数72。同样的枝术可用于任何数制。例3-12表示如何求十六进制数345的负数,首先求该数15的补,然后将1加到结果上,得到16的补,同前面类似,如把原来的3位数345加上其负数CBB,则结果是3位000,第4位(进位)被丢掉。这证明了345是CBB的反。Chapter3NumberSystemsandBooleanAlgebraTheconceptofaBooleanalgebrawasfirstproposedbytheEnglishmathematicianGeorgeBoolein1847.Sincethattime,Boole’soriginalconceptionhasbeenextensivelydevelopedandrefinedbyalgebraistsandlogicians.TherelationshipsamongBooleanalgebra,setalgebra,logic,andbinaryarithmetichavegivenBooleanalgebrasacentralroleinthedevelopmentofelectronicdigitalcomputers.3.2BooleanAlgebra布尔代数的概念最初是由英国数学家GeorgeBoole于1847年提出来的,从那时起,代数学家和逻辑学家们更广泛地发展了Boole最初的概念,并使之更加精练。由于布尔代数、集合代数、逻辑学和二进制算术之间的内在联系,使得布尔代数的理论在电子计算机的发展中起到举足轻重的作用。Chapter3NumberSystemsandBooleanAlgebraThemostintuitivedevelopmentofBooleanalgebrasarisesfromtheconceptofasetalgebra.LetS={a,b,c}andT={a,b,c,d,e}betwosetsconsistingofthreeandfiveelements,respectively.WesaythatSisasubsetofT,sinceeveryelementofS(namely,a,b,andc)belongstoT.SinceThasfiveelements,thereare25subsetsofT,forwemaychooseanyindividualelementtobeincludedoromittedfromasubset.Notethatthese32subsetsincludeTitselfandtheemptyset,whichcontainsnoelementsatall.IfTcontainsallelementsofconcern,itiscalledtheuniversalset.GivenasubsetofT,suchasS,wemaydefinethecomplementofSwithrespecttoauniversalsetTtoconsistofpreciselythoseelementsofTwhicharenotincludedinthegivensubset.3.2BooleanAlgebra布尔代数最直觉的发展产生于集合代数的概念。设S={a,b,c}和T={a,b,c,d,e}分别为两个含有三个和五个元素的集合。由于S中的每一个元素(a,b,c)都属于T,所以我们说S是T的一个子集。由于T有五个元素,因而T共有25个子集,这是因为我们可以选择任何一个元素使其包含于某个子集中或从该子集中删除。应该注意到这32个子集中包含T本身和空集(空集即不含任何元素的集合)。如果T包含了所讨论的所有元素,则称之为全集。给定T的一个子集,例如子集S,我们可以定义一个关于全集T的S的补集。其中正好包含那些不在子集S中而在T中的元素。Chapter3NumberSystemsandBooleanAlgebraThus,Sasabovedefinedhasitscomplement(withrespecttoT).Theunionofanytwosets(subsetsofagivenset)consistsofthoseelementsthatareinoneortheotherorinbothgivensets;theintersectionoftwosetsconsistsofthoseelementsthatareinbothgivensets.Weusethesymbol∪todenotetheunion,and∩todenotetheintersectionoftwosets.Forexample,ifB={b,d,e},thenB∪S={a,b,c,d,e},andB∩S={b}.3.2BooleanAlgebra于是,如上定义的集合S就有一个它的补集(相对于集合T)。任何两个集合(已给定集合的若干子集)的并集包含了出现于这两个子集中某一个集合或同时出现于这两个集合中的所有元素;两个集合的交集包含了同时出现于这两个集合中的元素。我们用符号“∪”来表示两个集合的“并(运算)”,用“∩”来表示两个集合的“交(运算)”。例如,如果B={b,d,e},那么,B∪S={a,b,c,d,e},B∩S={b}。Chapter3NumberSystemsandBooleanAlgebraWhileothersetoperationsmaybedefined,theoperationsofcomplementationunionandintersectionareofprimaryinteresttous.ABooleanalgebraisafiniteorinfinitesetofelementstogetherwiththreeoperations—negation,addition,andmultiplication—thatcorrespondtothesetoperationsofcomplementation,union,andintersection,respectively.AmongtheelementsofaBooleanalgebraaretwodistinguishedelements:0,correspondingtotheemptyset;and1,correspondingtotheuniversalset.3.2BooleanAlgebra虽然我们可以定义其他一些集合运算,但求补、并和交运算是我们最感兴趣的三个集合运算。一个布尔代数就是一个有限集或无限集,以及建立在该有限集或无限集上的三种运算——否定、加或乘,这三个运算分别对应于集合的求补、并和交运算。在布尔代数的元素中有两个特殊的元素:0,对应于空集;1,对应于全集。Chapter3NumberSystemsandBooleanAlgebraForanygivenelementofaBooleanalgebra,thereisauniquecomplementa'withthepropertythata+a'=1andaa'=0.Booleanadditionandmultiplicationareassociativeandcommutative,asareordinaryadditionandmultiplication,butotherwisehavesomewhatdifferentproperties.TheprincipalpropertiesaregiveninTable3-2,wherea,b,andcareanyelementsofaBooleanalgebra.3.2BooleanAlgebra对于一个布尔代数中任意给定元素a,都有一个唯一的补a,它满足a+a=1和aa=0。布尔加和布尔乘与普通的加和乘一样,满足结合律和交换律,但除此之外含有一些不太相同的特性。其主要特性由表3-2给出,其中a,b和c是一个布尔代数中的任意元素。Chapter3NumberSystemsandBooleanAlgebra3.2BooleanAlgebra Table3-2 Distributivity分配律 a(b+c)=ab+aca+(bc)=(a+b)(a+c) Idempotency同一律 a+a=aaa=a Absorptionlaws吸收律 a+ab=aa(a+b)=a DeMorgan’slaws德摩根定理 (a+b)'=a'b'(ab)'=a'+b'Chapter3NumberSystemsandBooleanAlgebraSinceafinitesetofnelementshasexactly2nsubsets,anditcanbeshownthatthefiniteBooleanalgebrasarepreciselythefinitesetalgebras,eachfiniteBooleanalgebraconsistsofexactly2nelementsforsomeintegern.Forexample,thesetalgebraforthesetTdefinedabovecorrespondstoaBooleanalgebraof32elements.3.2BooleanAlgebra由于n个元素的有限集有且只有2n个子集,而且很显然有限布尔代数一定是有限集合代数,所以对某个整数n而言,每个有限布尔代数也有且只有2n个元素。例如,上文定义的集合T的集合代数就对应一个有32个元素的布尔代数。Chapter3NumberSystemsandBooleanAlgebraWhileitispossibletouseadifferentsymboltodenoteeachelementofaBooleanalgebra,itisoftenmoreusefultorepresentthe2nelementsofafiniteBooleanalgebrabybinaryvectorshavingncomponents.WithsucharepresentationtheoperationsoftheBooleanalgebraareaccomplishedcomponentwisebyconsideringeachcomponentasanindependenttwo-elementBooleanalgebra.Thiscorrespondstorepresentingsubsetsofafinitesetbybinaryvectors.3.2BooleanAlgebra虽然我们可以用不同的符号来表示布尔代数中的每一个元素,但最常用的方法是用一个有n个分量的二进制向量来表示一个有限布尔代数的2n个元素。用这样一种表示方法,布尔代数的所有运算都以分量的形式完成,而每一个分量被认为是一个独立的二值布尔代数。这种做法对应于用二进制向量来表示一个有限集的子集。Chapter3NumberSystemsandBooleanAlgebraForexample,sincethesetThasfiveelements,wemayrepresentitssubsetsbyfive-componentbinaryvectors,eachcomponentdenotinganelementofthesetT.Anumerallinthei-thcomponentofthevectordenotestheinclusionofthei-thelementofthatparticularsubset;a0denotesitsexclusion.Thus,thesubsetS={a,b,c}hasthebinaryvectorrepresentation{1,1,1,0,0}.ThesetoperationsbecomeBooleanoperationsonthecomponentsofthevectors.Thisrepresentationofsets,andthecorrespondencetoBooleanorlogicaloperations,isveryusefulininformationretrieval.Becauseofit,setsofdocumentandquerycharacteristicsmaybeeasilyandrapidlymatched.3.2BooleanAlgebra例如,由于集合T有5个元素,所以我们可以用5个分量的二进制向量表示它的子集,其中每一个分量表示集合T的一个元素。向量中的第i个分量为数字1表示集合T的第i个元素在某一特定子集中,用数字0表示不在某一特定子集中。于是,子集S={a,b,c}可用二进制向量表示为{1,1,1,0,0}。集合运算变成了向量分量上的布尔运算。集合的这种表示方法以及相应的布尔或逻辑运算,对于信息检索是非常有用的。由于这一原因,文件的集合和查询特性可以很容易而迅速地得到匹配。Chapter3NumberSystemsandBooleanAlgebra数学公式的读法(Pronunciationofmathematicalexpressions)Chapter3NumberSystemsandBooleanAlgebra2集合(Sets)xA xbelongstoA/xisanelement(oramember)ofAxA xdoesnotbelongtoA/xisnotanelement(oramember)ofAAB AiscontainedinB/AisasubsetofBAB AcontainsB/BisasubsetofAAB AcapB/AmeetB/AintersectionBAB AcupB/AjoinB/AunionBB/A AminusB/thedifferencebetweenAandBA×B AcrossB/theCartesianproductofAandB(A与B的笛卡尔积)数学公式的读法(Pronunciationofmathematicalexpressions)Chapter3NumberSystemsandBooleanAlgebra数学公式的读法(Pronunciationofmathematicalexpressions)Chapter3NumberSystemsandBooleanAlgebra3实数(Realnumbers)x>y xisgreaterthanyx≥y xisgreaterthanorequaltoyx<y xislessthanyxy xislessthanorequaltoy0<x<1 zeroislessthanxislessthan10x1 zeroislessthanorequaltoxislessthanorequalto1|x| modx/modulusxx2 xsquared/x(raised)tothepower2x3 xcubedx4 xtothefourth/xtothepowerfourxn xtothenth/xtothepowernx-n xtothe(power)minusn 数学公式的读法(Pronunciationofmathematicalexpressions)Chapter3NumberSystemsandBooleanAlgebra数学公式的读法(Pronunciationofmathematicalexpressions)Chapter3NumberSystemsandBooleanAlgebra数学公式的读法(Pronunciationofmathematicalexpressions)Chapter3NumberSystemsandBooleanAlgebra数学公式的读法(Pronunciationofmathematicalexpressions)Chapter3NumberSystemsandBooleanAlgebra数学公式的读法(Pronunciationofmathematicalexpressions)
本文档为【《计算机专业英语》电子教案-孙建忠 第3章】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: ¥12.0 已有0 人下载
最新资料
资料动态
专题动态
个人认证用户
科技制造的艺术美
暂无简介~
格式:ppt
大小:423KB
软件:PowerPoint
页数:0
分类:工学
上传时间:2019-11-09
浏览量:13