位运算
来源:互联网 发布:淘宝充话费等级 编辑:程序博客网 时间:2024/06/07 06:56
#include<iostream>#include<stdio.h>#include<string>using namespace std;int main(){unsigned result;int a = 2, b = 4, c = 6, d = 8;cout << "---------------------------" << endl;cout << "|a=%d,b=%d,c=%d,d=%d" << a << b << c << d << endl;cout << "|--------------------------" << endl;cout << "------输出运算符------------" << endl;result = a&b;cout << "result=a&b= %d" << result << " " << endl;result = b | d;cout << "result=b | d= %d" << result << " " << endl;result = a^d;cout << "result=a^d= %d" << result << " " << endl;result = ~a;cout << "result= ~a=%d" << result << " " << endl; system("pause");return 0;}
0 0
- 位运算
- 位运算
- 位运算
- 位运算
- 位运算
- 位运算
- 位运算
- 位运算
- 位运算
- 位运算
- 位运算
- 位运算
- 位运算
- 位运算
- 位运算
- 位运算
- 位运算
- 位运算
- hdu3037 Saving Beans(Lucas定理+费马小定理or扩展欧几里德算发)
- Oracle主键、唯一键与唯一索引的区别
- android app 静默安装
- UIImageView
- POJ 3268Silver Cow Party(dijkstra最短路)
- 位运算
- OC正则表达式
- Linux每天一命令之read
- session的生命周期
- PX4(PIXHAWK)源码开发人员文档(三)——进程间通讯的开发者指南
- 坐结合和右结合的含义
- SDWebImage框架清除内存中的缓存图片
- VC++创建和调用dll
- TCP控制拥塞的四种算法:慢开始,拥塞避免,快重传,快恢复