Build a 3 bit full adder using only XOR gate? I don't know if this is the right place to ask this, but I'm trying to design the logic for a simple calculator and I was wondering how can you build/design a 3 bit full adder using only XOR (one or the other but not both) gates and no AND or OR gates as well. How can it be done using only XOR operation?
 A: To implement 1 bit full adder you need 2 XOR gates 2 AND and 1 OR gate. You can construct a NOT gate using XOR, but the other crucial operation, OR, cannot be constructed with it. If it was possible, you could make yourself AND gates using 3 NOT's and 1 OR, and then pretty much have everything you need to make a full adder.
A: As JamMaster said, you definitely need more than just an XOR to create a full adder.
Here is the logic for one bit of a full adder (expandable):
A full adder takes three inputs, $a$, $b$, and $c_{in}$, which denote the two bits being added as well as a possible carry bit.
Using these three inputs, the output $o$ is given by $\left(a \oplus b\right) \oplus c_{in}$.
Then, the carry out $c_{out}$ is true iff two or more of the three inputs are true. Thus, $c_{out} = \left(a \wedge b\right) \vee \left(\left(a \vee b\right) \wedge c\right)$.
This is the schematic for a simple ripple carry adder, and I would say that it is a very simple expandable addition circuit to begin with. To expand it, simply place multiple (in your case three) instances of the circuit side by side equal to the number of bits you wish to add. Connect the $c_{out}$ of one circuit to the $c_{in}$ of the next least significant bit.

In total, you need two of each of the following gates: AND, OR, and XOR.
A: It is not possible:


*

*Using XOR gates, you can only get an n-ary XOR of several of the input wires.

*The carry depends on all three input wires.

*The carry is not the 3-ary XOR of the input.


Proof of 1 is a case for mathematical induction:


*

*The claim holds for a circuit consisting of one XOR gate.

*Adding a XOR between the outputs of two XOR gates produces a XOR operation on the original inputs. This is easy to see if we define XOR as the parity, outputting 1 if an odd number of inputs is 1.


Note that this approach only works for acyclic circuits. I claim without a proof that any circuit containing a cycle will either have no solution or both 1 and 0 as solutions.
Proof of 2: assume we know one input is 1 and another is 0. The carry can be either 0 or 1, depending on the third input.
Proof of 3: XOR(1, 0, 0) is 1 but the carry is 0 in this case.
