BITOR( ) Function
Returns the result of a bitwise inclusive OR operation performed on two numeric values.
BITOR(nExpression1, nExpression2, …, nExpressionN )
Return Values
Numeric
Parameters
nExpression1, nExpression2, nExpressionN
Specifies the numeric values on which the bitwise inclusive OR operation is performed. If nExpression1 and nExpression2 are not integers, they are converted to integers before the bitwise inclusive OR operation is performed.**Note ** A maximum of 26 parameters can be passed.
Remarks
BITAND( ) compares each bit in nExpressionN to the corresponding bit in nExpressionN+1. If the bits in nExpressionN and nExpressionN+1 are both 1, the corresponding result bit is set to 1; otherwise, the corresponding result bit is set to 0.
The following table shows the result of an inclusive OR operation on corresponding nExpressionN and nExpressionN+1 bits*:*
nExpressionN bit | nExpressionN+1 bit | Resulting bit |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
Example
x = 5 && 0101 binary
y = 6 && 0110 binary
? BITOR(x,y) && Returns 7, 0111 binary
See Also
BITAND( ) | BITCLEAR( ) | BITLSHIFT( ) | BITNOT( ) | BITRSHIFT( ) | BITSET( ) | BITTEST( ) | BITXOR( )