Diode logic

Last updated
Simple encoder in diode logic outputting a 3-bit binary index for a single High input. Animated diode logic encoder.gif
Simple encoder in diode logic outputting a 3-bit binary index for a single High input.

Diode logic (or diode-resistor logic) constructs AND and OR logic gates with diodes and resistors.

Contents

An active device (vacuum tubes in early computers, then transistors in diode–transistor logic) is additionally required to provide logical inversion (NOT) for functional completeness and amplification for voltage level restoration, which diode logic alone can't provide.

Since voltage levels weaken with each diode logic stage, multiple stages can't easily be cascaded, limiting diode logic's usefulness. However, diode logic has the advantage of utilizing only cheap passive components.

Background

Logic gates

Logic gates evaluate Boolean algebra, typically using electronic switches controlled by logical inputs connected in parallel or series. Diode logic can only implement OR and AND, because inverters (NOT gates) require an active device.

Logic voltage levels

Main article: Logic level § 2-level logic

Binary logic uses two distinct logic levels of voltage signals that may be labeled high and low. In this discussion, voltages close to +5 volts are high, and voltages close to 0 volts (ground) are low. The exact magnitude of the voltage is not critical, provided that inputs are driven by strong enough sources so that output voltages lie within detectably different ranges.

For active-high or positive logic, high represents logic 1 (true) and low represents logic 0 (false). However, the assignment of logical 1 and logical 0 to high or low is arbitrary and is reversed in active-low or negative logic, where low is logical 1 while high is logical 0. The following diode logic gates work in both active-high or active-low logic, however the logical function they implement is different depending on what voltage level is considered active. Switching between active-high and active-low is commonly used to achieve a more efficient logic design.

Diode biasing

Forward-biased diodes have low impedance approximating a short circuit with a small voltage drop, while reverse-biased diodes have a very high impedance approximating an open circuit. The diode symbol's arrow shows the forward-biased direction of conventional current flow.

Diode AND and OR logic gates

Each input of a diode logic gate connects through a diode connected to a shared wired logic output. Depending on the voltage level of each input and direction of the diode, each diode may or may not be forward-biased. If any are forward-biased, the shared output wire will be one small forward voltage drop within the forward-biased diode's input.

If no diode is forward-biased then no diode will provide drive current for the output's load (such as a subsequent logic stage). So the output additionally requires a pull-up or pull-down resistor connected to a voltage source, so that the output can transition quickly [lower-alpha 1] and provide a strong driving current when no diodes are forward-biased.

Note: the following circuits have two inputs for each gate and thus use two diodes, but can be extended with more diodes to allow for more inputs. At least one input of every gate must be connected to a strong-enough high or low voltage source. If all inputs are disconnected from a strong source, the output may not fall within a valid voltage range.

Active-high OR logic gate

Diode circuit implementing OR in active-high logic. Animated wired OR diode logic.gif
Diode circuit implementing OR in active-high logic.

Each input connects to the anode of a diode. All cathodes are connected to the output, which has a pull-down resistor.

If any input is high, its diode will be forward-biased and conduct current, and thus pull the output voltage high [lower-alpha 2] .

If all inputs are low, all diodes will be reverse-biased and so none will conduct current. The pull-down resistor will quickly pull the output voltage low.

In summary, if any input is high the output will be high, but only if all inputs are low will the output be low:

inputsoutput
LowLowLow
LowHighHigh
HighLowHigh
HighHighHigh

This corresponds to logical OR in active-high logic, as well as simultaneously to logical AND in active-low logic.

Active-high AND logic gate

Diode circuit implementing AND in active-high logic. Note: in analog implementation exact output currents will be different from +5V supply. Animated wired AND diode logic.gif
Diode circuit implementing AND in active-high logic. Note: in analog implementation exact output currents will be different from +5V supply.

This circuit mirrors the previous gate: the diodes are reversed so that each input connects to the cathode of a diode and all anodes are connected together to the output, which has a pull-up resistor.

If any input is low, its diode will be forward-biased and will conduct current, and thus pull the output voltage low [lower-alpha 3] .

If all inputs are high, all diodes will be reverse-biased and so none will conduct current. The pull-up resistor will quickly pull the output voltage high.

