Xor implementation C++
#include <iostream>
using namespace std;
int main() {
// a = 5(00000101), b = 9(00001001)
int a = 5, b = 9;
// The result is 00001100
cout << "a ^ b = " << (a ^ b) << endl;
return 0;
}
//Output
a^b = 12