5.6.9.8.3 Or Operator
The Or operator performs a bitwise disjunction on its operands.
-
or-operator-expression = expression "or" expression
Runtime semantics:
§ The operation to produce the result is determined based on the values of the operands, as follows:
Left Operand Value |
Right Operand Value |
Result |
---|---|---|
Integral value |
Integral value |
Bitwise Or of operands |
Integral value |
Null |
Left operand |
Null |
Integral value |
Right operand |
Null |
Null |
Null |
§ If a bitwise Or of the operands is indicated, the result is produced by generating a corresponding result bit for each pair of identically positioned bits in the implementation format of the operands according to the following table:
Left Operand Bit |
Right Operand Bit |
Result Bit |
---|---|---|
0 |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |