BITOR( ) Function

Example   See Also

Returns the result of a bitwise inclusive OR operation performed on two numeric values.

Syntax

BITOR(nExpression1, nExpression2)

Returns

Numeric

Arguments

nExpression1, nExpression2

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.

Remarks

BITOR( ) compares each bit in nExpression1 to the corresponding bit in nExpression2. If either bit in nExpression1 or nExpression2 is 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 nExpression1 and nExpression2 bits:

nExpression1 bit nExpression2 bit Resulting bit
0 0 0
0 1 1
1 0 1
1 1 1