In summary, if any input is low, the output will be low, but only if all inputs are high will the output be high:

inputsoutput
LowLowLow
LowHighLow
HighLowLow
HighHighHigh

This corresponds to logical AND in active-high logic, as well as simultaneously to logical OR in active-low logic.

Real diode considerations

Diode law current-voltage curve. Diode approximation of Voltage vs Current.jpg
Diode law current–voltage curve.

For simplicity, diodes may sometimes be assumed to have no voltage drop or resistance when forward-biased and infinite resistance when reverse-biased. But real diodes are better approximated by the Shockley diode equation, which has an more complicated exponential current–voltage relationship called the diode law.

Designers must rely on a diode's specification sheet, which primarily provides a maximum forward voltage drop at one or more forward currents, a reverse leakage current (or saturation current), and a maximum reverse voltage limited by Zener or avalanche breakdown. Effects of temperature and process variation are usually included. Typical examples:

Transient response

Diodes also have a transient response that might be of concern. The capacitance between anode and cathode is inversely proportional to the reverse voltage, growing as it approaches 0 volts and into forward bias.

There is also a recovery concern: a diode's current will not decrease immediately when switching from forward-biased to reverse-biased, because discharging its stored charge takes a finite amount of time (trr or reverse recovery time). [1] In a diode OR gate, if two or more of the inputs are high and one switches to low, recovery issues will cause a short-term dip in the output voltage or increase current in the diodes that remain high. If a diode–transistor logic gate drives a transistor inverter of similar construction, the transistor will have a similar base-collector capacitance that is amplified by the transistor gain, so that it will be too slow to pass the glitch. But when the diode is much slower, recovery will become a concern:

In one unusual design, small selenium diode discs were used with germanium transistors. The recovery time of the very slow selenium diodes caused a glitch on the inverter output. It was fixed by placing a selenium diode across the base-emitter junction of the transistor making it think it was a selenium transistor (if there could ever be one).

Voltage losses

Cascaded AND-OR gate. High 5V level is reduced twice. The OR diode's VF drops ~0.6 V and the AND's pull-up forms a voltage divider with the OR's pull-down. Cascaded-AND-OR-diode-logic.svg
Cascaded AND-OR gate. High 5V level is reduced twice. The OR diode's VF drops ~0.6 V and the AND's pull-up forms a voltage divider with the OR's pull-down.

Active logic gates output voltages within a precise voltage range, provided that their input voltages were within a somewhat wider valid input voltage range. This level restoration allows more cascaded logic stages and removes noise, facilitating very large scale integration.

However, passive diode logic gates accumulate the following voltage losses when gates are cascaded:

Forward voltage VF drop
High voltages inputted to every OR gate are reduced by VF (~0.6 V in silicon, ~0.3 V in germanium), while low voltages inputted to every AND gate are raised by VF.
Source resistance
A voltage source's output resistance and the subsequent gate's pull-up/down resistor form a voltage divider that weakens voltage levels. This decreases high voltages in OR gates and increases low voltages in AND gates.

Thus the feasible amount of cascading is limited by the value of VF and the high-low voltage difference. With special designs, two-stage systems are sometimes achieved.

In order to compensate for the voltage drop and provide sufficient current to drive the next circuit(s) load, the pull-up resistors may be connected to a supply higher than the nominal high voltage level and similarly the pull-down resistors may be connected to a supply lower than the nominal low voltage.

Applications

Diode-transistor clock. Diode logic for transistor clock.jpg
Diode-transistor clock.

Historically, diode logic was used extensively in the construction of early computers, since semiconductor diodes could replace bulky and costly active vacuum tubes. The invention of the transistor allowed transistors to replace tubes as the active element in diode–transistor logic. Since early transistors were not reliable, the D-17B missile guidance computer, for instance, primarily used diode logic and only used transistors when necessary. Transistors quickly advanced to replace diode logic almost entirely. However, diode logic still finds some modern uses.[ citation needed ]

Cheap passive logic from active outputs

