How to change a sum of produts using AND and OR gates to make it only use XOR gates?
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 &amp; \mathrm{if  }\  N = odd \\0 &amp; 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 &amp; \mathrm{if  }\  N = even \\0 &amp; 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.