Sunteți pe pagina 1din 11

Basic Logic Gates

Experiment - I

Name : K.A.G.R.K. Weerasinghe

Reg. No : 16sea029
Abstract
Logic gates are the fundamentals of digital electronics. Basically there are six logic gates as
“NOT”, “AND”, “OR”, “EXOR”, “NAND”, “NOR” and “EXNOR” which can be represent
any kind of logical functions in digital electronics. Since this experiment was focused on
studying about basic logic gates and their operations which performs the functions of
Boolean algebra in order to having an successful approach for understanding concepts of
digital electronics.

Page | ii
Table of Contents

1. Introduction ................................................................................................................... 1
2. Pre-Lab Exercises .......................................................................................................... 2
3. Methodology.................................................................................................................. 4
3.1.1 Equipment and Materials ................................................................................. 5
4. Results ........................................................................................................................... 5
5. Analysis & Discussions ................................................................................................. 6
6. Conclusions ................................................................................................................... 7
7. References ..................................................................................................................... 8

List of Figures

Figure 2.1: Transistor IC Vs. VCE characteristics ................................................................... 3


Figure 3.1: Circuit Diagram................................................................................................... 4

List of Tables

Table 2.1: Basic logic gates with truth tables ........................................................................ 2


Table 3.1: Truth Table ........................................................................................................... 4
Table 4.1: Experiment Result ................................................................................................ 5
Table 5.1: LED Wave Length and Current ........................................................................... 7

Page | iii
1. Introduction
This experiment was focused on studying about basic logic gates and their operations. Logic
gates are the basic building blocks of digital electronics and mainly there are six logic gates
as “NOT”, “AND”, “OR”, “EXOR”, “NAND”, “NOR” and “EXNOR” which can be
represent any kind of logical functions in digital electronics.

Most logic gates have two inputs and one output. At any given moment, every terminal is in
one of the two binary conditions low (0) or high (1), represented by different voltage levels.
The logic state of a terminal can, and generally does, change often, as the circuit processes
data. In most logic gates, the low state is approximately zero volts (0 V), while the high state
is approximately five volts positive (+5 V).

For this experiments 7400 IC series was used to identify the behavior of each logic gates.
Experiment allows student to understand the operation of logic gates and also some basic
concepts related with digital electronics.

Page | 1
2. Pre-Lab Exercises
A. Identify and name the basic logic gates and draw symbols to represent them.
B. For each of the above logic gates, write down a Boolean algebraic expression to
represent them.
C. Construct the truth tables of each logic gate you identified.

Table 2.1: Basic logic gates with truth tables

Logic Symbol Truth Table


Gate
NOT A Ā
0 1
1 0
AND A B A.B
0 0 0
0 1 0
1 0 0
1 1 1
NAND A B A.B
0 0 1
0 1 1
1 0 1
1 1 0
OR A B A+B
0 0 0
0 1 1
1 0 1
1 1 1
NOR A B A+B
0 0 1
0 1 0
1 0 0
1 1 0
EXOR A B A+B
0 0 0
0 1 1
1 0 1
1 1 0
EXNOR A B A+B
0 0 1
0 1 0
1 0 0
1 1 1
Page | 2
D. In an electronic circuit discuss a convenient way to represent logical TRUE (1,
HIGH, ON) and FALSE (0, LOW, OFF).

Electronic circuits are working with power which is provided by applying prescribed
voltage to the circuit. Therefore best method for indicating logical conditions (logical
truth and logical false) is availability of voltage in relevant terminal. Accordingly “True”
and “False” can be represented through following conditions.

 True (1, High, On) – Voltage is available (Generally 5VDC)


 False (0, Low, Off) – Voltage is not available (Generally 0VDC)

E. Discuss how a Bipolar Junction Transistor (BJT) could be used as a switch. In


this configuration does the BJT act as an inverter (a NOT gate)? Explain your
reasoning.

Figure 2.1: Transistor IC Vs. VCE characteristics

Above figure shows IC Vs. VCE behavior of transistor for different IB values. Accordingly it
is clear that in the cut-off region, transistor is fully off and opposed to that in the saturated
region transistor is fully open. Therefore is obvious that transistor can operate as an
electronic switch.

Page | 3
In the aforementioned arrangement BJT is act as a “NOT” gate and therefore it is known as
inverter. As described previously, here,
 In cut-off region, IC=0 & VCE=VCC
 In saturated region, VCE=0 & IC=VCC/RL
Let’s discuss with circuit diagram shown above, assume that the “low” states are voltages
between 0 to 0.5 V and “high” states voltages are between 4 to 5 V, and VCC = 5 V. When
the input voltage is “low” (VI ≈ 0), BJT will be in cut-off and VO = VCC = 5 V (“high” state).
When input voltage is “high,” with proper choice of RB, BJT will be in saturation, and VO =
VCE = Vsat ≈ 0.2 V (“low” state).
Accordingly it is worked as “NOT” gate.

3. Methodology
Following steps were repeated identifying operation of each logic gate.

 Identify the correct IC from 7400 series for each gate and study about pin
configuration of the IC by referring the data sheets. Specially followings are studied.
 Input and output pins of logic gates
 Power input pin (VCC and ground pin)
 Construct the circuit as shown in figure below using the dip switch and other
