当前位置:网站首页>Basic bit operation symbols of C language

Basic bit operation symbols of C language

2022-06-25 05:13:00 N-Raid

C Basic bit operation symbol of language

1、<< Move left 00011000 << 3 = 11000000( Portable assignment method :<<=)
2、>> Move right 00100100 >> 2 = 00001001( Portable assignment method :>>=)
3、 & Bitwise AND 00010001 & 00100001 = 00000001( Portable assignment method :&=)
4、 | Press bit or 00010001 | 00100001 = 00110001( Portable assignment method :|=)
5、 ^ Bitwise XOR 00010001 ^ 00100001 = 00110000 ( Portable assignment method :^=)
6、 ~ According to the not ~00010001 = 11101110

Bitwise operators take precedence from high to low , In turn ~ & ^ |( Negation and XOR or )

原网站

版权声明
本文为[N-Raid]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202210522091489.html