Diodes are the simplest non-linear elements in electronics circuit. By non-linear it means the relationship between the input and output signal is non-linear. Non-linear components like diode finds application in signal processing such as rectifiers, signal waveform generation, modulation, mixers, logic gates and others. In this educational tutorial we will show how to make logic gates OR, AND and XOR gates using diodes.

The operation is such that when the voltage across the diode exceeds the diode forward voltage( for example 0.6V to 0.7V for silicon diodes), the current is passed through the diode, that is the diode is short circuit otherwise the current passage through the diode is blocked, that is the diode is open circuit. The short circuit condition is called reverse biased and the diode is said to be cutoff or simply called OFF. Similarly, the open circuit condition is called forward biased and the diode is said to be ON.

The following illustrates how a diode works. Consider a 1N4148 diode driving by sine wave of frequency 1KHz and amplitude of 1V.

Here are some example application circuit of a Diode.

### Rectifier

The following shows the input signal in yellow and the output signal in blue from the diode.

It illustrates that during the positive cycle of the input signal the signal is passed through and we get half sine wave in blue at the output. But during the negative cycle of the sine wave input the signal is blocked and we get no signal at the output. This shows the rectifying nature of a diode.

### Diode Logic Gates

Another application of diode is logic gates. Diodes can be used to create diode logic gates.

**Diode OR gate **

The following circuit shows two 1N4148 diodes used as two input OR gate.

The following is the OR gate truth table.

The mathematical operation of OR gate is described by the following equation.

C = A+B

The circuit symbol of an OR gate is as follows.

Now the above diode OR gate implements this as shown below.

**Diode AND gate**

The following circuit shows AND gate implementation using diode.

The AND gate logic table is below.

The mathematical operation of AND gate is as follows.

C = A * B

The schematic symbol of AND gate is shown below.

Now the following shows the AND gate implementation using the two diode circuit above.

**Diode XOR gate**

The following shows how to implement XOR gate using diode.

The truth table of XOR gate is shown below.

And the circuit drawing of XOR is below.

Now the following shows the XOR gate implementation using the diode circuit above.

In this educational tutorial it was shown how to make logic gates with diodes. This is one application of diodes. Other diode application includes non-linearity application of diode such as illustrated in single diode AM modulator and in AM Transmitter using Single Diode Modulator.

See the following video how to make and simulate the above logic gates using diodes in Proteus.

So in this tutorial it was shown how one can build logic gates with diodes. The next tutorial explains how to implement or build Logic Gates with Transistors. For universal gate implementation see the tutorials 74S02 two input NOR gate and 74ALS00AN NAND gate which shows how one can build and test a NOR gate and a NAND on breadboard respectively.