Low-impedance push–pull outputs of conventional ICs shouldn't directly be connected to external circuitry, as they may create a short circuit between power and ground. Such outputs, however, may be used as inputs to passive AND or OR diode logic gates. This avoids the costs of adding active logic gates. [3] However, diode logic will degrade voltage levels and result in poor noise rejection, so designers should be aware of the interfaced logic family's voltage ranges and limitations, to prevent failures.

Mickey Mouse Logic

The humorously-named "Micky Mouse Logic" described in Don Lancaster's CMOS Cookbook suggests using diodes as a multi-tool for augmenting the limited capabilities of regular CMOS 4000-series ICs, for instance by using a diode OR gate to add extra inputs on a flip-flop, or a diode AND gate to configure a divide-by-N counter. [4] A variant approach suggests keeping a supply of 1N914 diodes with inverting Schmitt trigger ICs to provide hysteresis and functional completeness. [5]

Any key interrupt

An active-low OR diode logic gate is formed by a keypad containing diodes at each switch, all connected to a shared pull-up resistor. When no switch is closed, the pull-up keeps the output high. But when the switch for any key connects to ground, the output goes low. This OR result can be used as an interrupt signal to indicate that any key has been pressed. Then a microcontroller can wake from power-saving standby and scan the key matrix to determine which key specifically was pressed. [6]

Tunnel diodes

During the 1960s the use of tunnel diodes in logic circuits was an active research topic. When compared to transistor logic gates of the time, the tunnel diode offered much higher speeds. Unlike other diode types, the tunnel diode offered the possibility of amplification of signals at each stage. The operating principles of a tunnel diode logic rely on biasing of the tunnel diode and supply of current from inputs over a threshold current, to switch the diode between two states. Consequently, tunnel diode logic circuits required a means to reset the diode after each logical operation.

However, a simple tunnel diode gate offered little isolation between inputs and outputs and had low fan in and fan out. More complex gates, with additional tunnel diodes and bias power supplies, overcame some of these limitations. [7] Advances in discrete and integrated circuit transistor speed and the more nearly unilateral nature of transistor amplifiers overtook the tunnel diode gate, resulting in it no longer being used in modern computers.

See also

Notes

  1. The output load will have some capacitance (even if no capacitor is added, there will be some parasitic capacitance). When all diodes are reversed biased in a high impedance state, they will only provide a minuscule amount of reverse saturation current for draining the capacitance, thus it will take too long for the output voltage to fully transition. Diodes also have a reverse recovery time.
  2. The output will be pulled specifically to one forward voltage drop less than the lowest high input voltage. The designer must ensure this output voltage should still lie within the valid high range.
  3. The output will be pulled specifically to one forward voltage drop above the highest low input voltage. The designer must ensure this output voltage should still lie within the valid low range.
  4. More realistically the germanium forward voltage might be 0.25 to 0.4 volts but this is often not specified.
  5. The silicon leakage current might be much lower, possibly 1 to 100 nanoamps.

Related Research Articles

<span class="mw-page-title-main">Diode</span> Two-terminal electronic component

A diode is a two-terminal electronic component that conducts current primarily in one direction. It has low resistance in one direction, and high resistance in the other.

<span class="mw-page-title-main">Logic gate</span> Device performing a Boolean function

A logic gate is an idealized or physical device that performs a Boolean function, a logical operation performed on one or more binary inputs that produces a single binary output.

<span class="mw-page-title-main">Multivibrator</span> Electronic circuit used to implement two-state devices

A multivibrator is an electronic circuit used to implement a variety of simple two-state devices such as relaxation oscillators, timers, latches and flip-flops. The first multivibrator circuit, the astable multivibrator oscillator, was invented by Henri Abraham and Eugene Bloch during World War I. It consisted of two vacuum tube amplifiers cross-coupled by a resistor-capacitor network. They called their circuit a "multivibrator" because its output waveform was rich in harmonics. A variety of active devices can be used to implement multivibrators that produce similar harmonic-rich wave forms; these include transistors, neon lamps, tunnel diodes and others. Although cross-coupled devices are a common form, single-element multivibrator oscillators are also common.

Transistor–transistor logic (TTL) is a logic family built from bipolar junction transistors. Its name signifies that transistors perform both the logic function and the amplifying function, as opposed to earlier resistor–transistor logic (RTL) and diode–transistor logic (DTL).

