Is is possible to create modular logic gates from transistors for teaching purposes?

If all you have is NPNs and resistors, you'll want to use some form of RTL. Here, the basic logic element is the NOR gate. The one-transistor gate uses fewer transistors (obviously), but the multi-transistor gate is more robust in several ways.

And there's a teaching opportunity here, to show how the NOR gate is a "universal" logic element — all other functions can be created by combinations of NOR gates (including the degenerate 1-input NOR gate, or inverter).

Even large systems have been built this way. The original Cray-1's logic was entirely implemented using 4- and 5-input ECL NOR gates!


One implementation strategy would be to build up individual 3-, 4- or 5-input gates on single-inline modules like these:

uni-sip modules

(source)

These are easy to plug into a breadboard socket, allowing the students to focus on the logic they're building. If you need a large number of them, have a custom PCB made.

And if you're really ambitious, you could plug them into a universal wirewrap card for larger projects and a more permanent implenentation.

universal wirewrap prototype card


Building discrete logic with MOSFETs is much easier than bipolar transistors, because the high gate impedance prevents the issue you describe. NMOS circuits are easier than CMOS (which is more commonly used because it has lower power).


I think you want to follow TTL logic. I haven't done it myself, but the problem with this simple wiring up of transistors that you are showing is prone to fail when you put more of them together.

So here is the TTL way of doing things. This is a NAND gate

TTL NAND gate

what I find a good instruction here -- and you might want to sprinkle in a littler diode-resistor logic too -- is that you are entering on the emitters. This keeps the students appreciating the difference between how the logic bits "flow" as opposed to how currents flow, you know, appreciating the fact that a logic 0 state means the output element needs to sink current (that's the same lesson with the diode AND gate).

And you don't need dual emitter transistors, I have read you can just wire two transistors in parallel, base and collector together and separate emitters.

PS: if you can use my approach (please report back) and you find that you're now in need of more transistors, I will donate another 200 to your project.

The totem-pole output stage will also be interesting to experiment with. The whole nine-yards: open collector, normal always on, and three-state. Cool project.