Wilang Documentation1.0.0+4

bitXor#

Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.

Available in: math cells, REPL.

Syntax#

bitXor(x, y)

Arguments and behavior#

Arguments must match one of the syntax forms above. Use the example as a starting point; arrays and numeric types are accepted only by compatible overloads. The example returns scalar (number).

Example#

Edit the inputs, then use Run or Reset. Changes stay in this example.

Example
bitXor(6,3)

Expected result: 5.

See also#

bitAnd · bitNot · bitOr · leftShift · rightArithShift · rightLogShift

All functions · Math guides