CodePudding user response:
Bit arithmetic and logical operations itself has no associated,Bit arithmetic to generate a value (int), logic operation is a Boolean value
CodePudding user response:
"|" is "and" for bit operations,"& amp; & amp;" Is "and", used in logic operation,
Is a different operator
CodePudding user response:
A is a operation, double wrote logic operationCodePudding user response:
| and & amp; & Doesn't matter hair!| and | | :
Expressions, a | b | c, ABC will perform
While a | b | | | c, if a is true, BC never executed
& And & amp; & , & amp; & If a fale, behind will not be executed for
| and & amp; Generally used in digital transformation, faster
| | and & amp; & In the logic judgment