I built a simple transistor AND gate as specified by the following schematic:



It works very well, however it outputs a small amount of current when input B is HIGH, enough to illuminate a standard 3mm LED. Why does this happen? How can it be prevented? Ultimately I would like this circuit to illuminate the LED only when both inputs are set to HIGH.

  • 1
    \$\begingroup\$ As ever, a full circuit diagram is in order, be it apparently ever so simple. Or a COMPLETE word picture at minimum. When B is "high" what is connected to A? Is it grounded or floating or grounded via a resistor or connected to some other gate output etc ? \$\endgroup\$
    – Russell McMahon
    Oct 6, 2013 at 7:52
  • \$\begingroup\$ When I say input B is "HIGH", I mean that input B is connected to the 6v source and input A is connected to ground. \$\endgroup\$
    – fbonetti
    Oct 6, 2013 at 15:44

3 Answers 3


This is because of the base current. The current comes from the signal source.

Also, note that the demonstrated schematic is simply wrong. The proper AND gate has to amplify the signal, so with similar technique you can only build NAND element. If you need AND - simply make one NAND and then invert the output signal once more.


simulate this circuit – Schematic created using CircuitLab


When A is grounded and B is connected to the supply, the lower transistor's base-emitter junction acts like a diode. So you basically have two resistors with a diode connected between them as an equivalent circuit. When you connect the LED it shunts the 4.7k resistor, so the equivalent circuit is the 10k resistor in series with the BE diode and the LED.

The LED will stay off in this case only if the drive voltage to the B input is below approximately the LED forward voltage and one diode drop.


There are many possibilities

  1. you might have connected the transistors wrongly..the emitter of the first should be connected to the collector of the second and not to the emitter, if it is so, then the current resulting when you connect a high input to terminal 'a' would be sufficient to cause a small current flow through Q2. that would cause the led to turn on since the led requires only a minimum of 2mA to light up.
  2. Even if the connections were correct, if i am not mistaken, the small current through Q2 i.e. the lower transistor should be sufficient enough to light up the LED.if thats the case use an led with a much larger minimum current rating.

Remember all these are only possible if you connect the high input to the top transistor. There is no way you would see this if you connected the input to the lower transistor.

So check the connections again, make sure they are correct, use an LED with a higher current rating and see if this solves the problem. Happy Hacking!! :)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.