BitOr

Performs a bitwise logical OR operation.

Method Signature

BitOr(number1=[integer], number2=[integer])

Arguments

Argument
Type
Required
Description
Default

number1

integer

true

Numeric value for bitwise OR.

number2

integer

true

Numeric value for bitwise OR.

Examples

Calculate bitwise logical OR

Uses the bitOr function to perform the logical OR operation on each pair of the corresponding bits

Run Example

bitOr( 5, 3 );

Result: 7

Additional Examples

Run Example

writeOutput( bitOr( 4, 128 ) );
writeOutput( "<br>" );
writeOutput( bitOr( 10, 0 ) );

Last updated

Was this helpful?