There are two types of transistors: NPN and PNP. NPN is look like And gate but they aren't the same thing. The transistor is more like 3-state buffers but also they aren't same. Because they have common things but you have to add a resistor. So differents between 3-state buffers and transistors are one of it is a logical thing and other one is a real component and some technical things (voltage and other things). But for PNP it's a PNP transistor and not gate but also they aren't same thing with NAND gate.