# two laws of De Morgans law and its used as NAND gates and NOR gates [closed]

how the all gates can be made by only these two . Yes i know the circuit diagram of basic gates by universal gates which i have learnt. but if there is complex circuit like XOR gate or any other expression how would you make it please upload some links or material to explain the stuffs

• Here are some links: one, two, three. – Yuval Filmus Sep 8 '16 at 18:35
• You seem to be asking how to construct circuits for arbitrary functions. That's far too broad a question: it's essentially the same as "How do I write computer programs?", just in a different field. – David Richerby Sep 8 '16 at 19:52
• This is already explained well in the Wikipedia articles on the topic: en.wikipedia.org/wiki/NAND_logic, en.wikipedia.org/wiki/Functional_completeness, en.wikipedia.org/wiki/NAND_gate, en.wikipedia.org/wiki/XOR_gate#Alternatives. We expect you to do a significant amount of research before asking and to show us in the question what research you've done. If your question is answered in the obvious place on Wikipedia (or other standard resources like textbooks), you probably need to do more research on your own before asking. – D.W. Sep 9 '16 at 0:04
• Avoid blindly asking anything here.... – Maharaj Sep 9 '16 at 6:02

## 1 Answer

Instead of asking, finding out yourself is a very helpful learning experience.

Given two possible inputs x and y, how many possible logical functions are there?

a. Which functions of x and y can you implement using a single NAND gate? (Hint: The possible inputs are x and x, y and y, x and y).

b. Which functions of x and y can you implement using a NAND gate and inputs x, y, or a function found in (a)?

c. Which functions of x and y can you implement using a NAND gate and inputs x, y, or a function found in (a) or (b)?

and so on until you found how to implement each possible function.