N-type metal–oxide–semiconductor logic uses n-type (-) MOSFETs to implement logic gates and other digital circuits. These nMOS transistors operate by creating an inversion layer in a p-type transistor body. This inversion layer, called the n-channel, can conduct electrons between n-type "source" and "drain" terminals. The n-channel is created by applying voltage to the third terminal, called the gate. Like other MOSFETs, nMOS transistors have four modes of operation: cut-off, triode, saturation, and velocity saturation.

<span class="mw-page-title-main">Zener diode</span> Diode that allows current to flow in the reverse direction at a specific voltage

A Zener diode is a special type of diode designed to reliably allow current to flow "backwards" when a certain set reverse voltage, known as the Zener voltage, is reached.

<span class="mw-page-title-main">Thyristor</span> Type of solid state switch

A thyristor is a solid-state semiconductor device with four layers of alternating P- and N-type materials used for high-power applications. It acts exclusively as a bistable switch, conducting when the gate receives a current trigger, and continuing to conduct until the voltage across the device is reverse-biased, or until the voltage is removed. There are two designs, differing in what triggers the conducting state. In a three-lead thyristor, a small current on its Gate lead controls the larger current of the Anode to Cathode path. In a two-lead thyristor, conduction begins when the potential difference between the Anode and Cathode themselves is sufficiently large.

<span class="mw-page-title-main">Emitter-coupled logic</span>

In electronics, emitter-coupled logic (ECL) is a high-speed integrated circuit bipolar transistor logic family. ECL uses an overdriven bipolar junction transistor (BJT) differential amplifier with single-ended input and limited emitter current to avoid the saturated region of operation and its slow turn-off behavior. As the current is steered between two legs of an emitter-coupled pair, ECL is sometimes called current-steering logic (CSL), current-mode logic (CML) or current-switch emitter-follower (CSEF) logic.

In electronics, a linear regulator is a voltage regulator used to maintain a steady voltage. The resistance of the regulator varies in accordance with both the input voltage and the load, resulting in a constant voltage output. The regulating circuit varies its resistance, continuously adjusting a voltage divider network to maintain a constant output voltage and continually dissipating the difference between the input and regulated voltages as waste heat. By contrast, a switching regulator uses an active device that switches on and off to maintain an average value of output. Because the regulated voltage of a linear regulator must always be lower than input voltage, efficiency is limited and the input voltage must be high enough to always allow the active device to drop some voltage.

<span class="mw-page-title-main">Schottky diode</span> Semiconductor diode

The Schottky diode, also known as Schottky barrier diode or hot-carrier diode, is a semiconductor diode formed by the junction of a semiconductor with a metal. It has a low forward voltage drop and a very fast switching action. The cat's-whisker detectors used in the early days of wireless and metal rectifiers used in early power applications can be considered primitive Schottky diodes.

<span class="mw-page-title-main">Differential amplifier</span> Electrical circuit component which amplifies the difference of two analog signals

A differential amplifier is a type of electronic amplifier that amplifies the difference between two input voltages but suppresses any voltage common to the two inputs. It is an analog circuit with two inputs and and one output , in which the output is ideally proportional to the difference between the two voltages:

<span class="mw-page-title-main">Schmitt trigger</span> Electronic comparator circuit with hysteresis

In electronics, a Schmitt trigger is a comparator circuit with hysteresis implemented by applying positive feedback to the noninverting input of a comparator or differential amplifier. It is an active circuit which converts an analog input signal to a digital output signal. The circuit is named a trigger because the output retains its value until the input changes sufficiently to trigger a change. In the non-inverting configuration, when the input is higher than a chosen threshold, the output is high. When the input is below a different (lower) chosen threshold the output is low, and when the input is between the two levels the output retains its value. This dual threshold action is called hysteresis and implies that the Schmitt trigger possesses memory and can act as a bistable multivibrator. There is a close relation between the two kinds of circuits: a Schmitt trigger can be converted into a latch and a latch can be converted into a Schmitt trigger.

