Look guys this is another homework help request.
But:
1) The questioner openly stated it was homework.
2) The questioner (Emily) is surely entitled to believe that a homework question should be "doable".
3) Frankly I have trouble with gates & was surprised to need to consider how a resistor & diode could possibly do the job - and it did not immediately occur to me that it can' be done. But I am a relative beginner.
4) No-one needs to answer silly questions, lazy questions, or homework questions; but if you do a straightforward answer is what most of us expect from engineers. Alternatively good quality relevant links.
Nuff said?