Xor
Boolean logic
Pure
Xor
A
false
Result
B
false
Description
Pure function returning true if exactly one of a and b is true.
When to use
Use Xor when exactly one of two conditions must be true — passing if either is active but not both simultaneously. A common example is a toggle that should be on when exactly one of two sources enables it, but not when both agree. For inclusive-or (either or both), use Or instead.
Pins
Input pins
| Pin | Type | Default | Notes |
|---|---|---|---|
| A | boolean | false | The first boolean operand. |
| B | boolean | false | The second boolean operand. |
Output pins
| Pin | Type | Notes |
|---|---|---|
| Result | boolean | True when exactly one of a and b is true; false when both are true or both are false. |
Example
Apply a discount when a user has either a voucher or loyalty points, but not both. Wire the voucher boolean into the A input of Xor and the loyalty-points boolean into the B input. Connect the Result output to the Condition input of Branch — the True execution output fires only when the user qualifies through exactly one source, preventing double-stacking.