XOR
Boolean XOR of two inputs.
- Boolean
- Modelica Standard Library
- 3 ports
logicXorLibraryLogicDescription
True when exactly one of the two inputs is true.
Example
Logic gates AND, OR, XOR, NAND, NOR, and NOT on two Boolean pulse trains, and a Boolean turned into a number.
ABANDORXORNANDNORNOT ABoolean to real
Also in this example:ANDORNANDNORNOTBoolean to realBoolean pulse
Ports
Inputs 2
-
u1
First Boolean input.
-
u2
Second Boolean input.
Outputs 1
-
y
u1 xor u2.
Equations
Modelica
y = ¬((u1 ∧ u2) ∨ (¬u1 ∧ ¬u2))
Implementation
Modelica Standard Library 4.1.0
MSL documentation Modelica.Blocks.Logical.XorSee also
Select a block in Gradara and press F1 to open its page offline.