Skip to content

Math.Xor

Name Mandatory Description Default Type
⬅️ Input The value or the sequence of values to compare the value specified in the Operand parameter with. IntInt2Int3Int4Int8Int16Color[Any]Bool
Output ➡️ This shard outputs the value resulting from the XOR operation. IntInt2Int3Int4Int8Int16Color[Any]Bool
Operand No The value or sequence of values to compare the input with. 0 IntInt2Int3Int4Int8Int16Color[Any]BoolVar(Bool)

This shard performs a bitwise XOR operation on the input with the value specified in the Operand parameter and outputs the result. A bitwise XOR operation is a binary operation that compares each bit of the binary representations of two numbers and outputs 1 if the bits are different and 0 if they are the same. The shard then outputs a value, whose binary representation is the concatenation of the resulting 1s and 0s from the XOR comparison.

Examples

1
2
@i4(0 2 4 8) | Math.Xor(Operand: @i4(3 3 3 3)) | Log
Assert.Is(@i4(3 1 7 11) Break: true)

[info] [sample-wire] @i4(3 1 7 11)