20-sim webhelp > Language Reference > Operators > Boolean > xor


xor

Navigation:  Language Reference > Operators > Boolean >

xor

Previous pageReturn to chapter overviewNext page

Syntax

a xor b

Description

a xor b performs a logical Exclusive OR between a and b. If a or b are not booleans, 0 represents a logical false and any nonzero value represents a logical true. The truth table for this operator is shown below.

Table

a

b

a xor b

false

false

false

false

true

true

true

false

true

true

true

false

Limitations

a and b must be scalars.