0
$\begingroup$

How would I rewrite an XOR gate into the three basic logic gates (AND, OR, NOT). To be more specific, I have to write it in such a way with 2 NOT gates, 2 OR gates, and 1 AND gate. I also have to do it with 1 OR gate, 2 AND gates, and 1 NOT gate.

I'm not looking for just the answer, I'm looking for a way to come up with the answer.

Thanks!

$\endgroup$

closed as unclear what you're asking by D.W., David Richerby, Juho, Luke Mathieson, Tom van der Zanden Jul 2 '15 at 6:52

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ Try writing XOR in conjunctive or disjunctive normal form. $\endgroup$ – Yuval Filmus Jun 29 '15 at 3:18
  • $\begingroup$ You do it in the same way you'd implement any function using some set of gates. $\endgroup$ – David Richerby Jun 29 '15 at 5:30
0
$\begingroup$

Hint: $a \oplus b = \neg \big( (a \land b) \lor (\neg a \land \neg b)\big)$ (you can't have both true and you can't have both false). Using De Morgan's, you should be able to break up the negation and the main $\lor$.

$\endgroup$
  • $\begingroup$ Thanks, I did De Morgan's law multiple times and I got the answer to both parts! $\endgroup$ – 4everPixelated Jun 29 '15 at 22:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.