XOR with 3 different OR gates

logic-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:enter image description here

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

Best Answer

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.