Some time back I found a circuit on the Internet that professed to build a logical OR gate with two transistors; accompanying it was a circuit that professed to build a logical AND gate, also with just two transistors.
But then I got to thinking that one transistor by itself is practically a logical AND gate, isn't it? If the voltage at an NPN transistor's base is high, then there will be no resistance between the collector and the emitter, so the voltage at the emitter will be high if the collector is high, and low if the collector is low. And if the voltage at the base is low, the voltage at the emitter will be low regardless of the voltage at the collector.
Similarly, if the voltage at a PNP transistor's base is low, then the voltage at the emitter will be roughly the voltage at the collector, while if the voltage at the base is high, then the voltage at the emitter will be low regardless of the voltage at the collector.
That being the case, could I build a multiplexer with just four transistors via the following circuit? The inputs are bits Co (for control), Il, and Ih, and the output is bit Ou. The semantics are that Ou will take the value of Il if Co is low, and the value of Ih if Co is high. Vcc is high voltage and Gnd is ground.
simulate this circuit – Schematic created using CircuitLab