# XOR with 3 different OR gates

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:

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

• Schematics, schematics, schematics. – Andy aka Oct 14 '15 at 7:25
• sorry, i forgot to add it... – Folivora Oct 14 '15 at 21:13
• 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). – Tom Carpenter Oct 14 '15 at 21:21
• 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? – Folivora Oct 14 '15 at 21:42
• Could you post a schematic of your "OR gate without transistors"; I am not understanding your question. – Tyler Oct 15 '15 at 1:30

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.