How to change a sum of produts using AND and OR gates to make it only use XOR gates

digital-logic

I have the SOP (Sum of Products) equation: F = ¬A¬BC + A¬BC + A¬B¬C + ABC, which is the sum output of a full adder.

Could someone please help me and show me how by using Boolean algebra i can change this SOP expression to use only XOR gates.

In table below CIN is C the from formula of F above and Sum is result of F.

$$
\begin{array}{c|c|c|c|c}
\text{A} & \text{B} & C_{IN} & C_{OUT} & \text{Sum} \\
\hline
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 1 & 0 & 1 \\
0 & 1 & 0 & 0 & 1 \\
0 & 1 & 1 & 1 & 0 \\
1 & 0 & 0 & 0 & 1 \\
1 & 0 & 1 & 1 & 0 \\
1 & 1 & 0 & 1 & 0 \\
1 & 1 & 1 & 1 & 1 \\
\end{array}
$$

Best Answer

One can not implement every logical function using only XOR gates.

Since XOR is a logical operator which obeys associativity, the function implemented using only XOR gates can always be written as $$f = a_1\oplus a_2 \oplus a_3 \oplus \cdots \oplus a_n $$ where \$a_1, a_2 \ldots\$ are the inputs.

So the only possible functions that can be implemented using XOR gates are:

1. Odd number of 1's

$$\tag1 f= \begin{array}{|cl} 1 & \mathrm{if }\ N = odd \\0 & else \end{array}$$

Where N is the number of 1's in the input. \$f\$ can be implemented as $$f = a_1\oplus a_2 \oplus a_3 \oplus \cdots \oplus a_n $$

2. Even number of 1's

$$\tag2 f= \begin{array}{|cl} 1 & \mathrm{if }\ N = even \\0 & else \end{array}$$

can be implemented as $$f = a_1\oplus a_2 \oplus a_3 \oplus \cdots \oplus a_n \oplus 1 $$

3. Inverter

$$\tag3 f = \overline{a}$$ can be implemented as $$f = a\oplus 1 $$

In your case, SUM can be implemented using XOR gates only (as given in (1)) but not COUT.