Solving for a and b from xor and difference

43 Views Asked by At

Can we solve for a and b, from

$a-b = x$

$a \oplus b = y$

Even when x and y can be negative?

I tried substituting the value of a in xor equation from the difference,

$\Rightarrow (b+x)\oplus b = y$

Since $b \oplus b$ is 0

$\Rightarrow x \oplus b = y$

But, then how to solve for b?