EEVblog Electronics Community Forum
Electronics => Beginners => Topic started by: Infraviolet on January 14, 2023, 02:48:02 am
-
I've noticed some designs for XNOR logic gates, I just wondered what sort of advantage either could have:
(https://electrosome.com/wp-content/uploads/2012/05/Perform_the_XOR_XNOR_function_with_a_transistor_a_diode_bridge.jpg)
(left hand figure A) with diodes and a single transistor
vs
(https://electronics-fun.com/wp-content/uploads/2020/10/xnor00-768x504.png)
using 5 transistors
Is there any reason anyone would ever, in the absence of using a pre-built XNOR gate IC (far fewer options available than for other logic functions) choose the 5 transistor way?
Thanks
-
Consider the output logic levels, and also the input impedance. What happens if you cascade three gates of the first type, or mix XORs and XNORs?
-
Interesting but probably a total waste of time, effort and money. EXNORs and level shifting, if needed will be less bother.
-
The ECL type XOR circuit is not that complicated either. With the differential inputs / outputs one can have inverters as needed, so also an XNOR from the same chip.
The shown circuit would be rather slow in most cases, as the normal small signal transistors are slow (e.g. 200 ns range) when driven into saturation.
-
You can make an xnor gate with 2 transistors and 3 resistors if driven from TTL levels. Simply cross couple Q1 B to Q2 E and vice versa with a pair of resistors. Then the third goes from the junction of the collectors to Vcc.
If both inputs are high, or both inputs are low, the output is high. If either input is low and the other high, one of the transistos conducts and the output is low.
The noise margins are not fantastic but it works and is simplcity itself.
-
Isnt it funny that we call it an XNOR gate.
We first have AND and OR, and with inverted output we have NAND and NOR, which comes from N+AND and N+OR.
We then have XOR. Why don't we then call it NXOR which would be N+XOR. That would be XOR with inverted output.
Instead we call it XNOR which is X+NOR, which implies it is a NOR gate that is somehow modified.
So it is probably just a mnemonic convenience to call it XNOR.
You can create XNOR (or NXOR) from simpler gates just look at the expression for XOR:
C=AB'+BA'
which is XOR made from AND and OR and NOT gates. Inverting we get:
C=(AB'+BA')'
or:
C=(A'+B)(B'+A)
which are both XNOR.
You can also start with:
C=(A+B)(AB)'
which is XOR made from OR, NAND, and AND which is:
C=OR(A,B) AND NAND(A,B)
and invert that to get XNOR.
-
Chilternview, can you link to a schematic of that? Thank you
-
Something like this - A and B are the two inputs, and Z is the output. This is effectively RTL, I've used it to make simple fast half/full adders many years ago. You really need schottky clamped transistors to avoid them saturating and can't cascade more than 2 without losing all noise margin or adding buffers.
-
You could at least use MOSFETs to make this a little faster while drawing less power.
But that's really if you have no other option available.
-
You could, although the example I gave was in fact implemented design on a bipolar low power schottky IC process. No mosfets available!