| Logical Operators |
| |
| These are also known as Boolean operators.Boolean operators are used in the conditions where condition can be true or false case. |
| Basically logical operators are used to form logical expressions that represent true or false conditions. |
| |
| For Example: |
| |
| The 'Or' operator returns the result when only one operands is true. |
| |
| The given table summarizes various logical operators and their description: |
| |
| Operators | Description of Symbol | | Not | Return the negative of two expressions. | | And | Returns true only when both conditions are true. | | Or | Returns true when only one condition is true. | | Imp | Returns false only when 1st operand is true and 2nd is false. | | Eqv | Returns true only when both conditions are true. | | Xor | Return true only if both operands are of opposite sign. | |
No comments:
Post a Comment