Professional Documents
Culture Documents
DSY1501 Ch3 Notes
DSY1501 Ch3 Notes
3 Study unit 3
3 Logic gates
•• identify the different types of logic gates available and discuss their functionality
Logic devices, as the name suggests, carry out logical functions. Logic devices all have
inputs and outputs, and their output states are dependent upon the conditions applied
to the inputs. The devices that carry out basic logic functions are often referred to as
“gates”.
DIG1501/125
A A
Figure 3.1
The NOT gate
Figure 3.1 shows a NOT gate as it is sometimes referred to. The gate basically inverts
the input, so that, if the input was a 1, the output would be a 0, and if the input was a
0, the output would be a 1.
A
X
B
Figure 3.2
The AND gate
Figure 3.2 shows an AND gate. In order to understand the functions of this gate, refer
to the truth table below.
0 0 0
1 0 0
0 1 0
1 1 1
In order for the output to go high both inputs must also be high.
A
X
B
Figure 3.3
The OR gate
The OR gate is shown in figure 3.3. An OR gate gives a High output whenever there
is a high on any or all of the inputs, as in the truth table below.
26
0 0 0
1 0 1
0 1 1
1 1 1
A
B X
Figure 3.4
The NAND gate
A NAND gate (as illustrated in fig 3.4) is in effect a combination of two gates, namely
a NOT gate and an AND gate – hence the name.
0 0 1
0 1 1
1 0 1
1 1 0
From the truth table above we can see that output X is simply an inverted AND gate.
The symbol of the NAND gate is shown in figure 3.4 above.
A
X
B
Figure 3.5
The NOR gate
A NOR gate (illustrated in fig 3.5) is in effect a combination of two gates, namely a
NOT gate and an OR gate.
DIG1501/127
0 0 1
0 1 0
1 0 0
1 1 0
The truth table above shows that the X output is simply an inverted OR gate.
A
X
B
Figure 3.6
The XOR gate
An XOR gate (illustrated in fig 3.6) is an exclusive or gate in which the output shows
whether the inputs A and B are the same or different. Therefore, if the two inputs have
the same value, output X will be low. If the two inputs have a different value, output
X will be high.
That is one way of looking at it another way is that it works like an OR gate except in
the last case where both inputs are High then the output is Low.
0 0 0
1 0 1
0 1 1
1 1 0
The truth table above shows that we get a logic low output when the two inputs are the
same, and a logic high output when the inputs are different. It can therefore be used
to test for equality.
28
A
X
B
Figure 3.7
The XNOR gate
Figure 3.7 illustrates an inverted XOR gate. The output, X, is the exact opposite of a
XOR, as can be seen in the truth table below.
0 0 1
1 0 0
0 1 0
1 1 1
The 7400 IC in figure 3.8 is a Quad 2-input NAND Gate. That is consisting of 4-two
input NAND gates.
Before this can be utilised, one has to apply power to the IC.
Pin 14 is Vcc (5 volts) and pin 7 is GND (0Volts).
We then apply either a high (5 volts) or a low (0 volts) to the inputs of the gate and
monitor the output by means of LEDs or a logic probe.
14 VCC
11
13
12
10
7400
5
1
GND 7
Figure 3.8
Quad 2 input NAND IC
DIG1501/129
7402
14 VCC
13
12
11
10
7402
5
1
7
GND
Figure 3.9
Quad 2 input NOR IC
7404
13
12
11
10
7402
5
1
7
GND
Figure 3.10
A NOT gate IC
30
7408
14 VCC
11
13
12
10
7408
5
1
GND 7
Figure 3.11
Quad 2 input AND IC
7432
13
12
11
10
7482
5
1
7
GND
Figure 3.12
Quad 2 input OR IC
DIG1501/131
7486
14 VCC
13
12
11
10
7486
5
1
7
GND
Figure 3.13
Quad 2 input XOR gate IC
SN 74 ALS 00 N
Package type
74 series TTL
32
1 2 3
Figure 3.14
This numbering method is used for these packages:
DIG1501/133
ACTIVITY 3.1
For the set of input waveforms in figure 3.15 below, determine the output for the gate
shown and draw the timing diagram.
Figure 3.15
ACTIVITY 3.2
Assume that an enable signal has the waveform shown in figure 3.16 below; assume
that waveform B is also available. Devise a circuit that will produce an active-HIGH
reset pulse to the counter only during the time that the enable signal is LOW
Figure 3.16
myUnisa activity
Log on to myUnisa and go to “Announcements”. Select the announcement that is
study unit 3 and do the self-assessment activity.
References
Refer to the chapter “Logic gates” in the prescribed book, Digital fundamentals, by Floyd.
Experiment
Objective:
To familiarise yourself with the operation of the basic logic elements of the OR gate
and the AND gate, as well as the use of the logic probe.
Components required:
34
Procedure:
Remember to identify the pin numbers on the IC as indicated below. Once you have
identified pin 1, you proceed in an anti-clockwise direction as you number the pins.
Example: The pin directly to right of pin 1 would be pin 2, then pin 3, etc.
The wiring of the two circuits is critical and any mistake will cause an error to occur.
The first IC to the left is the 7400 quad 2-input NAND gate. If you refer to data sheets
on the last page of this guide, you will see that there are four NAND gates in a 7400
and we only need to use one. It is also very important to note that the ICs need power,
that is 5V on pin 14 (Vcc), shown in red, and 0V on pin 7 (Gnd). Not all ICs are the
same, so it is important to check the data sheets. The inputs to the 7400 are shown
in blue (pins 13 and 12) and the output in green (pin 11).
The second IC to the right is a 7402 quad 2-input NOR gate. Again we must apply
power to pins 14 and 7 before the IC will function. The inputs to the IC are shown in
yellow and the output in purple. It is now time to build the circuit as shown, and to
establish whether it is working using the truth tables associated with these gates.
DIG1501/135
Results of experiment
Name: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Student no: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Date: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0 0
0 1
1 0
1 1
* Note these pins should be checked using the logic probe and the results
(high = 1 or low = 0) recorded in the table.
0 0
0 1
1 0
1 1
* Note these pins should be checked using the logic probe and the results
(high = 1 or low = 0) recorded in the table.
36
Experiment
Objective:
Components required:
Development board
ICs: 74LS02
74LS00
Procedure:
Build the circuit for the following expression. In order to determine the input and
output pins to the gates, refer to the data sheets on the last page of this study guide.
F = (A+B) . C
A
F
B
C
Results of experiment
Name: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Student no: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Date: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
On the breadboard below, draw a wiring diagram to show how you built the circuit.
(Work in pencil in case you make a mistake.)
DIG1501/137
A B C F
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
38