bitwise-xor

xod/bits/bitwise-xor

Computes bitwise XOR of two or more bytes. A resulting bit at a particular position is 1 only if an odd number of corresponding bits of inputs is 1.
bitwise-xor
@/bitwise-xor
Computes bitwise XOR of two or more bytes. A resulting bit at a particular position is 1 only if an odd number of corresponding bits of inputs is 1.
IN1byte
IN2byte (variadic)
bitwise-xor
OUT
IN1
IN2
OUTbyte

C++ implementation

#pragma XOD dirtieness disable

node {
    void evaluate(Context ctx) {
        auto in1 = getValue<input_IN1>(ctx);
        auto in2 = getValue<input_IN2>(ctx);
        emitValue<output_OUT>(ctx, in1 ^ in2);
    }
}