| Logical And evaluates as follows: If, and only if, both expressions evaluate to cvTrue, the result is cvTrue. If either exp evaluates to cvFalse, the result is cvFalse. Bitwise And performs a bitwise evaluation of identically positioned bits in two numeric expressions and writes the corresponding bit in the result. The following table illustrates how the results are determined:
<Exp1> | <Exp2> | Evaluation |
False | False | False |
True | False | False |
False | True | False |
True | True | True |
Logical Or evaluates as follows: If, either of the expressions evaluate to cvTrue, the result is cvTrue. Bitwise Or operator also performs a bitwise evaluation of identically positioned bits in two numeric expressions and writes the corresponding bit in the result. The following table illustrates how result is determined:
<Exp1> | <Exp2> | Evaluation |
False | False | False |
True | False | True |
False | True | True |
True | True | True |
Logical XOR evaluates as follows: If, either of the expressions evaluate to cvTrue, but not both, the result is cvTrue. Bitwise XOR operator also performs a bitwise evaluation of identically positioned bits in two numeric expressions and writes the corresponding bit in the result. The following table illustrates how result is determined:
<Exp1> | <Exp2> | Evaluation |
False | False | False |
True | False | True |
False | True | True |
True | True | False |
Logical Not inverts the evaluation of the expressions. Bitwise Not operator also performs a bitwise invert of bits in <exp1> and writes the corresponding bit in the result. The following table illustrates how result is determined:
<Exp1> | Evaluation |
False | True |
True | False |
|