# Solve for $b$ in $a \mathbin{\oplus} b = b-a$

I am trying to solve for $b$, however, I am not sure if I am approaching this problem correctly:

$a \mathbin{\oplus} b = b-a$

I thought that it would be possible to try to remove the XOR, and rewrite it in terms of AND and OR, however, it does not appear to solve the problem.

Is it possible to solve this problem?

EDIT:

$\mathbin{\oplus}$ is XOR

$-$ is minus(subtraction)

-
Precisely thise $b$ with $b=b|a$ solve this. – Hagen von Eitzen Aug 10 '13 at 16:49
What's the $-$? – xavierm02 Aug 10 '13 at 16:52
$-$ is subtraction – Artem Aug 10 '13 at 16:56

$a \oplus b = b - a$

$a \oplus b = a + b - 2 \cdot (a \wedge b)$

$a + b - 2 \cdot (a \wedge b) = b - a$

$2 \cdot a = 2 \cdot (a \wedge b)$

$a = a\wedge b$

(works forwards or backwards)

So, $b$ can be anything as long as it has all of $a$'s bits set.

-
Thank you, @Dan Brumleve! – Artem Aug 10 '13 at 17:17