Function Reference

BitOR

Performs a bitwise OR operation.

BitOR ( value1, value2 [, value n] )

 

Parameters

value1 The first number.
value2 The second number.
value n [optional] The nth number - up to 255 values can be specified.

 

Return Value

Returns the two parameters bitwise-OR'ed together.
Bit operations are performed as 32-bit integers.

 

Remarks

Remember hex notation can be used for numbers.
BitOR returns 0 in each bit position where all input arguments have a 0 in the corresponding
position and 1 wherever there is at least one 1-bit.

 

Related

BitAND, BitNOT, BitShift, BitXOR, Hex, BitRotate

 

Example


$x = BitOR(3, 6) ;x == is 7 because 0011 OR 0110 = 0111

$x = BitOR(3, 15, 32) ;x == 47 because 0011 OR 1111 OR 00100000 = 00101111