C语言位运算符与或异或取反左移和右移_第1页
C语言位运算符与或异或取反左移和右移_第2页
C语言位运算符与或异或取反左移和右移_第3页
C语言位运算符与或异或取反左移和右移_第4页
C语言位运算符与或异或取反左移和右移_第5页
已阅读5页,还剩15页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

C&1,则该位的成果值为1,否则为0|按位或两个对应的二进制位中只要有一种为1,该位的成果值为1^按位异或若参加运算的两个二进制位值相似则为0,否则为1~取反~是一元运算符,用来对一种二进制数按位取反,即将0变1,将1变0按位与是指:参加运算的两个数据,按二进制位进行“与”运算。如果两个对应的二进制位都为,,则该位的成果值为1;否则为0。这里的1能够理解为逻辑中的rue,0能够理解为逻辑中的false辑上的“与”,规定运算数全真,成果才为真。若,A=true,B=true,则A?B=true例如:3&5的数据均在数据背面加上括号,括号中注明其进制,二进制则标记为2)installationpartmainincludingYunnanprovincetengchongCountyyongxingRiverprimaryandsecondaryhydropowerstationintheofpressurepipeandthepowerstationmetalstructure,whichlevelpowerstationpressurepipetotalabout562t(containingannex);IIlevelpowerstationpressurepipeabout733t(containingannex);levelpowerstationmetalstructureabout52.5t,containingdischargeGate2hole,rushedsandGate1hole,watermouthworkdoorandthestoppeddirtgatethe1hole,Qianpoolworkdoorandthestoppeddirtgatethe1hole;Secondarypowerstationmetaljunctionatabout19.5t,containingsandGate1hole,waterinletwatergateandtrashthe1hole;theirauxiliaryhoistequipmentandelectricalequipment.Concretepressurepipe,gate,trashandhoistingdeviceprojectpropertylist1-1~1-3.Table1-1themaincharacteristicsofthepenstocknumberitemparametertypecontrollersizeheadalongpipediameterpipelength11hydropowerstationpenstockopen-airexposedpipe,singlepipejointwatersupply1.3M931m0.8M8.3*2m22hydropowerstationpenstockopen-airexposedpipe,singlepipejointwatersupply1.4m1063.506m0.8M10*2mtable1-2hydropowerstationMaincharacteristicsofhydraulicmetalstructurenumberprojectnamegate,trashrack,door(gate...Pressurepipeandthemetalstructureinstallation9.1mainengineeringprofileyongxingriverlevelhydropowerstationpressurepipepipelineplaneShangalongRidgeislinelayout,andslopesurfacecontourclosevertical,GuanPowithoriginalgroundlinechanges,usedopentypeMingtube,singletubejointwaterway,competentdiameter1.3M,long931.00m,tworootnon-symmetric"Bu"typesupporttube,diameter0.8M,singlerootlong8.3M.Competenttoestablish12townPier,107buttress,telescopicsection11.SupportPierspacing8M,side-slidingbearing.Townpierfortheclosed-endstructureofgravity,basesurfaceintobedrock,pipeexcavationslope1:0.75withM5groutedrubbleslopeprotection,0.3M,bottomsidesewer,0.25mwide,deep0.3m,M5groutedrubblemasonry,setmaintenancestepladderontheleftside,1.0Mwide.Yongxinghe-?hydropowerstationpenstockpipesarrangedalongtheridgelineontheplane,andnearlyverticalslopecontourlines,GuanPochangeswiththeoriginalgroundline,withshallowbackfill-pipe,single-pipewatersupply,thecompetent1.4m,long1063.506m,twoasymmetric"y"pipe,diameter0.8M,single10m.Competenttoestablish12townPier,8expansionjoint.Townpierfortheclosed-endstructureofgravity,placedonsoftrockbasesurface,pipeconcreteC20onapedestal.Pipetrenchexcavationslope1:0.75,aftertheinstallationofsteeltube,compactedgravel#include<stdio.h>{inta=3;intb=5;printf("%d",a&b);若想对一种存储单元清零,即使其全部二进制位为0,其原来的数中为1的位,新数中对应位为0。然后使两者进行&零c#include<stdio.h>{intintb=printf("%d",a&b);installationpartmainincludingYunnanprovincetengchongCountyyongxingRiverprimaryandsecondaryhydropowerstationintheofpressurepipeandthepowerstationmetalstructure,whichlevelpowerstationpressurepipetotalabout562t(containingannex);IIlevelpowerstationpressurepipeabout733t(containingannex);levelpowerstationmetalstructureabout52.5t,containingdischargeGate2hole,rushedsandGate1hole,watermouthworkdoorandthestoppeddirtgatethe1hole,Qianpoolworkdoorandthestoppeddirtgatethe1hole;Secondarypowerstationmetaljunctionatabout19.5t,containingsandGate1hole,waterinletwatergateandtrashthe1hole;theirauxiliaryhoistequipmentandelectricalequipment.Concretepressurepipe,gate,trashandhoistingdeviceprojectpropertylist1-1~1-3.Table1-1themaincharacteristicsofthepenstocknumberitemparametertypecontrollersizeheadalongpipediameterpipelength11hydropowerstationpenstockopen-airexposedpipe,singlepipejointwatersupply1.3M931m0.8M8.3*2m22hydropowerstationpenstockopen-airexposedpipe,singlepipejointwatersupply1.4m1063.506m0.8M10*2mtable1-2hydropowerstationMaincharacteristicsofhydraulicmetalstructurenumberprojectnamegate,trashrack,door(gate...Pressurepipeandthemetalstructureinstallation9.1mainengineeringprofileyongxingriverlevelhydropowerstationpressurepipepipelineplaneShangalongRidgeislinelayout,andslopesurfacecontourclosevertical,GuanPowithoriginalgroundlinechanges,usedopentypetube,singletubejointwaterway,competentdiameter1.3M,long931.00m,tworootnon-symmetric"Bu"typesupporttube,diameter0.8M,singlerootlong8.3M.Competenttoestablish12townPier,107buttress,telescopicsection11.SupportPierspacing8M,side-slidingbearing.Townpierfortheclosed-endstructureofgravity,basesurfaceintobedrock,pipeexcavationslope1:0.75withM5groutedrubbleslopeprotection,0.3M,bottomsidesewer,0.25mwide,deep0.3m,M5groutedrubblemasonry,setmaintenancestepladderontheleftside,1.0Mwide.Yongxinghe-?hydropowerstationpenstockpipesarrangedalongtheridgelineontheplane,andnearlyverticalslopecontourlines,GuanPochangeswiththeoriginalgroundline,withshallowbackfill-pipe,single-pipewatersupply,thecompetent1.4m,long1063.506m,twoasymmetric"y"pipe,diameter0.8M,single10m.Competenttoestablish12townPier,8expansionjoint.Townpierfortheclosed-endstructureofgravity,placedonsoftrockbasesurface,pipeconcreteC20onapedestal.Pipetrenchexcavationslope1:0.75,aftertheinstallationofsteeltube,compactedgravel}若有一种整数a(2byte),想要取其中的低字节,只需要将a与8个1abc与一种数进行“按位与”运算,此数在该位取例如:有一数84,即01010100(2),想把其中从左边算起的第8即c#include<stdio.h>{inta=84;intb=59;}2、“按位或”运算符o例如:60(8)|17(8),将八进制60与八进制17进行按位或运算。installationpartmainincludingYunnanprovincetengchongCountyyongxingRiverprimaryandsecondaryhydropowerstationintheofpressurepipeandthepowerstationmetalstructure,whichlevelpowerstationpressurepipetotalabout562t(containingannex);IIlevelpowerstationpressurepipeabout733t(containingannex);levelpowerstationmetalstructureabout52.5t,containingdischargeGate2hole,rushedsandGate1hole,watermouthworkdoorandthestoppeddirtgatethe1hole,Qianpoolworkdoorandthestoppeddirtgatethe1hole;Secondarypowerstationmetaljunctionatabout19.5t,containingsandGate1hole,waterinletwatergateandtrashthe1hole;theirauxiliaryhoistequipmentandelectricalequipment.Concretepressurepipe,gate,trashandhoistingdeviceprojectpropertylist1-1~1-3.Table1-1themaincharacteristicsofthepenstocknumberitemparametertypecontrollersizeheadalongpipediameterpipelength11hydropowerstationpenstockopen-airexposedpipe,singlepipejointwatersupply1.3M931m0.8M8.3*2m22hydropowerstationpenstockopen-airexposedpipe,singlepipejointwatersupply1.4m1063.506m0.8M10*2mtable1-2hydropowerstationMaincharacteristicsofhydraulicmetalstructurenumberprojectnamegate,trashrack,door(gate...Pressurepipeandthemetalstructureinstallation9.1mainengineeringprofileyongxingriverlevelhydropowerstationpressurepipepipelineplaneShangalongRidgeislinelayout,andslopesurfacecontourclosevertical,GuanPowithoriginalgroundlinechanges,usedopentypeMingtube,singletubejointwaterway,competentdiameter1.3M,long931.00m,tworootnon-symmetric"Bu"typesupporttube,diameter0.8M,singlerootlong8.3M.Competenttoestablish12townPier,107buttress,telescopicsection11.SupportPierspacing8M,side-slidingbearing.Townpierforclosed-endstructureofgravity,basesurfaceintobedrock,pipeexcavationslope1:0.75withM5groutedrubbleslopeprotection,0.3M,bottomsidesewer,0.25mwide,deep0.3m,M5groutedrubblemasonry,setmaintenancestepladderontheleftside,1.0Mwide.Yongxinghe-?hydropowerstationpenstockpipesarrangedalongtheridgelineontheplane,andnearlyverticalslopecontourlines,GuanPochangeswiththeoriginalgroundline,withshallowbackfill-pipe,single-pipewatersupply,thecompetent1.4m,long1063.506m,twoasymmetric"y"pipe,diameter0.8M,single10m.Competenttoestablish12townPier,8expansionjoint.Townpierfortheclosed-endstructureofgravity,placedonsoftrockbasesurface,pipeconcreteC20onapedestal.Pipetrenchexcavationslope1:0.75,aftertheinstallationofsteeltube,compactedgravelc#include<stdio.h>{inta=060;intb=017;}应用:按位或运算惯用来对一种数据的某些位定值为1。例如a的低4位改为1,则只需要将a与17(8)例如:,,,,即11(2);,,,,即100(2),,111(2)(a?b的成果,a,,011(2)(b?a的成果,b,,100(2)(a?b的成果,ainstallationpartmainincludingYunnanprovincetengchongCountyyongxingRiverprimaryandsecondaryhydropowerstationintheofpressurepipeandthepowerstationmetalstructure,whichlevelpowerstationpressurepipetotalabout562t(containingannex);IIlevelpowerstationpressurepipeabout733t(containingannex);levelpowerstationmetalstructureabout52.5t,containingdischargeGate2hole,rushedsandGate1hole,watermouthworkdoorandthestoppeddirtgatethe1hole,Qianpoolworkdoorandthestoppeddirtgatethe1hole;Secondarypowerstationmetaljunctionatabout19.5t,containingsandGate1hole,waterinletwatergateandtrashthe1hole;theirauxiliaryhoistequipmentandelectricalequipment.Concretepressurepipe,gate,trashandhoistingdeviceprojectpropertylist1-1~1-3.Table1-1themaincharacteristicsofthepenstocknumberitemparametertypecontrollersizeheadalongpipediameterpipelength11hydropowerstationpenstockopen-airexposedpipe,singlepipejointwatersupply1.3M931m0.8M8.3*2m22hydropowerstationpenstockopen-airexposedpipe,singlepipejointwatersupply1.4m1063.506m0.8M10*2mtable1-2hydropowerstationMaincharacteristicsofhydraulicmetalstructurenumberprojectnamegate,trashrack,door(gate...Pressurepipeandthemetalstructureinstallation9.1mainengineeringprofileyongxingriverlevelhydropowerstationpressurepipepipelineplaneShangalongRidgeislinelayout,andslopesurfacecontourclosevertical,GuanPowithoriginalgroundlinechanges,usedopentypeMingtube,singletubejointwaterway,competentdiameter1.3M,long931.00m,tworootnon-symmetric"Bu"typesupporttube,diameter0.8M,singlerootlong8.3M.Competenttoestablish12townPier,107buttress,telescopicsection11.SupportPierspacing8M,side-slidingbearing.Townpierfortheclosed-endstructureofgravity,basesurfaceintobedrock,pipeexcavationslope1:0.75withM5groutedrubbleslopeprotection,0.3M,bottomsidesewer,0.25mwide,deep0.3m,M5groutedrubblemasonry,setmaintenancestepladderontheleftside,1.0Mwide.Yongxinghe-?hydropowerstationpenstockpipesarrangedalongtheridgelineontheplane,andnearlyverticalslopecontourlines,GuanPochangeswiththeoriginalgroundline,withshallowbackfill-pipe,single-pipewatersupply,thecompetent1.4m,long1063.506m,twoasymmetric"y"pipe,diameter0.8M,single10m.Competenttoestablish12townPier,8expansionjoint.Townpierfortheclosed-endstructureofgravity,placedonsoftrockbasesurface,pipeconcreteC20onapedestal.Pipetrenchexcavationslope1:0.75,aftertheinstallationofsteeltube,compactedgravel?执行前两个赋值语句:“,,,?,;”和“,,,?,;”相称于b=b?(a?b),,,?,。由于a的值等于(,?,),bc#include<stdio.h>{inta=3;intb=4;printf("a=%db=%d",a,b);1变为0,0变为1#include<stdio.h>{inta=077;installationpartmainincludingYunnanprovincetengchongCountyyongxingRiverprimaryandsecondaryhydropowerstationintheofpressurepipeandthepowerstationmetalstructure,whichlevelpowerstationpressurepipetotalabout562t(containingannex);IIlevelpowerstationpressurepipeabout733t(containingannex);levelpowerstationmetalstructureabout52.5t,containingdischargeGate2hole,rushedsandGate1hole,watermouthworkdoorandthestoppeddirtgatethe1hole,Qianpoolworkdoorandthestoppeddirtgatethe1hole;Secondarypowerstationmetaljunctionatabout19.5t,containingsandGate1hole,waterinletwatergateandtrashthe1hole;theirauxiliaryhoistequipmentandelectricalequipment.Concretepressurepipe,gate,trashandhoistingdeviceprojectpropertylist1-1~1-3.Table1-1themaincharacteristicsofthepenstocknumberitemparametertypecontrollersizeheadalongpipediameterpipelength11hydropowerstationpenstockopen-airexposedpipe,singlepipejointwatersupply1.3M931m0.8M8.3*2m22hydropowerstationpenstockopen-airexposedpipe,singlepipejointwatersupply1.4m1063.506m0.8M10*2mtable2hydropowerstationMaincharacteristicsofhydraulicmetalstructurenumberprojectnamegate,trashrack,door(gate...Pressurepipeandthemetalstructureinstallation9.1mainengineeringprofileyongxingriverlevelhydropowerstationpressurepipepipelineplaneShangalongRidgeislinelayout,andslopesurfacecontourclosevertical,GuanPowithoriginalgroundlinechanges,usedopentypeMingtube,singletubejointwaterway,competentdiameter1.3M,long931.00m,tworootnon-symmetric"Bu"typesupporttube,diameter0.8M,singlerootlong8.3M.Competenttoestablish12townPier,107buttress,telescopicsection11.SupportPierspacing8M,side-slidingbearing.Townpierfortheclosed-endstructureofgravity,basesurfaceintobedrock,pipeexcavationslope1:0.75withM5groutedrubbleslopeprotection,0.3M,bottomsidesewer,0.25mwide,deep0.3m,M5groutedrubblemasonry,setmaintenancestepladderontheleftside,1.0Mwide.Yongxinghe-?hydropowerstationpenstockpipesarrangedalongtheridgelineontheplane,andnearlyverticalslopecontourlines,GuanPochangeswiththeoriginalgroundline,withshallowbackfill-pipe,single-pipewatersupply,thecompetent1.4m,long1063.506m,twoasymmetric"y"pipe,diameter0.8M,single10m.Competenttoestablish12townPier,8expansionjoint.Townpierfortheclosed-endstructureofgravity,placedonsoftrockbasesurface,pipeconcreteC20onapedestal.Pipetrenchexcavationslope1:0.75,aftertheinstallationofsteeltube,compactedgravel}5值),其右边空出的位用0位得00111100(2)#include<stdio.h>{inta=15;}左移1位相称于该数乘以2,左移2位相称于该数乘以2*2,4,15,,2=60,数左移时被溢出舍弃的高位中不包含1,而左移2位时,溢出的高位中包含16installationpartmainincludingYunnanprovincetengchongCountyyongxingRiverprimaryandsecondaryhydropowerstationintheofpressurepipeandthepowerstationmetalstructure,whichlevelpowerstationpressurepipetotalabout562t(containingannex);IIlevelpowerstationpressurepipeabout733t(containingannex);levelpowerstationmetalstructureabout52.5t,containingdischargeGate2hole,rushedsandGate1hole,watermouthworkdoorandthestoppeddirtgatethe1hole,Qianpoolworkdoorandthestoppeddirtgatethe1hole;Secondarypowerstationmetaljunctionatabout19.5t,containingsandGate1hole,waterinletwatergateandtrashthe1hole;theirauxiliaryhoistequipmentandelectricalequipment.Concretepressurepipe,gate,trashandhoistingdeviceprojectpropertylist1-1~1-3.Table1-1themaincharacteristicsofthepenstocknumberitemparametertypecontrollersizeheadalongpipediameterpipelength11hydropowerstationpenstockopen-airexposedpipe,singlepipejointwatersupply1.3M931m0.8M8.3*2m22hydropowerstationpenstockopen-airexposedpipe,singlepipejointwatersupply1.4m1063.506m0.8M10*2mtable1-2hydropowerstationMaincharacteristicsofhydraulicmetalstructurenumberprojectnamegate,trashrack,door(gate...Pressurepipeandthemetalstructureinstallation9.1mainengineeringprofileyongxingriverlevelhydropowerstationpressurepipepipelineplaneShangalongRidgeislinelayout,andslopesurfacecontourclosevertical,GuanPowithoriginalgroundlinechanges,usedopentypeMingtube,singletubejointwaterway,competentdiameter1.3M,long931.00m,tworootnon-symmetric"Bu"typesupporttube,diameter0.8M,singlerootlong8.3M.Competenttoestablish12townPier,107buttress,telescopicsection11.SupportPierspacing8M,side-slidingbearing.Townpierfortheclosed-endstructureofgravity,basesurfaceintobedrock,pipeexcavationslope1:0.75withM5groutedrubbleslopeprotection,0.3M,bottomsidesewer,0.25mwide,deep0.3m,M5groutedrubblemasonry,setmaintenancestepladderontheleftside,1.0Mwide.Yongxinghe-?hydropowerstationpenstockpipesarrangedalongtheridgelineontheplane,andnearlyverticalslopecontourlines,GuanPochangeswiththeoriginalgroundline,withshallowbackfill-pipe,single-pipewatersupply,thecompetent1.4m,long1063.506m,twoasymmetric"y"pipe,diameter0.8M,single10m.Competenttoestablish12townPier,8expansionjoint.Townpierfortheclosed-endstructureofgravity,placedonsoftrockbasesurface,pipeconcreteC20onapedestal.Pipetrenchexcavationslope1:0.75,aftertheinstallationofsteeltube,compactedgravel系统移入1。移入0的称为“逻辑移位”,即简朴移位;移入1a的值是八进制数113755:a:1101(用二进制形式表达)a>>1:0110(逻辑右移时)a>>1:0110在有些系统中,a>>1得八进制数045766,而在另某些系统上可能得到的是。TurboC和其它某些#include<stdio.h>{inta=0113755;}7例如:&=,|=,>>=,<<=,?=a&baa&ba<<=2相称于a=a<<2installationpartmainincludingYunnanprovincetengchongCountyyongxingRiverprimaryandsecondaryhydropowerstationintheofpressurepipeandthepowerstationmetalstructure,whichlevelpowerstationpressurepipetotalabout562t(containingannex);IIlevelpowerstationpressurepipeabout733t(containingannex);levelpowerstationmetalstructureabout52.5t,containingdischargeGate2hole,rushedsandGate1hole,watermouthworkdoorandthestoppeddirtgatethe1hole,Qianpoolworkdoorandthestoppeddirtgatethe1hole;Secondarypowerstationmetaljunctionatabout19.5t,containingsandGate1hole,waterinletwatergateandtrashthe1h

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论