Designing transistor logic gates

bjttransistorsvoltage

How would one make use of transistor logic gates ? Take for example this transistor AND gate for example .enter image description here

In all logic circuits, the output of one gate becomes the input of another . Here the output of the AND gate formed by Q1 and Q3 forms the input Q2 (which can be assumed as a NOT gate) . So , if and only if current flows through both bases Q1 and Q3 should current flow through the LED and to the base of Q2 ,thus enabling current to flow from the collector of Q2 to the emitter . This makes current flowing through "Out" essentially zero

This is how I understand AND gates . If A AND B are 1 then output is one . BUT If current flows through the base of Q3 (And not through the base of Q1) then that current will go through the emitter (with that 20k + 1k base emitter resistance{Measured with multimeter} resistance though) through the LED and to base of Q2 switching the transistor ON (The 20k resistance in conjunction with the voltage i'm applying at the base of the transistor (6v) is no where near the base emitter cut off current)

This is disastrous, the AND gate is not behaving like it should and is able to switch another base with current only applied at one base . How do you practically get around this ?

IMPORTANT : Ignore the first ground , it isn't supposed to be there

EDIT : The transistor i'm using is a 2N2222A not a 2N2222

Best Answer

Where did you get that diagram? (you copied an NMOS gate circuit??) It has some problems....

  • You mention that the first (leftmost) ground should not be there (because it would short Q2's input to ground, but what should be there is a resistor to ground that leaks the base cuirrent of Q3 to ground without switching Q2 on. With ~ 0.6mA base current I would take a 330 Ohm.

  • (not a fundamental problem, but now you could probably leave out R2, because Q2's base can take the maximum current the input stage can supply.)

  • The output has Q3 as pull-down, but it is shorted to power. You need a resistor between out and power. Its value is a balance between fan-out (the number of inputs that the output can drive) and power consumption. To simplify the disign, I would take 330 Ohm.

Now you have an RTL type gate, but with a somewhat uncommon input stage. The (old) designs I have seen use teh two input transistors in parallel, with or without an output trasistor.