See
http://www.play-hookey.com/digital_electronics/ttl_gates.html for transistor implementation of logic. Lots of other good stuff about electronics on this site.
If you want to simulate a Nand gate made with FETs, you can do it with Logisim,
http://ozark.hendrix.edu/~burch/logisim/ which is a very nice schematic based logic simulator.
--Mark