components

Figure 3.1: Circuit Diagram

 Provide necessary power supply to the circuit correctly observe the result for
different arrangements shown in table below

Table 3.1: Truth Table

A B F
0 0
0 1
1 0
1 1

Page | 4
3.1.1 Equipment and Materials

1. 7404 NOT Gate IC 8. Breadboard


2. 7408 AND Gate IC 9. Breadboard wires
3. 7400 NAND Gate IC 10. 5V Power supply
4. 7432 OR Gate IC 11. LEDs
5. 7402 NOR Gate IC 12. 330 Ohms Resistors
6. 7486 XOR Gate IC 13. 1k Resistors
7. 4077 XNOR Gate IC 14. Quad Dip switch

4. Results
Following table indicates observed results in relation to each logic gate. Here “0” denotes
no voltage is applied to the input and “1” denotes 5VDC is applied to the input terminal. Also
in the output, “1” denotes that the LED was switched on and “0” denotes it was not switched
on. Here always 14 pin was for the power supply (VCC = 5V) and 7 pin was for the GND.
Pin arrangements for inputs and outputs of each gate are mentioned in below table.

Table 4.1: Experiment Result

Logic Gate Truth Table


NOT A (Pin 1 ) Output (Pin 2 )
0 1
1 0
AND A (Pin 1 ) B (Pin 2 ) Output (Pin 3 )
0 0 0
0 1 0
1 0 0
1 1 1
NAND A (Pin 1 ) B (Pin 2 ) Output (Pin 3 )
0 0 1
0 1 1
1 0 1
1 1 0
OR A (Pin 1 ) B (Pin 2 ) Output (Pin 3 )
0 0 0
0 1 1
1 0 1
1 1 1
A (Pin 2 ) B (Pin 3 ) Output (Pin 1 )
NOR
0 0 1

Page | 5
0 1 0
1 0 0
1 1 0
EXOR A (Pin 1 ) B (Pin 2 ) Output (Pin 3 )
0 0 0
0 1 1
1 0 1
1 1 0
EXNOR A (Pin 1 ) B (Pin 2 ) Output (Pin 3 )
0 0 1
0 1 0
1 0 0
1 1 1

5. Analysis & Discussions


It was obvious that the observed results shown in Table xx were identical with the Table XX
in the pre lab exercises. Accordingly it ensures the correct functionality of each gate circuit
developed in this practical session.

However several problems were encountered during the experiment and here are the
solutions for them.

A. Floating inputs and applied precautions

In some cases LED was dimmed (when it must be in totally “OFF” position) and in such a
cases, it seems to be that result was unreliable. However reason for aforementioned situation
was identified as it happens because of floating inputs. Floating inputs means that input is
not connected by any conducting path to key voltage reference point or ground, in another
word it is not reference to anything. Here input is not tied to anything and therefore input
potential is indeterminable. This can be avoided either using a pull up resistor to input
voltage or pull down resistor to 0V or ground. In this experiment pull down resistors was
used.

B. Determining the resistor value

Value of series resistor was decided in following manner.

𝑃𝑜𝑤𝑒𝑟 𝑆𝑢𝑝𝑝𝑙𝑦 𝑉𝑜𝑙𝑡𝑎𝑔𝑒 (𝑉𝑠)−𝐿𝐸𝐷 𝑉𝑜𝑙𝑡𝑎𝑔𝑒 𝐷𝑟𝑜𝑝 (𝑉𝑓)


Resistance (RS) =
𝐿𝐸𝐷 𝐶𝑢𝑟𝑟𝑒𝑛𝑡

Page | 6
Here we assumed that voltage drop across the logic gate (IC) in non-considerable. According
to the data sheet of a LED,

 Voltage drop across LED (Orange) = 2.03 ~ 2.10 VDC


 LED current* = 20mA
 Supply Voltage = 5VDC

*Table below indicates that current rating for orange color LED (which has 20nm dominant
wavelength) is 20mA.

 Resistance = (5.0 – 2.1)V/(0.02)A = 145 Ω

Table 5.1: LED Wave Length and Current

(Source: http://dangerousprototypes.com/docs/Basic_Light_Emitting_Diode_guide)

C. What is a dip switch?

DIP (Dual Inline Package) switch is a set of manual electrical switches designed to hold
configurations and select the interrupt request (IRQ). DIP switches are used in place of
jumper blocks.

6. Conclusions
Operation of basic logic gates was successfully studied in this experiments. Furthermore
important concepts which are related with digital electronics such as floating inputs,
transistor as an inverter (NOT gate) was also studied.

Page | 7
7. References

AspenCore Inc. (2016). Logic Gates. Retrieved August 03, 2016, from Electronics Tutorials:
http://www.electronics-tutorials.ws/

EETech Media. (n.d.). All About Circuits. Retrieved August 03, 2016, from
http://www.allaboutcircuits.com/

Hughes, E. (2008). Electrical and Electronic Technology (10th ed.). (J. Hiley, K. Brown, &
M. Smith, Eds.) Essex: Pearson Education Limited.

Page | 8

S-ar putea să vă placă și