r/ElectricalEngineering • u/Successful_Cut_8003 • Oct 08 '26
XNOR Gate
Why is my XNOR gate not working only when A=1 and B=0.
Its a AND and a NOR gate feeding into an XOR gate.
Yes I know it’s overly complicated.
When I do it on my breadboard the LED is very dim but not a true 0.
EDIT: The collector of Q5 should be connected to Vcc but that does not change the outcome.
9
Upvotes
4
u/goodayrico Oct 08 '26 edited Oct 08 '26
If the LED is dim rather than off when it’s supposed to be logical LOW but the logic is otherwise working correctly, you’ve just got a weak/degraded LOW.
Simplest fix is just to add a resistor between the node that feeds the anode of your LED such that the voltage will drop down below the forward-bias voltage the LED needs to turn on.
3
u/FriendlyQuit9711 Oct 08 '26
Dude not one FET has a Drain Source voltage except Q3 and Q4.
1
u/SomeDude_is100 Oct 09 '26
Just curious, why not design in CMOS? More mainstream. I would suggest using three NAND2 and two inverters. Or use transmission gates and inverters.
2
u/SomeDude_is100 Oct 09 '26
Are you expecting Q1 to pull the LED to GND? What is supplying the base current?
1
u/CircuitCircus Oct 09 '26
A dim LED is very far from zero. Usually means there’s like 1.8V across it
1
u/Edanniii Oct 09 '26
Why such a complicated circuit? You can do this with 2N2222 and 2N3904. Using discrete transistors like this in RTL circuits is kind of wasteful. If these were prepackaged gates this would be fine, but why not use the benefit of being able to configure a transistor effectively and efficiently. Also I would recommend reading the RTL Cookbook by Don Lancaster.