Or Operator

Language Items List

Definition:

Used to perform a bit-wise disjunction on two expressions.

Syntax:

result = expr1 Or expr2

Details:

The Or Operator, sometimes called Inclusive Or, performs a bit-wise comparison of identically positioned bits in two numeric expressions and sets the corresponding result bit as shown in the following table. Notice that the result bit evaluates to off (0) only when the bits in both expressions are off.


expr1 bit expr2 bit result bit


0 0 0

0 1 1

  1. 0 1

  1. 1 1

See Also:

Arithmetic Operators
Comparison Operators
Operator Precedence