I've designed a circuit and simplified it using a Karnaugh map and come up with the following after simplifying the minterms:

R =

__A__

__B__

__C__+ A

__B__

__C__+ A

__B__C + A B C

which i have simplified to:

R =

__C__

__B__+ CA

which i hope is correct

(btw sorry for underlines, they should be over the letters.. but i can't figure out how to do it on here)

I now need to design a circuit for this expression using only NAND and NOT gates. I've ages messing around with designs and testing them manually against a truth table and I can't come up with anything that works. To put it simply does anyone have an idea of how i could build this circuit using NAND and NOT gates only? Thanks in advance...