Resistor–transistor logic (RTL), sometimes also known as transistor–resistor logic (TRL), is a class of digital circuits built using resistors as the input network and bipolar junction transistors (BJTs) as switching devices. RTL is the earliest class of transistorized digital logic circuit; it was succeeded by diode–transistor logic (DTL) and transistor–transistor logic (TTL).

<span class="mw-page-title-main">Diode–transistor logic</span>

Diode–transistor logic (DTL) is a class of digital circuits that is the direct ancestor of transistor–transistor logic. It is called so because the logic gating functions AND and OR are performed by diode logic, while logical inversion (NOT) and amplification is performed by a transistor.

<span class="mw-page-title-main">Voltage regulator</span> System designed to maintain a constant voltage

A voltage regulator is a system designed to automatically maintain a constant voltage. A voltage regulator may use a simple feed-forward design or may include negative feedback. It may use an electromechanical mechanism, or electronic components. Depending on the design, it may be used to regulate one or more AC or DC voltages.

In computer engineering, a logic family is one of two related concepts:

<span class="mw-page-title-main">Pull-up resistor</span> Electrical component to ensure a known state for a signal

In electronic logic circuits, a pull-up resistor (PU) or pull-down resistor (PD) is a resistor used to ensure a known state for a signal. It is typically used in combination with components such as switches and transistors, which physically interrupt the connection of subsequent components to ground or to VCC. Closing the switch creates a direct connection to ground or VCC, but when the switch is open, the rest of the circuit would be left floating.

<span class="mw-page-title-main">Electronic component</span> Discrete device in an electronic system

An electronic component is any basic discrete electronic device or physical entity part of an electronic system used to affect electrons or their associated fields. Electronic components are mostly industrial products, available in a singular form and are not to be confused with electrical elements, which are conceptual abstractions representing idealized electronic components and elements.

<span class="mw-page-title-main">Integrated injection logic</span> Two-BJT transistor digital logic

Integrated injection logic (IIL, I2L, or I2L) is a class of digital circuits built with multiple collector bipolar junction transistors (BJT). When introduced it had speed comparable to TTL yet was almost as low power as CMOS, making it ideal for use in VLSI (and larger) integrated circuits. The gates can be made smaller with this logic family than with CMOS because complementary transistors are not needed. Although the logic voltage levels are very close (High: 0.7V, Low: 0.2V), I2L has high noise immunity because it operates by current instead of voltage. I2L was developed in 1971 by Siegfried K. Wiedmann and Horst H. Berger who originally called it merged-transistor logic (MTL). A disadvantage of this logic family is that the gates draw power when not switching unlike with CMOS.

<span class="mw-page-title-main">Joule thief</span> Voltage booster electronic circuit

A joule thief is a minimalist self-oscillating voltage booster that is small, low-cost, and easy to build, typically used for driving small loads. This circuit is also known by other names such as blocking oscillator, joule ringer, or vampire torch. It can use nearly all of the energy in a single-cell electric battery, even far below the voltage where other circuits consider the battery fully discharged ; hence the name, which suggests the notion that the circuit is stealing energy or "joules" from the source – the term is a pun on "jewel thief". The circuit is a variant of the blocking oscillator that forms an unregulated voltage boost converter. The output voltage is increased at the expense of higher current draw on the input, but the integrated (average) current of the output is lowered and brightness of a luminescence decreased.

References

  1. "Reverse Recovery Time". Analog Devices . Archived from the original on 2023-01-18. Retrieved 2023-01-18.
  2. Bigelow, Ken (2015), Diode logic, archived from the original 7 May 2021.
  3. Integrated Circuits §Using diodes to combine outputs, Electronics Club, retrieved 27 November 2022.
  4. Lancaster, Don (1977). CMOS Cookbook (2nd ed.). USA: Howard W Sams & Co. pp. 242–245. ISBN   0 672-22459-3.
  5. Wilson, Ray. "CMOS Mickey Mouse Logic". musicfromouterspace.com. Archived from the original on 2022-09-16. Retrieved 2023-01-18.
  6. section 46.3.5 "Keypad Standby" on pg 2884 of "i.MX RT1060X Processor Reference Manual", Rev. 1, 05/2022
  7. Tunnel Diodes for Switching and Microwave Applications Technical Manual TD-30, RCA 1963, (3rd Chapter) Switching