Often used for lightweight (meaning worthless ;) encryption, this will take two values and perform an exclusive OR with each bit following the basic rules of XOR. The result can be XORed with one of the original numbers to reveal the other number. See the example for more.
<br>
<br>
See also: <aclass=smallhref=And.htm>And</a>, <aclass=smallhref=Or.htm>Or</a>, <aclass=smallhref=Not.htm>Not</a>.
</td>
</tr>
</table>
<h1><ahref=../2d_examples/Xor.bb>Example</a></h1>
<table>
<tr>
<td>
num=%11110000111100001111000011110000 ; Define a bit pattern which is easy to recognize
<br/>
<br/>
bitmask=Rnd(-2147483648,2147483647) ; Define a RANDOM Xor 32bit wide bitmask
<br/>
<br/>
; This line prints the binary and decimal numbers before the Xor
<br/>
Print "Binary number is: "+Bin$(num)+" ("+num+")"
<br/>
<br/>
; This line prints the binary and decimal numbers of the Xor bitmask
<br/>
Print "Xor bitmask is: "+Bin$(bitmask)+" ("+bitmask+")"