XOR() Function - Bitwise Exclusive OR

Syntax

XOR(stringA,stringB{,ERR=lineref})

Description

The XOR() function will exclusive OR the bits of the two string arguments and return the result. The two strings must be the same length. The rules for XOR() are:

Arguments

 

Result

0 XOR 0

=

0

0 XOR 1

=

1

1 XOR 0

=

1

1 XOR 1

=

0

Examples

LET Z$=XOR($94$,$AC$)

Where:

$94$

=

10010100

 

$AC$

=

10101100

Then:

Z$ = $38$

=

00111000

0010 LET XOR$=XOR(STRA$,STRB$,ERR=9500)

See Also

Functions - Alphabetical Listing