DLD Lab # 1 Report-Sample
DLD Lab # 1 Report-Sample
SUBMITTED BY:
Ali Asghar (21PWCSE2059)
Suleman Shah (21PWCSE1983)
Abu Bakar (21PWCSE2004)
DATED:
17th October, 2022
SUBMITTED TO:
Dr. Rehmat Ullah Khattak
INTRODUCTION:
Digital circuits makeup the cornerstone of modern computational hardware. By representing
binary digits (i.e. {0,1}) with voltage levels, digital circuits are able to process binary numbers
electronically. Logic gates are the fundamental components within digital circuits so
understanding their behavior is important. Therefore, the purpose of this experiment is to
introduce you to gate behavior and logic interpretation as well as the basics of circuit wiring and
troubleshooting. To do so, we will explore the function of several of the basic logic gates
discussed in lecture.
AND gate:
3
The AND gate is an electronic circuit that gives a high output (1) only if all its inputs are high. A
dot (.) is used to show the AND operation i.e., A.B. Bear in mind that this dot is sometimes
omitted i.e., AB
OR gate:
The OR gate is an electronic circuit that gives a high output (1) if one or more of its inputs are
high. A plus (+) is used to show the OR operation.
NOT gate:
The NOT gate is an electronic circuit that produces an inverted version of the input at its output. It
is also known as an inverter. If the input variable is A, the inverted output is known as NOT A. This
is also shown as A', or A with a bar over the top, as shown at the outputs. The diagrams below
show two ways that the NAND logic gate can be configured to produce a NOT gate. It can also be
done using NOR logic gates in the same way.
NAND gate:
4
This is a NOT-AND gate which is equal to an AND gate followed by a NOT gate. The outputs of all
NAND gates are high if any of the inputs are low. The symbol is an AND gate with a small circle on
the output. The small circle represents inversion.
NOR gate:
This is a NOT-OR gate which is equal to an OR gate followed by a NOT gate. The outputs of all
NOR gates are low if any of the inputs are high.
The symbol is an OR gate with a small circle on the output. The small circle represents inversion.
EXOR gate:
The 'Exclusive-OR' gate is a circuit which will give a high output if either, but not both, of its two
inputs are high. An encircled plus sign ( ) is used to show the EOR operation.
EXNOR gate
5
The 'Exclusive-NOR' gate circuit does the opposite to the EOR gate. It will give a low output
if either, but not both, of its two inputs are high. The symbol is an EXOR gate with a small circle
on the output. The small circle represents inversion.
.
7400 TTL IC
6
LAB PROCEDURE
We will look at the behavior of logic gates. Each of these gates is embedded in an integrated
circuit package. Consult the datasheets of each component for the pin-outs, electrical and
timing characteristics of these circuits. All datasheets are available on www.alldatasheet.com.
3.1 EXPERIMENT 1
We will start by setting up the DC power supply and multi-meter for our use. Be sure both are
turned off. Then check to see that the multi-meter is set to measure DC, and be sure the red lead
is connected to the red multi-meter input that is marked for voltage. Finally, set the scale to the
range you need to measure (usually between 0V to 5V for digital circuits). Now, set the DC power
supply voltage output to zero (turn the coarse adjustment counterclockwise until it stops).
Connect the red lead of the power supply to the red lead of the multi-meter. Likewise, connect
the black lead of the power supply to the black lead of the multi-meter. Note: Do not connect
Power (RED) and Ground (Black) together. This will cause a short.
Turn on both the multimeter and the power supply. The multimeter should read very close to
zero. Turn the coarse adjustment clockwise until the multimeter reads 5V. If the multimeter
display does not change significantly when you turn the coarse adjustment, turn the power supply
off and recheck your connections. You may have a short. When the multimeter reads 5V, the
adjustments are complete and you should turn off the power supply. You are ready to test your
first gate. We will start by wiring a 74ALS04 (inverter) gate. Please refer to the pin configuration
given in the 74ALS04 datasheet. Insert the 74ALS04 chip onto the breadboard. Be sure you are
not shorting pins together. Identify the power (VCC) and ground (GND) pins for the 74ALS04 from
the pin-out of the 74ALS04 in the datasheet. Connect the VCC pin to the red lead of the power
supply and connect the GND pin to the black lead of the power supply. This chip (7404) contains
6 different inverter gates. Each inverter gate has an input pin and a corresponding output pin.
Choose one of the gates and connect the red lead of the multimeter to the gate output. The black
lead of the multimeter should always be connected to the black lead of the power supply (at the
GND pin). Then connect a wire from either the VCC pin to the input (for a logic High input) or
from the GND to the input (for a logic Low input). Do not connect both at the same time, as this
will cause a short. Turn on the power supply and observe the gate output. Assume A is the input
to the inverter (either High or Low) and that Y is the output. Fill in Table 1 in your post-lab report
according to the logic behavior that you observe.
10
8
Note: First fill in the second column of the table using the readings from the multimeter. Then
determine the answers to the last column based upon these readings. If the output is high (H),
the multimeter will read approximately 3.9V - 4.2V; when it is low (L), the multimeter will read
about 91.9 mV. If you read a voltage between these values, you have likely wired your circuit
incorrectly. Please demonstrate your progress so far to the Instructor.
3.2 Experiment 2
We are going to repeat the same experiment with the gates 74LS00 (NAND), 74LS02 (NOR),
74LS08 (AND), 74LS32 (OR), and 74LS86 (XOR). Note that each of the gates has two inputs and
one output. Fill in Table 2, 3 below in your post-lab report to indicate the observed responses of
these gates. So far we have reviewed the voltage behavior (H/L) of various gates. This is an
abstract way to interpret this voltage behavior which is called logic interpretation.
9
LAB WORK:
AND and NOT Gate Implemented Using 7400 and 7404 IC’s
10
XOR and XNOR Gate Implemented Using 7404 and 7486 IC’s
14
LAB READINGS:
L H 0.074 V L 3.91 V H
H L 0.074 V L 3.91 V H
H H 3.93 V H 3.91 V H
L H 3.45 V H 0.081 V L 5V H
H L 3.40 V H 0.081 V L 5V H