There is general solution or 'trick' for that:
a <- 1b <- 2a <- a + bb <- a - ba <- a - b
Here's a useful link that explains a lot: xor-trick
There is general solution or 'trick' for that:
a <- 1b <- 2a <- a + bb <- a - ba <- a - b
Here's a useful link that explains a lot: xor-trick