This is possible by first XOR'ing two numbers and then converting it to a representation string
.
int n1 = 339;
int n2 = 45;
int n3 = n1 ^ n2;
string b1 = Convert.ToString(n1, 2);
string b2 = Convert.ToString(n2, 2);
string b3 = Convert.ToString(n3, 2);
source
to share