Note: You must add uk to the end of the address, it's to help prevent spam. |
OR TYPE: Logical Operator Action: Just as the relational operators can be used to make decisions regarding program flow, logical operators can connect two or more re-lations and return a true or false value which can then be used in a decision. When used in calculations, the logical OR gives you a bit result of I if the corresponding bit of either or both operands is 1. This will produce an integer as a result depending on the values of the operands. When used in comparisons the logical OR operator is also used to link two expressions into a single compound expression. If either of the expressions are true, the combined expression value is true (-1). In the first example below if AA is equal to BB OR if XX is 20, the expression is true. Logical operators work by converting their operands to 16-bit,
signed, two's complement integers in the range of -32768 to +32767.
If the operands are not in the range an error message results.
Each bit of the result is determined by the corresponding bits
in the two operands.
|