Back to FBD reference

Basic logic

XOR

Exclusive OR

The XOR block compares two BOOL signals by difference. Q is TRUE only when one input is TRUE and the other is FALSE.

Typical FBD symbol

IN1
IN2
XOR
Q
Typical FBD symbol for XOR

Inputs

NameTypeRequiredDescription
IN1BOOLYesThe first compared signal.
IN2BOOLYesThe second compared signal.

Outputs

NameTypeRequiredDescription
QBOOLYesTRUE when inputs differ.

Stateful

No, the block does not keep internal state.

Behavior rule

Q = TRUE when the inputs are different.

Truth table

IN1IN2Q
FALSEFALSEFALSE
FALSETRUETRUE
TRUEFALSETRUE
TRUETRUEFALSE

Practical use

  • mismatch checking between two states;
  • diagnosing contradictory signals.

What to watch

  • Confusing XOR with OR. With two TRUE inputs, XOR emits FALSE.

Related blocks