Hey guys, I am working some logic problems and it is just not clicking. I am supposed to write the expression x^y (xor) using only ~ and &.

I think (~x&y)|(x&~y) is what the answer would be if we were allowed to use the | operator, but since we can't I am not sure how its done.

any pointers? Thanks in advance