Futurebasic/Language/Reference/xor

Syntax
result&amp; = exprA {XOR | ^^} exprB

Description
Expression  and expression   are each interpreted as 32-bit integer quantities. The  operator performs a "bitwise comparison" of each bit in   with the bit in the corresponding position in. The result is another 32-bit quantity; each bit in the result is determined as follows:

A common use for  is to toggle the state of individual bits in a bit pattern. For example:

This flips bit 7 in  from 0 to 1 or from 1 to 0, and leaves all of  's other bits alone.

Example
The example below shows how bits are manipulated with :

DEFSTR LONG PRINT BIN$(923) PRINT BIN$123) PRINT &quot;&quot; PRINT BIN$(923 XOR 123)

program output: