当前位置:网站首页>1.5 - logical operation
1.5 - logical operation
2022-06-30 06:33:00 【It's Li sticky duck】
One 、 Logical operations

- or : One is true is true ;
- And : If one is false, it is false ;
- Exclusive or : True or false , All are false ; One true and one false is true ;
- Same as or : If it's all true, it's true , All false is true ; One true and one false is false ;
- Not : It is true or false ; If it is false, it is true ;
Two 、 To assist in understanding

- 0 Said the false ,1 Said really ;
Be careful :Every logical operation has many symbols , Applicable to different environments ; for example || Applicable in code , Others can be used in algebraic operations ;
3、 ... and : Examination site : Of logical operations

- From the title, we can see ,00、11 It is an effective expression of numerical symbols ; That is to say When the sign bits of both numbers are 00, or All are 11 when , their The result of logical operation is true (0);
- 01、10 Is an invalid representation of a numeric symbol ; That is, when the sign bits of two numeric values All are 01, perhaps All are 10 when , their The result of logical operation is false (1);
- So we can infer from this , Need to carry out Exclusive or Logical operations , In order to meet the requirements of the question, two numbers with the same symbol are added , The operation result overflows , It's fake (1);
Be careful :
When doing the problem of logical operation , In an abnormal situation , Overflow in the above question , Then his result is false , That is to say 1;
边栏推荐
猜你喜欢

Swoole process model diagram

Never forget the original intention, and be lazy if you can: C # operate word files

神经网络入门

Gazebo installation, uninstall and upgrade

KEIL - 下载调试出现“TRACE HW not present”

Usage of case, casez and casex statements in Verilog

Jgaurora A8 configuration file

DXP copper laying settings

1.4 - 定点数与浮点数

Learn fpga---ram IP core and key parameters from the bottom structure
随机推荐
Uniapp wechat applet returns to the previous page and refreshes
Practice summary of Prometheus project in amu Laboratory
Bat 使用细节2
Record a problem tracking of excessive load
Installation and initialization of MariaDB database
Suggestion: use tools:overrideLibrary
Idea add database
Why does the verification code not refresh when clicked
Initial love with mqtt
Application of redis client list in practice
Cocos studio3.1 installation package win
uniapp 微信小程序返回上一页并刷新
关于Glide加载图片模糊不清楚
程序猿入门攻略(十一)——结构体
多线程进阶篇
requests. The difference between session () sending requests and using requests to send requests directly
DHCP operation
Altium designer creates multiple class networks to realize different lineweights of multiple networks
Introduction to neural networks
1.9 - 存储器的分类