# Change Boolean expression of XOR from AND-OR to OR-AND

I have the Boolean of XOR as (ab') + (a'b), which is AND-OR; I need to turn it into an OR-AND.

I tried taking its complement, ((ab') + (a'b))' >> (ab')'(a'b)' >> (a'+ b)(a + b'), which does yield an OR-AND, but the truth tables dont align.

As Donald Splutterwit shows, the formal way to do this involves using the distribution laws. If you simply take the complement, then of course you can't expect the truth tables to align.

Here's an informal way to get the answer. As you note, $ab' + a'b$ is exclusive or: the expression is true when

[$a$ is true and $b$ is false] or [$a$ is false and $b$ is true].

That's clearly equivalent to "either $a$ or $b$ is true but not both $a$ and $b$ are true." Or, "either $a$ or $b$ is true, and either $a$ or $b$ is false. More formally,

[$a$ is true or $b$ is true] and [$a$ is false or $b$ is false].

More formally still, we can write $(a + b)(a' + b')$, which is the desired result.

• Up'd for detail, selected Donald's answer as final since it was posted first and I can discern the distributive and complement properties. Your detail is great though. Nov 21, 2017 at 22:44

Note that $a a'=0$ \begin{eqnarray*} ab'+a'b= aa'+ab'+ba'+bb'=a(a'+b')+b(a'+b')=(a+b)(a'+b') \end{eqnarray*}

• Alternatively just distribute then cancel the tautologies:${\quad~(a\cdot b')+(a'\cdot b) \\= ~(a+a')\cdot (a+b)\cdot (b'+a')\cdot (b'+b)\\=~(a+b)\cdot (a'+b')}$ Nov 21, 2017 at 22:56
• @GrahamKemp Was quite literally typing that. I thought the distribution was wrong her since it should be considered distributive of OR over AND. I wasnt able to figure out where Donald got his from, but yours aligned with my text and my own solution. Nov 21, 2017 at 22:58
• Donald just worked backwards from the anticipated result. ${\quad~ (a+b)\cdot (a'+b') \\ =~ aa'+ab'+a'b+b'b \\ =~ ab'+a'b }$ Nov 22, 2017 at 0:58