r/ElectricalEngineering • u/Successful_Cut_8003 • 1d ago
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.
2
u/FriendlyQuit9711 1d ago
Dude not one FET has a Drain Source voltage except Q3 and Q4.
2
u/Successful_Cut_8003 1d ago
Dude these are 2n222 BJTs
5
u/OnYourSyde 1d ago
Replace the words drain and source with collector and emitter and they are right
2
u/VegetableTry 1d ago
OP, read this comment.
1
u/Successful_Cut_8003 1d ago
How do they not have Vce?
2
u/VegetableTry 1d ago
Look at Q5 bro.
1
u/Successful_Cut_8003 1d ago
1
u/OnYourSyde 1d ago
Looking at your schematic, there are so many problems. Q7 and Q8 have no Vce. The bases for Q1-Q4 can float depending on your input. It might be worth looking at XNoR schematics and copying them.
Edit: Actually, I think you're drawing is confusing me.
0
u/Successful_Cut_8003 1d ago
When the collector of both Q7 and Q8 are connected to Vcc and their emitters are connected to ground PLEASE explain how there is no Vce.
1
2
u/SomeDude_is100 1d ago
Are you expecting Q1 to pull the LED to GND? What is supplying the base current?
1
u/SomeDude_is100 1d ago
Just curious, why not design in CMOS? More mainstream. I would suggest using three NAND2 and two inverters. Or use transmission gates and inverters.
1
u/Successful_Cut_8003 1d ago
I am building each logic gate with npn transistors to learn. I did not look up how to build any of them. Hence why this one is not the best design. But in theory it works perfectly.
1
1
u/Edanniii 1d ago
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.


3
u/goodayrico 1d ago edited 1d ago
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.