Lingo Dictionary > A-C > bitXor() |  |

bitXor()

Syntax

    bitXor(integer1, integer2)

Description

Function; converts the two specified integers to 32-bit binary numbers and returns a binary number whose digits are 1's in the positions where the given numbers' digits do not match, and 0's in the postions where the digits are the same. The result is the new binary number, which Lingo displays as a base 10 integer.

Integer | Binary number (abbreviated)
--- | ---
5 | 0101
6 | 0110
Result |
3 | 0011

Example

This statement compares the 32-bit binary versions of 5 and 6 and returns the result as an integer:

    put bitXor(5, 6)
    -- 3

See also

`bitNot(), bitOr(), bitAnd()`