当前位置:网站首页>The significance of XOR in embedded C language
The significance of XOR in embedded C language
2022-07-07 15:38:00 【sgmcy】
Bitwise operations are divided into : And , or , Not
But why is there an XOR ?
And : All two are 1, It's just 1, Otherwise 0.
or : As long as one is 1, Namely 1, All two are 0, Output is 0
Not :0 change 1,1 change 0
In the past, in class , The teacher told us
The role of and , To make someone bit Used to clear
The role of or , To make someone bit Set up 1
But there is no function of XOR
Exclusive or : Same as 0, Different for 1
The most classic application of XOR , It is the clearing of registers . The classic one x86 Architecture , Frequently used register zeroing
First , Read the value of this register , Then let the value and the register XOR , You can clear the entire register
Especially in X86 In assembly language programming , You often see this XOR clear operation , That's why XOR is introduced
边栏推荐
- Monthly observation of internet medical field in May 2022
- CTFshow,信息搜集:web5
- Nacos conformance protocol cp/ap/jraft/distro protocol
- Stream learning notes
- 2.Golang基础知识
- 【深度学习】图像超分实验:SRCNN/FSRCNN
- Actually changed from 408 to self proposition! 211 North China Electric Power University (Beijing)
- 居然从408改考自命题!211华北电力大学(北京)
- Android -- jetpack: the difference between livedata setValue and postvalue
- [original] all management without assessment is nonsense!
猜你喜欢

Briefly describe the working principle of kept

TypeScript 发布 4.8 beta 版本

【数字IC验证快速入门】23、SystemVerilog项目实践之AHB-SRAMC(3)(AHB协议基本要点)

Super simple and fully automated generation super signature system (cloud Xiaoduo minclouds.com cloud service instance), free application in-house test app distribution and hosting platform, maintenan

【目标检测】YOLOv5跑通VOC2007数据集

CTFshow,信息搜集:web9

CTFshow,信息搜集:web4

Ida Pro reverse tool finds the IP and port of the socket server

【服务器数据恢复】某品牌StorageWorks服务器raid数据恢复案例

Niuke real problem programming - day20
随机推荐
连接ftp服务器教程
Ctfshow, information collection: web12
Introduction of mongod management database method
Bits and Information & integer notes
Niuke real problem programming - day15
Actually changed from 408 to self proposition! 211 North China Electric Power University (Beijing)
避坑:Sql中 in 和not in中有null值的情况说明
[Lanzhou University] information sharing of postgraduate entrance examination and re examination
MySQL bit类型解析
The difference between full-time graduate students and part-time graduate students!
@ComponentScan
[quick start of Digital IC Verification] 25. AHB sramc of SystemVerilog project practice (5) (AHB key review, key points refining)
2022年5月互联网医疗领域月度观察
[quick start of Digital IC Verification] 26. Ahb-sramc of SystemVerilog project practice (6) (basic points of APB protocol)
2.Golang基础知识
什麼是數據泄露
[quick start of Digital IC Verification] 18. Basic grammar of SystemVerilog learning 5 (concurrent threads... Including practical exercises)
Integer learning
Ctfshow, information collection: web8
What are PV and UV? pv、uv