当前位置:网站首页>实例052:按位或
实例052:按位或
2022-08-10 22:20:00 【懒笑翻】
题目:学习使用按位或 | 。
程序分析:0|0=0; 0|1=1; 1|0=1; 1|1=1
# 只要对应的二个二进位有一个为1时,结果位就为1
代码:
a = 0o77
print(a)
print(a | 3)
print(a | 3 | 7)运行结果:

↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓懒笑翻诚邀您点击下方群聊一起来学习讨论↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
边栏推荐
- VulnHub之DC靶场下载与DC靶场全系列渗透实战详细过程
- ASCII, Unicode and UTF-8
- 2021IDEA创建web工程
- 边缘与云计算:哪种解决方案更适合您的连接设备?
- 3598. 二叉树遍历(华中科技大学考研机试题)
- Spark基础【RDD转换算子】
- "DevOps Night Talk" - Pilot - Introduction to CNCF Open Source DevOps Project DevStream - feat. PMC member Hu Tao
- gcc492 compile `.rodata‘ can not be used when making a PIE object; recompile with -fPIE
- JS学习 2022080
- 分享一个后台管理系统可拖拽式组件的设计思路
猜你喜欢

"DevOps Night Talk" - Pilot - Introduction to CNCF Open Source DevOps Project DevStream - feat. PMC member Hu Tao
![Research on multi-element N-k fault model of power system based on AC power flow (implemented by Matlab code) [Power System Fault]](/img/d0/13ae2b9987a4fff6f28607a0c01b58.gif)
Research on multi-element N-k fault model of power system based on AC power flow (implemented by Matlab code) [Power System Fault]

xshell (sed command)

计算需要的MIPI lane数目

Leave a message with a prize | OpenBMB x Tsinghua University NLP: The update of the large model open class is complete!

2021 IDEA creates web projects

LabVIEW分配多少线程?

Why general company will say "go back messages such as" after the end of the interview, rather than just tell the interviewer the result?

The Thread State,

What is Jmeter? What are the principle steps used by Jmeter?
随机推荐
《DevOps围炉夜话》- Pilot - CNCF开源DevOps项目DevStream简介 - feat. PMC成员胡涛
企业云存储日常运行维护实践经验分享
BM7 链表中环的入口结点
2022年8月10日:使用 ASP.NET Core 为初学者构建 Web 应用程序--使用 ASP.NET Core 创建 Web UI(没看懂需要再看一遍)
高学历毕业生,该学单片机还是plc?
shell编程之免交互
如何成为一名正义黑客?你应该学习什么?
A shell script the for loop statements, while statement
Self-organization is a two-way journey between managers and members
《DevOps围炉夜话》- Pilot - CNCF开源DevOps项目DevStream简介 - feat. PMC成员胡涛
威纶通触摸屏如何在报警的同时,显示出异常数据的当前值?
CIKM2022 | Sequence Recommendation Based on Bidirectional Transformers Contrastive Learning
win系统下pytorch深度学习环境安装
Glide监听Activity生命周期源码分析
VLAN huawei 三种模式
68:第六章:开发文章服务:1:内容梳理;article表介绍;创建【article】文章服务;
链表相加(二)
DC-7靶场下载及渗透实战详细过程(DC靶场系列)
自学软件测试不知道该如何学起,【软件测试技能图谱|自学测试路线图】
留言有奖|OpenBMB x 清华大学NLP:大模型公开课更新完结!