Difference between revisions 141901230 and 141901232 on dewiki

'''Diode logic''' or '''Diode-resistor logic''', is a circuit style that uses [[diode]]s to construct [[Boolean logic|Boolean]] [[logic gate]]s for [[electrical circuit|circuits]]. Only non-[[inverter (logic gate)|inverting]] functions may be implemented, so it is not a complete [[logic family]]. Furthermore, such circuits are non-restoring: the output of any gate is further from a perfect ''0'' or ''1'' than the input, so only a few gates may be chained together. For these reasons, such circuits do not qualify as [[digital logic]]. Nevertheless, some gates may be constructed in the style of a digital logic family. Pure diode logic has never been popular, as it has almost no advantages besides extreme simplicity. None of these things are true of [[diode–transistor logic]].

==Overview==
A Boolean [[logic gate]] should act as a [[voltage source]], and provide one of two voltage levels to represent the Boolean logic result. Diode-resistor gates work by using any of an array of diodes to drive one of these levels, and if all the diodes are off, allowing a resistor to drive the output instead. The resistor is always on, but any diode acting as a voltage source will override it.

===Non-restoring logic===
Digital logic is characterized by signal restoration. ''True'' and ''false'' or ''1'' and ''0'' are represented by two specific voltage levels. If the inputs to a digital logic gate is close to their respective levels, the output will be closer or exactly equal to its desired level. Gates may be integrated in large numbers because each gate tends to remove noise at its input.

Diodes and resistors cannot remove noise, and diodes always add noise. The [[p-n junction]] in a diode ceases to conduct at less than a certain voltage difference. This voltage difference, typically 0.6—0.8 V, is added to or subtracted from the input of every gate. The feasible number of logic stages thus depends on the difference between the high and low voltages.

Unlike true logic families, diode-resistor gates use the inputs as a voltage source to drive the output. A voltage source is characterized by its [[electrical resistance]]. Other voltage sources in diode logic are implemented by resistors. To work properly, the inputs must be better voltage sources than the resistors. If a weak source (for example, another large resistor) is connected to the input, the gate's resistor will continue to override the weakened diode.

===No inversion===
Diodes ideally pass the input voltage directly to the output when turned on. The only way to achieve an output opposite to the input is to disconnect all the diodes and use only the resistor. There is no way to use the resistor only when an input is applied, nor to obtain a voltage from the diode which isn't a constant difference from the input.

===Current switching===
One sense where diodes are superior to transistors is in handling large currents. If voltage is neglected, diodes are good at forming OR gates for multiple current sources.

==OR gate construction==
[[image:Diode-OR2.png|thumb|right|Diode OR gate: example with two inputs]]
To construct an [[OR gate]] with ''n'' logic inputs, the following components are required:
* ''n'' diodes
* a [[resistor]] of much more resistance than anything you wish to turn the gate on

''n'' + 2 electrical nodes are used (counting ground as a node).

The circuit of a two-input gate is shown opposite. The cathode of every diode is connected to the output at Node 1. A resistor connects Node 1 to ground (low voltage, Node 2), and the remaining ''n'' nodes are the inputs.

Whenever a logic ''1'' is present at the anode of a diode, it forward-biases that diode, causing it to conduct. The input can then induce a current at the output through the resisitor, to cause the output voltage to be closer to ''1''.

If a logic ''0'' is present at the anode of every diode, they are all reverse-biased and the resistor drives node 1 low.

==AND gate construction==
[[image:Diode-AND2.png|thumb|right|Diode AND gate: example with two inputs]]
To construct an [[AND gate]] with ''n'' logic inputs, the following components are required:
* ''n'' diodes
* a [[resistor]] of much more resistance than anything you wish to turn the gate off

An example circuit is shown on the right. The resistor connects Node 1 to the supply voltage at Node 2. Nodes 4 and 5 are the inputs. The output is obtained at Node 1. 

If a logic ''1'' is present at the cathode of every diode, then they are all reverse biased, remaining in a high-impedance state, and Node 1 is held high by the power supply through the resistor. 

If a logic ''0'' is present at any input, it forward-biases that diode and may hold Node 1 low through the diode.

==References==
*[http://www.play-hookey.com/digital/electronics/dl_gates.html Diode logic]
* [http://www.robotroom.com/Joystick2.html "Joystick Controller: Using Diodes to Create OR Circuits"] by David Cook

[[Category:Logic families]]

[[id:Logika dioda–resistor]]