Logical operators
Logical operators
Logical operators are applied in logical operations, and the result of their application is always a boolean value (true / false).
| Operator | Explanation | Unary / Binary |
|---|---|---|
| NOT | Computes the complement of the operand to the right of the operator. If the operand is true, the result is false and vice versa. | Unary |
| AND | Computes the logical AND operation between the operands on both sides of the operator. The AND operation results in a true value only when both operands have a true value, and false otherwise. | Binary |
| OR | Computes the logical OR operation between the operands on both sides of the operator. The OR operation results in a true value if at least one of the operands has a true value, and false in any other case. | Binary |
| XOR | Computes the logical XOR operation between the operands on both sides of the operator. The XOR operation results in a true value if only one of the operands has a true value, and false in any other case. | Binary |