title: Constructing logic gates from only AND, OR and NOT gates
body: <p>I am doing some revision for my exams and one of the questions that frequently occurs is to construct logic gates using only the functions AND, OR and NOT. The most commonly occurring ones are NAND, NOR, XOR, XNOR and the equivalence function.</p>
  
  <p>Am I right in saying that NAND is simply an AND gate with a NOT gate after it? And the same is true for NOR ? That seems all too simple!</p>
  
  <p>The next question is : "Draw another circuit realization of the NOR function but now you may only use NAND gets.". I remember this, but I can't explain it. </p>
  
  <p>So, we have NOR, which is NOT(A+B). Applying De Morgans to this, I get NOT(A) . NOT(B)...Ooh, and then we can't use AND, so AND = a NAND and a NAND...so we get NOT( NOT ( NOT(A) . NOT(B)))? Is this a correct reasoning? How would you then get any other function in NAND only form?</p>
  
  <p>My other question is for the XOR, XNOR and Equivalence functions. How do you work these out using only AND, OR and NOT gates?</p>
  
  <p>Also, in relation to XOR and Equivalence function, how would you answer this question - Give a formula that shows their relation,
  i.e. a formula that shows how one of these two functions can be expressed in terms of the
  other. ?</p>