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?
Build a 3 bit full adder using only XOR gate?
3.1k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 2 best solutions below
On
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.
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.