XOR
PROGRAM XOR
VAR
BOOL1,BOOL2,BOOL3: BOOL;
END_VAR
BOOL3:= BOOL1 XOR BOOL2;
END_PROGRAM
Function calculates the exclusive disjunction of two or more inputs. Output is true if an odd number of inputs is in true.
Input | Type | Description |
---|---|---|
IN1.. | ANY_BIT | Input value |
Output | Type | Description |
---|---|---|
=> | ANY_BIT | Output value |