# Conversion of one digital gate to another

Discussion in 'General Electronics Chat' started by aamirali, Aug 2, 2012.

1. ### aamirali Thread Starter Member

Feb 2, 2012
415
2
How to make or and and gate using only xor gate only.
Is there any method to convert one gate to another

2. ### ErnieM AAC Fanatic!

Apr 24, 2011
7,943
1,816
I played with this for a bit and I don't see any way.

Anyone else?

3. ### crutschow Expert

Mar 14, 2008
19,526
5,445
Is this a homework problem?

4. ### WBahn Moderator

Mar 31, 2012
22,859
6,822
It can't be done.

But it seems like it should be doable:

We know that we can build any logic if we can get either a NAND function or a NOR function. We also know that, if we have an INV function, that all we need is either an AND or an OR function and we can implement anything.

Since getting an INV function from a 2-input XOR gate is trivial, we only need to get an AND, OR, NAND, or NOR (any one will do) using XORs and INVs.

So why can't it be done?

While that sounds pretty straightforward, it isn't doable. The reason is that the XOR operation is linear in the modulo-2 world (it is the addition operator) and so you can't get a non-linear operator from it (which AND and OR both are).

There may be a better explanation (and it's always possible I'm wrong, too).