# Diode Logic Gates

For some reason, I understand transistor logic gates, and I am able to solve problems, but for some reason I do not understand the and / or logic gates constructed by diodes. If someone can explain it to me using circuit analysis, I would appreciate that. • Did you try putting various combinations of 0V and Es at each of the inputs? – Ignacio Vazquez-Abrams Oct 3 '14 at 23:39
• I have done everything, it just doesn't make any sense to me. – user153322 Oct 3 '14 at 23:47
• Not even the parts where you get 0.6V or Es - 0.6V? – Ignacio Vazquez-Abrams Oct 3 '14 at 23:48
• We did not cover the part with 0.6 yet, but let's say for the and gate the input voltages are both low, why is the output low. – user153322 Oct 3 '14 at 23:55
• Because the voltage on the other side of the diodes is being held at 0.6V. – Ignacio Vazquez-Abrams Oct 4 '14 at 0:00

All you have to remember, is that current flows through a diode in the direction of the arrow.

In the case of the OR gate, if there is no potential (i.e. logic 0, or ground) on both inputs, no current will pass through either diode, and the pull-down resistor R$_{L}$ will keep the output at ground (logic 0).

If either of the inputs has a positive (logic 1) voltage on its input (In 1 or 2), then current will pass through the diode(s) and appear on the output Out, less the forward voltage of the diode (aka diode drop).

The AND gate looks more challenging because of the reversed diodes, but its not.

If either input (In 1 or In 2) is at ground potential (logic 0), then due to the higher potential on the anode side due to the positive voltage from resistor R$_{L}$, current will flow through the diode(s) and the voltage on the output Out will be equal to the forward voltage of the diode, 0.7v.

If both inputs to the AND gate are high (logic 1), then no current will pass through either diode, and the positive voltage through R$_{L}$ will appear on the output Out.

--------------------------------------------

As an aside, diode logic by itself is not very practical. As noted in the description of the OR gate for example, the voltage on the Out terminal when there is a logic high (1) on either of the inputs will be the voltage on the input minus a diode drop. This voltage drop cannot be recovered using just passive circuits, so this severely limits the number of gates that can be cascaded.

With diode logic, it is also difficult to build any gates other than AND and OR. NOT gates are not possible.

So enter DTL (diode transistor logic), which adds an NPN transistor to the output of the gates described above. This turns them into NAND and NOR gates, either of which can be used to create any other kind of logic function.

Sometimes a combination of diode logic and DTL will be used together; diode logic for its simplicity, and DTL to provide negation and regeneration of signal levels. The guidance computer for the Minuteman II missile, developed in the early 1960's, used a combination of diode logic and diode transistor logic contained in early integrated circuits made by Texas Instruments.

• I really don't understand why we even need the diodes? If we remove them, it looks like we would get the exact same truth table. – mohsinulhaq Nov 9 at 15:17

You can understand easily understand logic circuits made from diodes by considering ideal model of a diode in which we ignore 0.6-0.7v in-built forward voltage drop of a diode, any bulk resistance and non-idealities. So basically we consider ideal diode as a perfect switch: it is closed when forward biased and open when reverse biased

Ideal Diode Model

Vp = voltage at P or Anode  terminal of diode
Vn = voltage at N or Cathode terminal of diode
Vpn = Vp - Vn = terminal voltage across diode
Id = current through diode

if Vpn < 0, Diode is reverse biased and acts as an open circuit i.e. Id = 0
if Id != 0, Diode is forward biased and acts as a short circuit i.e. Vpn = 0


Using this model, lets calculate current I through through resistor

OR Gate

In1  In2  I    Out
0v   0v   0     0v
0v   Es   Es/R  Es
Es   0v   Es/R  Es
Es   Es   Es/R  Es


Whenever atleast one of the two inputs is held to high (Es), a non-zero current flows towards the ground through the resistor as respective diode is forward biased and acts as short circuit. As voltage drop across a diode acting as a short circuit is 0, therefore terminal Out is held to input high (Es). When both inputs are held to ground (0v), both diodes are reverse biased and hence open circuited and no current flows through resistor. As a result, terminal Out is now held to ground (0v)

AND Gate

In1  In2  I    Out
0v   0v   Es/R  0v
0v   Es   Es/R  0v
Es   0v   Es/R  0v
Es   Es   0     Es


Whenever atleast one of the two input terminals is held to ground (0v), their respective diode is forward biased and acts as short circuit causing non-zero current to flow through the resistor. As voltage drop across a diode acting as a short circuit is 0, therefore terminal Out is held to ground (0v). When both inputs are held high (Es), now both diodes are reverse biased and thus act as open circuits and no current flows through the resistor. As a result, terminal Out is now pulled to high (Es)

• What a perfectly adequate explanation... Kudos for not over-explaining, nor under-explaining, this topic. – DeeJayh Jun 26 '18 at 2:13

I can explain with the OR gate. The pull down resistor sets the output to 0 V, but through a relatively high impedance.

A diode can be thought of simply as a switch, if there is a positive voltage across it (where "positive" can be interpreted as more than the turn on voltage) then it is low impedance. If there is a negative voltage, there is a high impedance.

Now, look at the OR gate. If IN1 and IN2 are both low, then both the diodes are OFF (i.e. they are high impedance). So, the pulldown resistor dominates and the output is zero.

If IN1 is high, for instance, then the diode turns on and IN1 fights with the pulldown resistor. However, if IN1 has low output impedance (which it should) then it will win the tug-of-war and the output will go to IN1, or HIGH. The same argument holds if IN2 or both IN1 and IN2 are high.

Keep in mind, the diagram as drawn implies IN1 and IN2 = Es.

Also, remember the diode points in the direction of the voltage, so if the side the arrow is pointing to is less than the side the arrow is pointing from, the diode is ON.

In the "AND" case, below, Y will only go true (high) if A AND B are true, while in the "OR" case, Y will go true when A OR B are true 