digital-logic-ebook
digital-logic-ebook
FundAmentals
For Students, Professionals
and Beyond
eBook 19
w w w. el ec t r o n i c s -t u to r i a l s .w s
Logic G ate Funda menta l s
TABLE OF
Our Terms of Use
CONTENTS
This Basic Electronics Tutorials eBook is focused on the fundamentals of digital logic
gates with the information presented within this ebook provided “as-is” for general
information purposes only.
1. Digital Logic Fundamentals . . . . . . . . . . . . . . . . . . . . . . 1
2. Digital Logic Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 All the information and material published and presented herein including the text,
graphics and images is the copyright or similar such rights of Aspencore. This represents
3. Digital Logic AND Gate . . . . . . . . . . . . . . . . . . . . . . . . . 4 in part or in whole the supporting website: www.electronics-tutorials.ws, unless
4. Digital Logic OR Gate . . . . . . . . . . . . . . . . . . . . . . . . . . 6 otherwise expressly stated.
5. Digital Logic NOT Gate . . . . . . . . . . . . . . . . . . . . . . . . . 8 This free e-book is presented as general information and study reference guide for the
education of its readers who wish to learn Electronics. While every effort and reasonable
6. Digital Logic NAND Gate . . . . . . . . . . . . . . . . . . . . . . . . 9 care has been taken with respect to the accuracy of the information given herein, the
7. Digital Logic NOR Gate . . . . . . . . . . . . . . . . . . . . . . . . 10 author makes no representations or warranties of any kind, expressed or implied, about
the completeness, accuracy, omission of errors, reliability, or suitability with respect to
8. The Exclusive OR Gate . . . . . . . . . . . . . . . . . . . . . . . . 11 the information or related graphics contained within this e-book for any purpose.
9. The Exclusive NOR Gate . . . . . . . . . . . . . . . . . . . . . . . 12
As such it is provided for personal use only and is not intended to address your particular
10. The Digital Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 problem or requirement. Any reliance you place on such information is therefore strictly at
your own risk. We can not and do not offer any specific technical advice, troubleshooting
assistance or solutions to your individual needs.
We hope you find this guide useful and enlightening. For more information about any of
the topics covered herein please visit our online website at:
www.electronics-tutorials.ws
Logic gates are devices in electronics that make up the fundamental building blocks of -
all digital circuits. They are manufactured as integrated circuits, commonly known as IC’s 0v
for soldering onto circuit boards. Generally speaking, digital logic gates have one or more 0 Wiper Position
inputs along with one single output and perform a variety of Boolean operations.
While there may be only a few different Boolean Here the output from the potentiometer (VOUT) varies as the wiper terminal is rotated. This
algebra operations to be performed, digital logic Analogue signals represent produces an infinite number of output voltage points between 0 volts and the maximum
circuits can repeat these switching operations many physical properties with supply voltage (VMAX).
times over, and at a very fast speed. analogue circuits managing
those signals This output voltage can be varied either slowly or rapidly from one value to the next. Thus
In electronics terms, an analogue device or system there is no sudden or step change between any two voltage levels thereby producing a
deals with one continuously variable voltage or current signal since they process physical continuously variable output voltage. That is, analogue quantities are non-discrete with a
quantities such as sound levels, light intensity, temperature, pressure, etc. Thus, all limitless number of possibilities.
electrical circuits and systems can be viewed as a collection of analogue circuits.
1.2 Digital Signals
Digital circuits however differ from analogue circuits in that they deal with only two, well-
defined, but discrete voltage levels being HIGH or LOW, ON or OFF. That is one stable Digital electronic circuits on the other hand only have two different voltage levels or
state or another. Sometimes it is required to convert these continuous analogue signals states. These voltage states are generally referred to as Logic “1” and Logic “0”, or HIGH
into a digital form using analogue-to-digital converters (ADC’s), and vice versa, using (true) and LOW (false). For example, the “HIGH” and “LOW” states could be represented
digital-to-analogue converters (DAC’s). Either way, analogue and digital circuits process by 5V and 0V respectively. The exact value of these two voltage levels will depend on
their data and signals differently. the technology being used such as TTL (transistor-transistor logic) or Advanced CMOS
technology.
w w w.e l e c tro nic s- tu to r ials .ws 1
Logic G ate Funda menta l s
Figure 2. Digital Voltage Representation Digital signals with only two voltage levels or steps are based on the binary or Base-2
+5v Voltage numbering system. In Boolean Algebra the binary numbering system is used to describe
VOUT these two voltage levels being represented by the binary digits of “1” and “0” respectively.
R 5v But what do we mean by a binary “1” and a binary “0” signal.
4v
4v
R 6
2. Digital Logic Levels
3v 5
VOUT 3v
4
R All digital circuits handle input and output signals in which one of two possible voltage
3
2 2v states are present at any one time. A logic-1 (HIGH) or a logic-0 (LOW). While precise DC
2v
1 input and output voltages are not absolutely necessary in digital electronics, each of
R
1v these two voltage levels must fall within a specific DC voltage range to be classed as valid.
1v
Digital logic gate circuits are constructed using transistors with the type of transistor used,
R 0 Bipolar or MOSFET, determining the voltage characteristics of the circuit. For example,
1 2 3 4 5 6
0v Switch Position bipolar transistors create TTL (transistor-transistor logic) devices such as the 7400 series,
with their supply voltage, VCC being fixed at +5 volts. But lower voltages such as 3.3 V, 2.5 V,
In Figure 2. the potentiometer wiper has been replaced by a single 6-position rotary 1.8 volts are now available
switch which is connected in turn to the junction of the series resistor chain. This forms a
basic potential or voltage divider network were each resistor is of an equal value (R). CMOS (complementary metal-oxide silicon) Standard Transistor-transistor
devices such as the 4000 series are constructed logic, or TTL was the original
As the switch is rotated from one position (or node) to the next, the output voltage, VOUT using complementary MOSFET or JFET type Field logic gate circuit type
changes quickly in discrete and distinctive voltage levels or steps representing multiples Effect Transistors for both their input and output
of 1.0 volts on each switching action, as shown in the output graph of Figure 2. circuitry so can use a supply voltage VDD from between +3 to +18 volts DC. However, they
So for example, the output voltage, VOUT will be 2 volts at position 3, and 3 volts at position commonly operate on +5 volts when used in the same circuit with TTL 74-series devices
4, and 5 volts at position 6, etc. Because of this switch action, VOUT cannot be 2.5V, 3.1V or such as the HC or AC High Speed CMOS sub-family.
4.6V, etc. Only steps of 1 volt. Digital logic gates are commonly referred to as two-state switching circuits because they
Digital signals have only two switch between HIGH and LOW voltages, or ON and OFF representing binary digits of “1”
Finer output voltage levels could easily be produced
discrete states with digital or “0” respectively.
by increasing the number of resistive elements within
circuits managing those
the potential divider network thereby increasing the In standard TTL (transistor-transistor logic) IC’s there is a pre-defined voltage range for the
states
number of discrete switching steps. input and output voltage levels which defines exactly what is a logic “1” level, and what is
Then we can see that a digital output voltage can never be a continuous value but will a logic “0” level. These valid input voltage levels and output voltage levels of a digital logic
change in discrete steps and for digital signals, only two logic levels are allowed. gate are shown in Figure 3.
Figure 3. Digital Voltage Levels Any input or output voltage level which does not fall within either of a logic devices
ranges are said to be indeterminate and are therefore not valid logic levels. Floating or
VCC = 4.75V Min
VIN(MAX) = 5V VOUT(MAX) = 5V unconnected inputs and outputs can also produce false voltage levels if not correctly
to 5.25V Max
terminated.
Logic 1 We can also show the two-state switching action between logic “1” and logic “0” using a
Logic 1 simple switch circuit of Figure 4.
VOUT(MIN) = 2.7V Figure 4. Digital Voltage Levels
Here a resistor and single-pole switch are
VIN(MIN) = 2.0V +5v
connected together in series across a +5
Indeterminate
Indeterminate volt DC supply.
Region
Region
VOFF(MAX) = 0.8V R When the switch is open, 5 volts, or a
Logic 0 VOFF(MAX) = 0.4V logic “1” is given as the output signal.
Logic 0 open
0V 0V VOUT When the switch is closed the output is
Standard TTL Input Standard TTL Output grounded and 0v, or a logic “0” is given as
Voltage Levels Voltage Levels closed the output.
Switch Open = +5v = HIGH or Logic 1
Thus a logic “0” input is defined as any voltage level in the range from 0 to 0.8 volts Then depending upon the position of
Closed = 0v = LOW or Logic 0
(VOFF(MAX)). While a logic “1” input is defined as a voltage level between 2 volts (VIN(MIN)) and the switch, a “HIGH” or a “LOW” output is
0v
5 volts (VCC) for standard TTL. Likewise, for the output, 0 to 0.4 volts (VOFF(MAX)) constitutes produced.
a “0” (low) level output. While 2.7 (VOUT(MIN)) to 5 volts (VCC) constitutes a “1” (high) level
output. Digital logic gates are the most basic of digital electronic devices and which can be used
to produce an endless number of combinational and sequential logic circuits for use in
Semiconductor manufacturers publish data sheets for each of their digital logic devices numerous digital circuits.
defining the recommended and absolute maximum voltage ranges for the particular
sub-family used. Their data sheets commonly use the following notation to define the They are called Logic Gates because their output condition is logical and based on the
minimum and maximum input and output voltage levels. mathematical logic operation it must perform. The term gate is used as like the lock on a
gate, only certain input conditions will unlock or open the gate to produce the required
VOH(MIN) – Minimum Output (O) voltage for a High (H) level condition output. Usually defined as a logic “1” or HIGH output state.
VOL(MAX) – Maximum Output (O) voltage for a Low (L) level condition
The two most common and easily understood digital logic gates are the 2-input AND gate
VIH(MIN) – Minimum Input (I) voltage for a High (H) level condition and the 2-input OR gate.
VIL(MAX) – Maximum Input (I) voltage for a Low (L) level condition
w w w.e l e c tro nic s- tu to r ials .ws 3
Logic G ate Funda menta l s
A simple 2-input AND gate can be constructed from discrete components to form diode
3. Digital Logic AND Gate resistor logic, (DRL) as switching diodes themselves can be used to build logic gates for
simple applications as shown in Figure 6.
The Logic AND Gate is a type of digital logic circuit whose output condition can be
mathematically defined as the product of two (or more) inputs, which we will denote here Figure 6. 2-input Diode-Resistor AND Gate
as inputs A and B for reference. Thus the AND gate symbol contains two individual inputs
(A, B) and one single output (Q). +Vcc Assuming that the two diodes are ideal and the
Diode-Resistor
input voltages VA and VB are both positive logic
For the logic AND function to hold true, two or more events must occur together and at inputs. If, either input A or input B is held LOW, the
Logic AND Gate R
the same time for an output action to occur. The order in which these actions occur is output is LOW as the diode is forward-biased. The
unimportant as it does not affect the final result. D1 output can only go HIGH again when both inputs
OUT
The output expression given for an AND gate is that for logical multiplication which is A go HIGH producing the required AND gate action.
D2 Q = A.B
denoted by a single dot or full-stop symbol, (.). This then gives us the Boolean expression However, for real diodes, each diode will drop
of: A.B = Q or B.A = Q. Note that we can also omit the dot and simply use AB or BA. B
0.7 V across its pn-junction when forward-biased,
Then we can define the operation of a simple 2-input AND gate as being: resulting in 0.7 V for a LOW and 5 V for a HIGH at the output.
“If both A and B are true, then Q is true” We can improve on this slightly and still construct an AND gate switch using discrete
components by replacing the diodes with transistors. This create a Resistor-Transistor
We can prove this AND gate statement using a two switch analogy as shown in Figure 5. logic (RTL) gate as shown in Figure 7.
Figure 5. Switch Representation of the AND Function Figure 7. 2-input Resistor-Transistor AND Gate
A B +Vcc This simple 2-input AND gate constructed
Lamp ON = 1 using resistor-transistor (RTL) switches has
A.B = Lamp ON R
(series switches)
Lamp OFF = 0 the two inputs connected directly to the
+ A T1 transistor bases. Thus both transistors must
- be saturated “ON” for an output at Q.
Transistor
R Switches
Although discrete logic gate circuits are
Switch A Open = 0 and Closed = 1 B T2 easy to understand, you wouldn’t use
Switch B Open = 0 and Closed = 1 OUT
them in practice as they have too many
Q = A.B disadvantages. Today there are a full range
The two switches, A and B are connected together in a series combination. Therefore, of excellent logic gate IC’s available to
both switch A AND switch B must be closed (Logic-1) in order for the lamp to be ON. In R2
make digital circuits easier and cheaper to
other words, both switches must be closed together, or at logic “1” for the lamp to be ON. construct.
w w w.e l e c tro nic s- tu to r ials .ws 4
Logic G ate Funda menta l s
Logic AND gates are available using digital circuits to produce the desired logical function Commercially available AND gate IC’s are commonly available in standard 2, 3, or 4-input
and is given a symbol whose shape represents the logical operation of the AND gate. packages. But AND gates can also be cascaded together to form a circuit with any number
of individual inputs as demonstrated by the 6-input AND circuit of Figure 8.
Table 1. A 2-input Logic AND Gate and Truth Table
Figure 8. 6-input Digital Logic AND Gate
Symbol Truth Table
B A Q A A.B
&
A 0 0 0 B
B
& Q
0 1 0
C C.D
2-input AND Gate Symbol
1 0 0 & & Q = A.B.C.D.E.F
1 1 1 D
As before, a simple 2-input OR gate can be constructed from discrete components to form
4. Digital Logic OR Gate diode resistor logic, (DRL) using positive logic since switching diodes can be used to build
logic gates as shown in Figure 11.
The Logic OR Gate is a digital logic circuit whose output condition can be mathematically
defined as the sum of two (or more) inputs, which again we will denote here as inputs A Figure 11. 2-input Diode-Resistor OR Gate
and B and one single output (Q) for reference.
D1 OUT
For the logic OR function, two or more events can occur at different times for an output Again assume the diodes are ideal and the input
A
action to occur. As before, the order in which these two actions occur is unimportant as it Q = A+B voltages VA and VB are both positive logic inputs. If
D2
input A or input B is held LOW, the output is LOW.
does not affect the output. B
The output can only go HIGH only when either one
The output expression given for an OR gate is that for logical addition which is denoted by Diode-Resistor
of the inputs goes HIGH forward-biasing the diode
R producing the required OR gate action.
a plus sign, (+). Thus a 2-input (A B) logic OR Gate has an output term represented by the Logic OR Gate
Boolean expression of: A+B = Q or B+A = Q. 0V
The diodes forward-biased 0.7V voltage drop 0.7 V
Then we can define the operation of a simple 2-input OR gate as being: results in a 0 V for a LOW and 4.3 V for a HIGH at the output.
“If either A and B is true, then Q is true” We can also improve on this diode circuit by replacing the diodes with transistors to
create a Resistor-Transistor logic (RTL) digital OR gate as shown in Figure 12.
We can prove this OR gate statement using a two switch analogy as shown in Figure 10.
Figure 12. 2-input Resistor-Transistor OR Gate
Figure 10. Switch Representation of an OR Function This simple 2-input OR gate constructed
+Vcc
using resistor-transistor (RTL) switches
A T1
Lamp ON = 1 R has the two inputs connected directly to
B Lamp OFF = 0 A Transistor the transistor bases. Thus either parallel
+ Switches connected transistor must be saturated
- A+B = Lamp ON
(parallel switches) fully “ON” to connect the output to +VCC and
R
T2 produce an output at Q.
Switch A Open = 0 and Closed = 1 B 2-input logic OR gates are also available
Switch B Open = 0 and Closed = 1 OUT as standard digital circuits to produce the
Q = A+B desired logical function. The symbols for the
The two switches, A and B are connected together in a parallel combination. Therefore,
R2 logical operation of the OR gate is that of a
either switch A OR switch B can be closed (Logic-1) for the lamp (output) to be ON. In
curved shape with the ≥1 indicating that the
other words, either switch can be closed at any time for the lamp to be “ON”.
output is activate with any one active input.
Table 3. A 2-input Logic OR Gate and Truth Table Figure 13. 6-input Digital Logic OR Gate
Symbol Truth Table A
B A Q
>1 A+B
B
A 0 0 0
>1 Q
B 0 1 1 C
1 0 1
>1 C+D
>1 Q = A+B+C+D+E+F
2-input OR Gate Symbol D
1 1 1
Boolean Expression Q = A+B A OR B gives Q E E+F
>1
The standard 3-input digital logic OR gate and truth table is given in Table 4. as: F
Table 4. A 3-input Logic OR Gate and Truth Table
The Boolean Expression for this 6-input OR gate will therefore be: Q = A+B+C+D+E+F
Symbol Truth Table
Digital logic OR gates are available as standard IC packages such as the common TTL
C B A Q 74LS32 Quadruple 2-input Positive OR Gate.
0 0 0 0
Figure 14. Internal Arrangement of the 7432 Quad 2-input OR Gate IC
0 0 1 1
Vcc A4 B4 Q4 A3 B3 Q3
A 0 1 0 1
B >1 Q 14 13 12 11 10 9 8
C 0 1 1 1
1 0 0 1
3-input OR Gate Symbol
1 0 1 1
1 1 0 1
1 1 1 1
1 2 3 4 5 6 7
Boolean Expression Q = A+B+C A OR B OR C gives Q
A1 B1 Q1 A2 B2 Q2 GND
Commercially available OR gate IC’s are commonly available in standard 2, 3, or 4-input
packages. But OR gates can also be cascaded together to form any number of individual
inputs to obtain the required input value as shown in Figure 13.
Then, with an input voltage at A HIGH, the output at Q will be LOW and an input voltage at
5. Digital Logic NOT Gate A which is LOW results in a HIGH output voltage at Q. Thus producing the complement or
inversion of the input signal.
The Logic NOT Gate is simply a single input inverter that changes the input of a logic The single input digital
level “1” to an output of logic level “0” and vice versa. That is the NOT gate “inverts” or Then we can correctly say that if Q = not-A, (A) and the NOT gate is the most basic
complements its input signal. input is at logic-0, then the output condition would be of logic gates performing
at a logic-1 as: Q = A = not-0 = 1. Inversion
The NOT gate is so called because its output state is NOT the same as its input state with
its operation generally denoted by a bar or over-line (¯) above its input symbol. This over- Likewise, if input A of the NOT gate is at a logic-1 level, then the output would be at
line always denotes an inversion operation. logic-0 since: Q = A = not-1 = 0.
As NOT gates perform the logic function of Inversion or Complementation they are Logic NOT Gates are available as digital IC’s such as the 7404 which can produce the
more commonly known as Inverters because they invert their input signal giving us the desired logical function. The standard NOT gate is given a symbol whose shape is of a
Boolean expression of: Q = A. That is Q = not-A. triangle pointing to the right with a circle at its end as shown in Table 5.
Then we can define the operation of a single input digital logic NOT gate as being:
Table 5. The Logic NOT Gate and Truth Table
“If A is NOT true, then Q is true” Symbol Truth Table
A simple single input logic NOT gate can be constructed using a RTL Resistor-transistor
switch as shown below with the input connected directly to the transistors base. The A Q
transistor must be fully-ON, or fully-OFF for the inverted output to be present at Q.
A 1 Q
0 1
Figure 15. Resistor-Transistor Logic NOT Gate
+Vcc The inverter of Figure 15 is constructed using just a Inverter or NOT Gate Symbol 1 0
single stage transistor switching circuit
R2
Boolean Expression Q = A (not-A) Inverse of A give Q
Transistor When the transistors base input at A is HIGH, the
Inverter
OUT
transistor conducts and collector current flows This circle is known as an “inversion bubble” and is used to represent the logical operation
producing a voltage drop across the resistor R2. of the NOT function. As the bubble represents a signal inversion or complementation, it
R Q=A This connects the output at Q to ground resulting can be present on either the output and/or the input terminals.
A in an inverted LOW output.
Commonly available digital logic NOT gate and Inverter IC’s includes the TTL 74LS04 Hex
Likewise, when the transistors base input at A Inverting NOT Gate, or the 74LS14 Hex Schmitt Inverting NOT Gate.
is LOW (0v), the transistor switches “OFF” so the
output voltage at Q becomes HIGH at a value near to +VCC.
The truth table of Table 6. for the NAND function is the opposite of that for the previous
6. Digital Logic NAND Gate AND gate since the NAND gate is the complement of the basic AND gate.
If we take two separate logical gates, the AND gate and the NOT gate and connect them in Table 6. A 2-input Logic NAND Gate and Truth Table
series, we can produce another type of digital logic gate called a NAND (Not-AND) gate.
Symbol Truth Table
The Digital Logic NAND Gate is the reverse or “Complementary” form of the AND gate
we looked at previously in section 3 with the Boolean expression given for that as Logical B A Q
Addition, since it performs the inversion of its inputs. A 0 0 1
B
& Q
0 1 1
The Boolean expression of the gate is denoted by the full stop symbol, (.) with a line (‾)
above the output expression to signify the NOT or inversion function of the NAND gate. 1 0 1
Then the output is expressed by the Boolean expression of: A.B as shown in Figure 16. 2-input NAND Gate Symbol
1 1 0
Figure 16. Digital NAND Gate Equivalence Boolean Expression Q = A.B A AND B gives not-Q
A.B
A As with the AND gate seen previously, the NAND gate can also have any number of
Q = A.B individual inputs. Commercial available NAND Gate IC’s such as the TTL 74LS00, or the
B 74LS10 are available in standard 2, 3, or 4 input types. If additional inputs are required,
AND Gate NOT Gate then the standard NAND gates can be cascaded together to provide more inputs. For
example, the Boolean expression given for a 6-input NAND gate circuit would therefore
be: Q = A.B.C.D.E.F or simply Q = ABCDEF.
A
B
& Q The NAND Gate is generally classed as a “Universal” logic gate type since they can be used
on their own to produce other types of logic gate functions. By connecting them together
2-input NAND Gate in various combinations the basic gate types of AND and NOT function can be formed as
shown in Figure 17.
As before, the logic NAND gates is also available as a digital circuit. While the NAND gate
has no real circuit symbol of its own, it uses the same shape as that for the standard AND Figure 17. Digital Logic Gates Using the NAND Gate
gate but with the addition of circle (o) on its output.
The NAND gate functions A.B
This circle, sometimes called an “inversion bubble” at its the same as the AND A
output represents the NOT gate to indicate a negation gate except the output is B
& & Q = A.B A & A
The truth table, logic symbol and implementation of a 2-input Exclusive-OR gate is given
8. The Exclusive OR Gate in Table 8.
While the Exclusive-OR (Ex-OR) Gate is not a basic logic gate in its own right, as it can Table 8. A 2-input Exclusive-OR Gate and Truth Table
be constructed by combining some of the previously discussed logic gates. But their use
in arithmetic and computer logic circuits to process various binary numbers is important Symbol Truth Table
enough for it to be considered as complete logic gate on its own. B A Q
In Section 4 we saw that for a 2-input OR gate, if A = 1, OR B = 1, OR BOTH A + B = 1 then A 0 0 0
the output from the digital gate must also be at a logic-1. Thus this type of digital logic
B
=1 Q
0 1 1
gate is known as an Inclusive-OR Gate. That is, it gets its inclusive-OR name from the fact
that it includes the case of Q = 1 when both A and B = 1. 1 0 1
2-input Ex-OR Gate Symbol
The Exclusive-OR gate 1 1 0
If a logic-1 output is obtained when ONLY A = 1 or when
ONLY B = 1 but NOT both together at the same time, produces a HIGH output Boolean Expression Q = A⊕B A OR B but NOT BOTH gives Q
giving the binary inputs of 01 or 10. Thus the output will only when there is an odd
be 1 producing an Exclusive-OR function, also written number of HIGH inputs Note that the output is only 1 when there is an odd number of binary 1 inputs. That is only
as: Ex-OR or XOR, for short. an ODD number of logic-1’s on its inputs will produce a logic-1 at the output. This gives us
the Boolean expression of: Q = A.B + A.B = A⊕B
This is because its Boolean expression excludes the “OR BOTH” condition of Q = 1 when
both A = 1 and B = 1. In other words the output of an Exclusive-OR gate ONLY goes HIGH The Exclusive-OR gate is available as a standard TTL 74LS86 Quad 2-input gate. However,
when its two input terminals are at “DIFFERENT” logic levels with respect to each other. we can also construct an Ex-OR gate using a combination of NOT, AND, and OR gates but
is much easier using our old favourite, the NAND gate as shown in Figure 20.
Therefore, an Exclusive-OR gate will only give an output value of logic-1 when there are an
ODD number of 1’s (HIGH’s) on the inputs. If the two inputs are equal, the output is 0. Figure 20. Exclusive-OR Gate Using Universal NAND Gates
The symbol used to denote an Exclusive-OR odd function is slightly different to that for A
the standard Inclusive-OR Gate. The logic or Boolean expression given for a logic OR gate &
is that of logical addition which is denoted by a standard plus sign.
Q = (A.B)+(A.B)
The symbol used to describe the Boolean expression for an Exclusive-OR function is a & &
plus sign, (+) within a circle (Ο) with the resulting symbol being: ( ⊕ ). This exclusive-OR
symbol (⊕) represents the mathematical “direct sum of sub-objects” expression.
B
&
Therefore, as with the NAND and NOR gates, the Ex-NOR gate is simply a standard logic
9. The Exclusive NOR Gate gate with an inverted or complementary output.
Basically, the Exclusive-NOR (Ex-NOR) Gate is a combination of the previous Exclusive- The truth table, logic symbol and implementation of a 2-input Exclusive-NOR gate is given
OR gate with an inverting NOT gate on its output. The truth table for the Exclusive-NOR in Table 9.
gate is similar to the standard NOR gate in that it has an output which is at logic-1 and
goes LOW to logic-0 when ANY of its inputs are at logic-1. Table 9. A 2-input Exclusive-NOR Gate and Truth Table
However, the output of a digital logic Exclusive-NOR gate ONLY goes HIGH when its two Symbol Truth Table
inputs, A and B are at the SAME logic level which can be either at logic-1 or at logic -0. The B A Q
inverse of the Exclusive-OR gate. In other words, an even number of 1’s or 0’s on its inputs
A 0 0 1
gives a logic 1 at the output. For example, 00 or 11, otherwise is at logic-0.
B
=1 Q
0 1 0
The Ex-NOR gate, also written as: XNOR, gives The Exclusive-NOR gate
and output 1 when its inputs are logically equal or produces a HIGH output 1 0 0
2-input Ex-OR Gate Symbol
“equivalent” to each other. Thus an Exclusive-NOR gate only when there is an even 1 1 1
is sometimes called an Equivalence Gate. number of HIGH inputs
Boolean Expression Q = A⊕B A AND B the SAME gives Q
The symbol used to describe the Boolean expression for an Exclusive-NOR function is
the same as before with a plus sign, (+) within a circle (Ο) but with a bar or overline (‾) Note that the output is only 1 when there is an even number of binary 1 inputs. That is
above the output expression to signify the NOT or inversion function of the gate. Thus the only an EVEN number of logic-1’s on its inputs will produce a logic-1 at the output. This
resulting symbol being: ( ⊕ ) indicating a coincidence function. gives us the Boolean expression of: Q = A.B + A.B = A⊕B
The logic symbol for an Exclusive-NOR gate is the same as an Exclusive-OR gate but with a The Exclusive-NOR gate is available as a standard TTL 74LS266 Quad 2-input gate. We can
circle or “inversion bubble”, (ο) at its output to represent the complementary form of the also construct an Ex-OR gate using a combination of NOT, AND, and OR gates but is much
Exclusive-OR gate as shown in Figure 21. easier using the universal NAND gate as shown in Figure 22.
Figure 21. Exclusive-NOR Gate Equivalence Figure 22. Exclusive-NOR Gate Using Universal NAND Gates
AOB
A A
1 &
=1 Q = AOB B
B
& & Q = (A.B)+(A.B)
Ex-OR Gate NOT Gate
&
A
=1 Q &
B
You may be thinking, well what’s the point of a non-inverting Digital Buffer if it does not Commonly available digital buffer IC’s includes the TTL 74LS07 Buffer/Driver with open-
invert or alter its input signal in any way, or make any logical decisions or operations drain outputs, or the 74LS34 Hex Buffer/Driver gate.
based on its input like the AND or OR gates do. Other digital devices designed around the buffer include two-state Schmitt Trigger and
The Digital Buffer isolates Tri-state buffers which have a second enable input either positively enabled or negatively
Well, sometimes in digital electronic circuits we need to one digital device from
isolate logic gates from each other or have them drive or enabled.
another providing digital
switch higher than normal power loads, such as relays, amplification End of this Digital Logic Gate Fundamentals eBook
solenoids and lamps. Thus the main advantages of a
digital buffer is that it provides high current digital amplification. Actually, two inverting Last revision: April 2023
NOT gates cascaded together in series will operate the same as a buffer. Copyright © 2023 Aspencore
Digital buffers can be regarded as an Idempotent Gate since when an input passes https://www.electronics-tutorials.ws
through this device its value isn’t changed in any way. The output of buffer is same as the Free for non-commercial educational use and not for resale
input since it is a non-inverting device and will therefore give us the Boolean expression
of: Q = A. Then we can define the logical operation of a single input digital buffer as being:
With the completion of this Digital Logic Fundamentals eBook you should have gained a
“Q is true, only when A is true” good and basic understanding and knowledge of standard and inverted digital logic gates.
The information provided here should give you a firm foundation for continuing your study
In other words, the output (Q) state of a buffer is only true (logic-1) when its input A is true, of electronics and electrical engineering as well as the study of digital logic circuits.
otherwise its output is false (logic-0). Thus the logic symbol for the digital buffer is also of
a triangular shape with one input and one output but with no inversion bubble at its end For more information about any of the topics covered here please visit our website at:
as shown in Table 10.
www.electronics-tutorials.ws
w w w.e l e c tro nic s- tu to r ials .ws 13