Professional Documents
Culture Documents
Logic Gates
The Digital Systems should be able to process or perform operations on the
numbers that are represented in the Binary Number System. The simplest operations that
come to mind are the arithmetic operations like add and subtract. There are many more
operations and functions that Digital Systems are able to perform.
Digital Logic Gates provide the basic building blocks; these Logic Gates perform
different operations on the Binary information. These Logic Gates are used in different
combinations to implement large complex systems. Digital Logic Gates are represented
and identified by unique symbols. These symbols are used in circuit diagrams to describe
the function of a digital circuit.
Digital Logic Gates function is represented by a function table or a truth table that
describes all the Logic gate outputs for every possible combination of inputs. As the logic
Gates operate on binary values therefore these function tables describes the relationship
between the input and output in terms of binary values. The function of a Logic Gate is
also described in terms of an expression.
Logic Gates are practically used in circuits where the inputs to the Logic Gates
vary in time. Timing diagrams are used to describe the response of the Logic Gates in a
certain period of time with respect to the changing input. Timing diagrams graphically
show the actual performance (behavior) of the logic gate to the changing inputs for a
predetermined period of time or sequence of input signals.
The three fundamental Gates are the AND, OR and NOT Gates.
AND Gate
The AND Gate performs a logical multiplication function. An AND Gate has
multiple inputs and a single output. Most commonly used AND Gates are two input AND
gates. An AND Gate is represented by the symbols shown in Figure 5.1
The multiplication function performed by the AND Gate is shown in the function
table for a two input AND Gate. Figure 5.2. The function table for a 3, 4 or multiple input
AND Gate is similar. The output is 1 when all the inputs are at logic level 1. For all other
input combinations the output is zero.
The expression describing the operation of a two inputs AND Gate is F = A.B
The ‘.’ is an AND Operator and the expression represents an AND operation between
inputs A and B. Expression for multiple input AND Gates is F = A.B.C. ⋅ ⋅ ⋅ N , where N is
the total number of inputs.
The timing diagram of the two input AND gate with the input varying over a
period of 7 time intervals is shown in the diagram. Figure 5.3.
The counter can be stopped from counting by stopping the clock pulses from
reaching the clock input of the Counter Device. A 2-input AND gate is connected to the
Counter Clock input. The clock pulses are applied at the Input A of the AND Gate. Input
B of the AND Gate is connected to an Enable/Disable signal. When the Counter Device
is stopped from counting the enable/disable signal ay Input B is set to 0.
The Function Table, figure 5.2, indicates that when ever an input of the AND gate
is set to 0 the output also becomes 0. Thus by applying the disable signal 0 at Input B, the
output of the gate becomes zero and therefore clock signals are prevented from reaching
the Counter device. To allow the Counter Device to count, the enable/disable signal at
input B of the AND gate is set to 1. The Function Table of the AND gate indicates that
when an Input of the AND gate is 1, the output follows the input signal applied at the
input A of the AND Gate. Thus the clock signal at Output of the AND gate follows the
clock signal at Input A of the AND Gate.
OR Gate
The OR Gate performs a Boolean add function. An OR Gate has multiple inputs
and a single output. Most commonly used OR Gates are two input OR gates. An OR Gate
is represented by symbols as shown in figure 5.5.
The addition function performed by the OR Gate is shown in the function table
for a two input OR Gate. Figure 5.6. The function table for a 3, 4 or multiple input OR
Gate is similar. The output is 1 when any one input is at logic level 1. The output is 0
when all inputs are zero.
Logical OR
Operation
Inputs Output
A B F
0 0 0
0 1 1
1 0 1
1 1 1
Figure 5.6 Function Table of an OR Gate
The timing diagram of the two input OR gate with the input varying over a period
of 7 time intervals is shown in the diagram 5.7.
t0 t1 t2 t3 t4 t5 t6
The OR Gate is used in applications where the output signal is a 1 when any one
input is a 1. An example of such an application is an alarm circuit for car door locks
shown in diagram, figure 5.8. Four circuits are connected to each of the four doors of a
car. The door circuit generates a 1 when the door is open and a 0 when it is closed. The
four outputs of each of the four door circuits are connected to the four inputs of an OR
Gate. The output of the OR gate is connected to an Alarm.
NOT Gate
NOT Gate is also known as an Inverter. The name indicates that the NOT Gate
should be performing an inversion function. The Not Gate has a single input and a single
output. The NOT Gate is represented by the symbol shown in Figure 5.9.
The input signal applied across the single input of the OR gate is inverted and is
available at the output. The function of the NOT Gates is described by the Function Table
or the Truth Table represented in Figure 5.10.
Logical NOT
Operation
Input Output
A F
0 1
1 0
Figure 5.10 Function Table of a NOT Gate
The expression describing the behavior of a NOT gate in terms of the Input and
Output shown in the Function Table, Figure 5.10 is F = A where A indicates invert of A
The timing diagram of a NOT gate with the input varying over a period of 7 time
intervals and its corresponding output is shown in the Figure 5.11.
1 1 0 0 1 0 1 0
0 0 1 1 0 1 0 1
Figure 5.12 A 1’s Complement Circuit using 8 NOT Gates
In addition to the three Fundamental Gates which perform AND, OR and NOT
operations, two other important gates that are commonly used in Digital Logic are the
NAND and NOR Gates. These two gates do not perform any new functions. The NAND
Gate performs an AND-NOT function and the NOR gate performs the OR-NOT function.
The AND gate is represented by its complementary OR gate symbol, the two
inputs and the output are inverted by placing bubbles. The OR gate is represented by its
complementary AND gate symbol, the two inputs and the output are inverted by placing
bubbles.
NAND Gate
The NAND Gate performs a function that is equivalent to the function performed
by the combination of an AND gate and a NOT gate. Figure 5.14
A NAND Gate has multiple inputs and a single output. Most commonly used
NAND Gates are two input NAND gates. A NAND gate is represented by the symbols
shown in figure 5.15, the NOT gate connected at the output of the AND gate is
represented by a circle, in Digital Logic terminology a ‘bubble’.
The function performed by the NAND Gate is described by the Function Table
for a two input NAND Gate. Figure 5.16. The function table for a 3, 4 or multiple input
NAND Gate is similar. The output is 0 when all inputs are 1s. For all other combinations
of inputs the output logic level is 1.
Logical NAND
Operation
Inputs Output
A B F
0 0 1
0 1 1
1 0 1
1 1 0
Figure 5.16 Function Table of a NAND Gate
The expression describing the operation of the two inputs NAND Gate is
F = A.B . Expression for multiple input NAND Gates is F = A.B.C......N , where N is the
total number of inputs.
The timing diagram of the two input NAND gate with the input varying over a
period of 7 time intervals is shown in the diagram. Figure 5.17.
t0 t1 t2 t3 t4 t5 t6
Logical NAND
Operation
Inputs Output
A B F
0 0 1
0 1 1
1 0 1
1 1 0
3. OR Gate Implementation
An OR Gate can be implemented using a combination of three NAND gates. The
implementation is based on the alternate symbolic representation of the OR gate. The OR
gate is represented as an AND gate with bubbles at the inputs and outputs. Figure 5.13.
The two bubbles at the input can be replaced by two NOT gates (1) & (2) implemented
using two NAND gates. If the two bubbles are removed from the two inputs, the AND
gate with the bubble at the output represents a NAND gate (3). Figure 5.20
NOR Gate
The NOR Gate performs a function that is equivalent to the function performed
by a combination of an OR gate and a NOT gate. Figure 5.21
A NOR Gate has multiple inputs and a single output. Most commonly used NOR
Gates are two input NOR gates. A NOR gate is represented by the symbols shown in
figure 5.22, the NOT gate connected at the output of the OR gate is represented by a
circle.
The function performed by the NOR Gate is described by the Function Table for a
two input NOR Gate. Figure 5.23. The function table for a 3, 4 or multiple input NOR
Gate is similar. The output is 1 when all inputs are 0s. For all other combinations of
inputs the output logic level is 0.
Logical NOR
Operation
Inputs Output
A B F
0 0 1
0 1 0
1 0 0
1 1 0
Figure 5.23 Function Table of a NOR Gate
The expression describing the operation of the two inputs NOR Gate is
F = A + B . Expression for multiple input NOR Gates is F = A + B + C + .....N , where N is
the total number of inputs.
The timing diagram of the two input NOR gate with the input varying over a
period of 7 time intervals is shown in the diagram. Figure 5.24.
t0 t1 t2 t3 t4 t5 t6