BitXor

Performs a bitwise logical XOR operation.

Method Signature

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

Arguments

Argument
Type
Required
Description
Default

number1

integer

true

Numeric value for bitwise XOR.

number2

integer

true

Numeric value for bitwise XOR.

Examples

Calculate bitwise logical XOR

Uses the bitXor function to perform the logical XOR operation on each pair of the corresponding bits

Run Example

bitXor( 5, 3 );

Result: 6

Additional Examples

Run Example

writeOutput( bitXor( 128, 5 ) );

Last updated

Was this helpful?