# Is it possible to make a XNOR gate only with diodes without using a transistor?

I created almost all logic gates with diodes and resistors NOT, OR, NOR, AND, NAND, XOR but i have problems with XNOR and i doubt if it is even possible. I found one but this using a transistor, so my question is, is it possible to make XNOR gate only with diodes and resistors ?

Here my solution for XOR

So this is my NOT-gate.

I'm new to electronics and want to learn the basic stuff.

Ok i use now two LEDs. It's still unsatisfactory

• If you can make a not gate, just hook that up to your xnor. Commented Jan 8, 2022 at 17:45
• I don't see offhand how you can invert without active components, but if you define inputs and outputs in a sufficiently twisted way it might be possible. For example, add a battery to your XOR so the bridge output makes it turn off. There's likely no practical application since fan-in and fan-out are important factors so what is the motivation for trying? Commented Jan 8, 2022 at 17:48
• Reverse the LED. polatity and this becomes XNOR Commented Jan 8, 2022 at 17:49
• A single wire could be an inverter if one have opposite logic level definitions at the input and output. But connecting such devices together to get something useful can be tricky. To stay in truth I have never seen any math works which prove it totally useless.
– user136077
Commented Jan 8, 2022 at 17:52
• Your "NOT gate" is not a NOT gate because it can't drive anything else with an inverted output signal. You could call it a NOT indicator. Commented Jan 8, 2022 at 18:06

Your circuits are better described as logic indicators rather than gates, since their output is light from an LED rather than a logic level. In this spirit here is an 'XNOR' indicator:-

simulate this circuit – Schematic created using CircuitLab

R3 and R4 produce a fixed reference of 2.5 V. When the two inputs are different the junction of R1 and R2 is also 2.5 V, so the LED is off. When the inputs are the same (both high or both low) the junction of R1 and R2 is high or low, so there is a difference of +-2.5 V between it and the 2.5 V reference voltage. The bridge rectifier feeds positive voltage to the LED for both polarities. You could eliminate the rectifier by wiring two LEDs in parallel 'back to back' so one lights with each polarity.

Using just diodes and resistors quickly becomes untenable for more complex logic because inversion is not possible and the signal gets weaker. Then you need some kind of 'active' component that can invert signals and amplify or regenerate them, such a transistor or relay. It might be possible to use LEDs and LDRs for this, which would technically still be 'diodes' and 'resistors'.

• Thank you very much, this helped me a lot. Commented Jan 9, 2022 at 13:39

Reversing the LED polarity makes your circuit XNOR..

The logic in this and other cases depends on output 1 being indicated by a LED lighting regardless of the actual polarity.

This is interesting as learning exercise and can have some application if single gates are useful.
Major limits to extended usefulness are.

• the output in some çases must be floating and cannot be used to directly drive a ground referenced output.

• No fanout in many cases. Not for the usual loading reasons but for logic reasons.

• I think by reversing you not mean to flip it around by 180° ? So i just have to invert the LED if its off, it should be on and vice versa but how can i can i do it like that ? Commented Jan 8, 2022 at 18:22
• Yes. On and off are swapped your XOR output is inverted and gives XNOR visually Commented Jan 8, 2022 at 20:24
• Inverting the polarity of the LED in the first diagram will not work because it's fed from a bridge rectifier. You will just make a NEVER indicator. Commented Jan 8, 2022 at 20:37
• @transistor - true / doh. A wild flurry of brain activity and inverted diodes (drawn on brain) ended up with a conclusion somewhat like Bruce's one. Commented Jan 9, 2022 at 7:30