I do apologise if this question has been asked before, but I am having trouble trying to get from !A & B || A & !B to A XOR B.
I've tried doing it in reverse by starting with A XOR B ((A || B) & !(A & B)), and I reached (A || B) & (!A || !B) and !((!A & !B) || (A & B)) using 2 different paths, and I know that the results of the 2 paths are the same because of the de morgan's law, yet I just can't figure out how to get to !A & B || A & !B.
EDIT: Just thought I'd explain my use of symbols. I'm not familiar with MathJax, and while I could use the proper symbols of ¬, ∧, ∨, it's just easier for me to type !, &, ||.
I will use notations you used for your comfort..These are used in programming, not on logics and mathematics (as far as I know).
We will start from
A XOR B = (A || B) && (!A || !B)which you have already found. The trick is to add terms such as(A || !A)where it does not change value of logic.(A || B) && (!A || !B) = ((A || B) && (!B || B)) && ((!A || !B) && (!A || A))For the first term,
((A || B) && (!B || B)) = (A && !B) || B.For the second term,
((!A || !B) && (!A || A)) = !A || (!B && A).Combining these two gives
((A && !B) || B) && ((A && !B) || !A). By simple boolean algebra you may see this is equal to(A && !B) || (B && !A), which you wanted.