The bitwise XOR operator (^) performs a bitwise XOR on two expressions. Usage:
result = expression1 ^ expression2
where result is any variable.
expression1 is any expression.
expression2 is any expression.
Bitwise XOR operator description
^ operator looks at the binary representation of the values of two expressions and performs a bitwise XOR. The result of this operation is as follows:
0101 (expression1)
1100 (expression2)
----
1001 (result)
if and only if only When a bit of an expression is 1, the result will be 1. Otherwise this bit of the result is 0.
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn