I've created 3 or gates in an electric circuit with transistors (bipolair npn). I've tested 3 OR gates. with no transistors, with 1 transistor (the same as no, but the output is going to a single transistors base), and with 2 transistors. I've checked the output with an LED. All OR gates give the right output. After that I've created 3 XOR gates, an NAND gate and an OR gate ging into an AND gate. Switch A goes into input 1 in the NAND and the OR and switch B goes into input 2 in the NAND and OR gate. Only the XOR gate with the 2 transistor OR gate works but I have no idea why the others don't work. any help?

I'm using a breadboard with a 5V DC source with a max of 2.1A (phone charger)

circuit is here:enter image description here

Solution: if A is true and B isn't, current can flow to a transistor of the nand gate.

  • 10
    \$\begingroup\$ Schematics, schematics, schematics. \$\endgroup\$
    – Andy aka
    Oct 14, 2015 at 7:25
  • \$\begingroup\$ sorry, i forgot to add it... \$\endgroup\$
    – Folivora
    Oct 14, 2015 at 21:13
  • \$\begingroup\$ You realise in your schematic you have shorted the two inputs together right? (both A and B are connected together at the bottom right transistor). \$\endgroup\$ Oct 14, 2015 at 21:21
  • \$\begingroup\$ Yes, but i can't figure out why it is. An OR gate without transistors works fine except combined with other logic. If it was an short circuit, it's should be connected to a ground which it isn't right? \$\endgroup\$
    – Folivora
    Oct 14, 2015 at 21:42
  • \$\begingroup\$ Could you post a schematic of your "OR gate without transistors"; I am not understanding your question. \$\endgroup\$
    – Tyler
    Oct 15, 2015 at 1:30

1 Answer 1


As Tom pointed out, the problem is that you've shorted the inputs together, so that either A or B active means that the gate will be off, same as if they were both high. Also, you should have a series resistor for the LED. Below is a fix for the immediate problem, also showing \$\text R_{LED}\$, the series LED resistor.

enter image description here

You could also add two diodes rather than the transistor to isolate the inputs from each other.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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