Why not make them into macros?
#define XOR(a, b) boolean(a != b ? 1 : 0)
#define XNOR(a, b) boolean(a != b ? 0 : 1)
void setup(){
Serial.begin(115200);
delay(1);
Serial.println("XOR");
Serial.println(XOR(0,0));
Serial.println(XOR(0,1));
Serial.println(XOR(1,0));
Serial.println(XOR(1,1));
Serial.println("XNOR");
Serial.println(XNOR(0,0));
Serial.println(XNOR(0,1));
Serial.println(XNOR(1,0));
Serial.println(XNOR(1,1));
}
void loop() {
}
For multiple inputs, you can do this XNOR(x, XNOR(y, z));