0% found this document useful (0 votes)
83 views

Discrete Logic Gates: OR Gate

Discrete logic gates can be implemented using diodes and resistors. OR gates output a 1 if either input is 1, implemented with diodes pointing to the output resistor. AND gates output a 1 only if both inputs are 1, with diodes pointing away from the output resistor. NOT gates require a transistor for inversion. NAND and NOR gates combine AND/OR with a NOT. XOR gates use an OR gate with an AND gate and transistor to force output to 0 if both inputs are 1. Additional gates like signal gates can be made for applications like gating pulse trains.

Uploaded by

Douthang Mate
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views

Discrete Logic Gates: OR Gate

Discrete logic gates can be implemented using diodes and resistors. OR gates output a 1 if either input is 1, implemented with diodes pointing to the output resistor. AND gates output a 1 only if both inputs are 1, with diodes pointing away from the output resistor. NOT gates require a transistor for inversion. NAND and NOR gates combine AND/OR with a NOT. XOR gates use an OR gate with an AND gate and transistor to force output to 0 if both inputs are 1. Additional gates like signal gates can be made for applications like gating pulse trains.

Uploaded by

Douthang Mate
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Discrete logic gates

I often use discrete component implementations of logic gates in my projects, often


consisting of AND and OR gates made from diodes and resistors. I "invented" or
"discovered" how to make these gates when I was about 14 and have been happily
using them ever since.

The reason I use these gates is often to save space: if all I need is one AND gate, for
example to reset a counter, then I can easily implement it with 2 diodes and a resistor. It
saves using a whole additional IC such as a 74HC08 containing four AND gates, of
which I only need one. At other times, it can be convenient to be able to build a logic
gate with as many inputs as I like. For example, a 7 input OR-gate is easily
implemented just by adding more diodes to the basic 2-input gate. I might not have the
IC's I would need in my junkbox, so I'd have to order them and wait for the delivery to
arrive. But I'll always have resistors and diodes, so this is sometimes another reason for
using logic gates made from discrete components.

There are disadvantages to these very simple logic gates too. The most noticeable is
that the output current ability of the gates is low. It is determined by the resistor used,
and by the current handling ability of the signals driving the gate inputs. If the discrete
logic gate output is driving a high impedance IC input such as are found on the modern
74HC-series IC's, there is no problem. The 0.7V voltage drop across the diodes means
that you cannot cascade the simple discrete component logic gates, because you may
easily violate the input voltage logic level specifications of the IC's following the gate:
the voltage will fall below what is recognised as a "1" for example. Finally, the discrete
component implementations of logic gates might be slower than their "proper" IC
equivalents. I do not currently know how much of a problem this is likely to be.

Now I'll try to explain the various types of gates which I commonly use.

OR gate
I'll start with this one
because it is the
easiest to understand.
The easiest way to
understand the
operation of these
gates is to consider the
diode as a simple
switch, which is closed
(on) when the voltage
on one side (the anode) is higher than the other (the cathode). The current then flows in
the direction of the arrow in the diode's circuit diagram symbol. In the diagram (right) I
show the logic symbol, my discrete component implementation, and the truth table. In
an OR gate, the output is "1" (high) if either of the inputs are "1". In this diagram, if either
of the inputs has a "high" voltage, its diode will conduct and current will flow to the
output. A "high" voltage will develop across the resistor, equivalent to the input voltage
minus 0.7V drop, as is usual across silicon diode junctions. If both of the inputs are low
voltage "0", then the diodes don't conduct. In this instance the gate's output is tied low
by the 10K resistor. 

AND gate
Now look at my AND
gate. It's similar to the
OR gate except that
the diodes point in the
other direction, and
the resistor goes to
+5V not ground. The
output of an AND gate
is "1" only if BOTH the
inputs are "1". In my
diode-resistor implementation, if either input is "low" voltage (logic "0") then the diode
will conduct and the output is effectively shorted to ground. If both of the input voltages
are "high" (logic "1") then neither of the diodes will conduct, so the output is not shorted
to ground: it remains at +5V (logic "1") via the 10K resistor. This gives the desired result.
Note that again, due to the silicon junction voltage, the actual "low" output voltage is
0.7V higher than the "low" input voltage.

NOT gate (inverter)


You cannot implement
an inverting function with
diodes and resistors
alone. You also now
need a transistor, to
provide the inverting
action. There's nothing
particularly special about
the transistor to be used,
almost any small signal
NPN transistor will suit,
since it's driven into saturation (unbiased). If the voltage presented to the base of the
transistor is above 0.7, the transistor will conduct which drags the output to logic "0", low
voltage. If the input voltage is logic "0", then the transistor does not conduct, and the
resistor will just tie the output to +5V. You always need that 10K current limiting resistor
in the base, or excessive base-emitter current will destroy the transistor.

NAND and NOR gates


These are easy: just use AND or OR followed by a NOT (inverter). In the case of the
NAND gate, the transistor's base resistor can be omitted since the maximum current is
already limited by the 10K resistor in the diode-resistor AND gate. The base resistor is
still

needed in a NOR gate.

XOR gate
This one is a little more complicated. If we start off imagining an OR gate, that works for
the first three of the possible four states in the truth table. But not the final one, where
both inputs are "1". So we need a way of forcing the output to zero. I accomplised this
using a transistor as a switch, with its base driven by an AND gate on the two inputs. So
that when both inputs are "1", the AND gate will activate the transistor, which will force
the output to zero. So the XOR gate can be considered as an OR gate, plus an AND
gate, plus a switch to zero the output. The additional diode in the base lead of the
transistor is to create an additional 0.7V drop, without it the 0.7V of the AND gate output
(even when one of the inputs is zero) would be enough to put the transistor into partial
conduction.

Signal gate
I like this one for gating
incoming pulse trains. I
use this circuit sometimes
for frequency counter
inputs for example. In the
example to the right, the
pulse is only allowed from
IN to OUT when both the
A and B inputs are "1". It's really just another kind of AND gate I suppose, effectively
having three inputs. But saves one diode compared to an AND-gate implementation as
above. (Well, even a 2-input AND gate or OR gate can be reduced to a single resistor
and a single diode, in that case - but somehow I prefer the more balanced approach
with two diodes and a resistor). In the diagram to the right, the diodes could be reversed
and the output would then be forced to "1" if either of A or B were a "1". This could be
useful to drive a negative edge triggered counter clock input, for example. 

Other notes
1. Gates with more than two inputs: Easy! Just add more diodes, one for each input! 

2. The 10K resistor: I have shown 10K for the purposes of illustration only. In reality
resistance value needs to be chosen depending on the input resistance of the following
circuit that needs to be driven by the output. It needs to be relatively small in
comparison. If the gate is driving a single 4000-series CMOS or 74HC-series logic IC
input, then the resistor could easily be made upwards of 100K or even 1M, depending
on the application. 

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy