Project File DLD
Project File DLD
Project File DLD
Report File
IE-245 Digital Logic Design
Second Year Spring Semester 2023
Submitted By
Syeda Farwa Batool
20146
Submitted To
Dr. Muhammad Sameer Ahmed
Principal Instructor
INSTITUTE OF INDUSTRIAL ELECTRONICS
ENGINEERING, (PCSIR) KARACHI
Report File
IE-245 Digital Logic Design
Second Year Spring Semester 2023
Submitted By
Muhammad Makki
20126
Submitted To
Dr. Muhammad Sameer Ahmed
Principal Instructor
INSTITUTE OF INDUSTRIAL ELECTRONICS
ENGINEERING, (PCSIR) KARACHI
Report File
IE-245 Digital Logic Design
Second Year Spring Semester 2023
Submitted By
Zaid
21049
Submitted To
Dr. Muhammad Sameer Ahmed
Principal Instructor
INSTITUTE OF INDUSTRIAL ELECTRONICS
ENGINEERING, (PCSIR) KARACHI
Report File
IE-245 Digital Logic Design
Second Year Spring Semester 2023
Submitted By
Rumman Ahmed Khan
21038
Submitted To
Dr. Muhammad Sameer Ahmed
Principal Instructor
INSTITUTE OF INDUSTRIAL ELECTRONICS
ENGINEERING, (PCSIR) KARACHI
Report File
IE-245 Digital Logic Design
Second Year Spring Semester 2023
Submitted By
Muhammad Zarrar
21033
Submitted To
Dr. Muhammad Sameer Ahmed
Principal Instructor
INSTITUTE OF INDUSTRIAL ELECTRONICS
ENGINEERING, (PCSIR) KARACHI
Report File
IE-245 Digital Logic Design
Second Year Spring Semester 2023
Submitted By
Muhammad Sameed
21029
Submitted To
Dr. Muhammad Sameer Ahmed
Principal Instructor
ACKNOWLEDGEMENT:
I
ABSTRACT
This report presents an exploration of building fundamental logic gates AND, OR,
NOT, NAND, NOR, and XOR using discrete components, specifically bipolar
transistors (2N3904), resistors, pushbuttons, and LEDs. The project focuses on
demonstrating the practical implementation of these gates in digital electronics by
leveraging the principles of transistor operation, analog voltage amplification, and
logical signal manipulation. The report details the circuit designs, component
selection, construction procedures, and functional testing for each gate, providing
insights into the real-world application of digital logic concepts using basic
electronic components. The project serves as a valuable hands-on exercise for
understanding the inner workings of digital logic gates and their relevance in
modern electronics.
Table of Contents
II
1 Introduction:.............................................................................................................................1
2 Working Principle:...................................................................................................................2
2.1 NAND Gate (NOT-AND):................................................................................................2
2.2 NOR Gate (NOT-OR):......................................................................................................2
2.3 NOT Gate (Inverter):........................................................................................................2
2.4 AND Gate:........................................................................................................................2
2.5 OR Gate:...........................................................................................................................3
2.6 XOR Gate (Exclusive OR):...............................................................................................3
3 Schematic Diagram:.................................................................................................................4
4 Component Working:...............................................................................................................5
4.1 2N3904 NPN Transistor:..................................................................................................5
4.2 LED (Light Emitting Diode):............................................................................................5
4.3 Pushbuttons:......................................................................................................................5
4.4 Resistors:...........................................................................................................................6
4.5 Power suppply:..................................................................................................................6
5 Applications:............................................................................................................................7
6 Limitations:..............................................................................................................................7
7 Conclusion:...............................................................................................................................8
III
Digital Logic Gates
IV
1 Introduction:
Digital logic gates, the bedrock of modern computing and electronics, are often encountered as
black-box components, their inner workings hidden behind integrated circuits and standardized
packages. In this project, we embark on an enlightening journey to unveil the intricate
mechanisms of these foundational elements by constructing them from the most fundamental of
electronic components: bipolar transistors (2N3904), resistors, push-buttons, and LEDs.
The world of digital logic gates is one of binary decision-making, where electrical signals take
on the roles of 0s and 1s, driving the operations of digital systems that define our technological
landscape. In this endeavor, we take on the challenge of creating six essential logic gates: AND,
OR, NOT, NAND, NOR, and XOR. Our canvas is a circuit board, our brushes are electronic
components, and our palette consists of voltages, currents, and logic levels.
Each step of this project is a fascinating exploration of digital logic. We begin with the humblest
of components and, through systematic design and assembly, breathe life into these digital
constructs. As we traverse the terrain of logic gates, we will decipher the roles of transistors,
capacitors, resistors, and diodes in shaping the destiny of our signals. We will witness how a
single push-button press can change a 0 to a 1 or vice versa, and how LEDs illuminate to signify
logical decisions.
This project is a testament to the idea that digital logic, often perceived as a realm of abstract
concepts, can be brought to life through experimentation and creativity. Whether you are a
student eager to deepen your understanding of digital logic or an electronics enthusiast yearning
for a hands-on experience, "Building Digital Logic Gates from the Ground Up" promises to be
an enlightening voyage into the heart of digital technology.
1
2 Working Principle:
2.1 NAND Gate (NOT-AND):
Inputs: The NAND gate has two inputs, A and B.
Operation: It produces an output (Y) that is the
logical AND of the inputs A and B, followed by a
NOT operation. In other words, if both A and B
are high (1), the output is low (0); otherwise, it's
high (1).
Working Principle:
Transistors T1 and T2 are connected in a parallel
arrangement.
When either A or B (or both) is low (0), one of the transistors (T1 or T2) conducts,
pulling the output Y high (1).
Only when both A and B are high (1) will both transistors be off, allowing the output Y
to be pulled low (0) through the resistor and LED.
2.2 NOR Gate (NOT-OR):
Inputs: The NOR gate has two inputs, A and B.
Operation: It produces an output (Y) that is the
logical OR of the inputs A and B, followed by a
NOT operation. In other words, if either A or B
(or both) are high (1), the output is low (0);
otherwise, it's high (1).
Working Principle:
Transistors T1 and T2 are connected in series.
When either A or B (or both) is high (1), one of the transistors (T1 or T2) conducts,
pulling the output Y low (0).
Only when both A and B are low (0) will both transistors be off, allowing the output Y to
be pulled high (1) through the resistor and LED.
2.3 NOT Gate (Inverter):
Input: The NOT gate has one input, A.
Operation: It produces an output (Y) that is the
complement of the input A. If A is high (1), Y is
low (0), and vice versa.
Working Principle:
A single transistor (T1) is used.
When the input A is high (1), the transistor
conducts, pulling the output Y low (0).
When the input A is low (0), the transistor is off, allowing the output Y to be pulled high
(1) through the resistor and LED.
2.4 AND Gate:
Inputs: The AND gate has two inputs, A and B.
Operation: It produces an output (Y) that is high
(1) only when both inputs A and B are high (1);
otherwise, it's low (0).
Working Principle:
2
Transistors T1 and T2 are connected in series.
When both A and B are high (1), both transistors conduct, allowing current to flow
through the LED and pull the output Y high (1).
If either A or B (or both) is low (0), one of the transistors (T1 or T2) will be off,
preventing current flow and keeping the output Y low (0).
2.5 OR Gate:
Inputs: The OR gate has two inputs, A and B.
Operation: It produces an output (Y) that is high (1)
if either input A or B (or both) is high (1); otherwise,
it's low (0).
Working Principle:
Transistors T1 and T2 are connected in parallel.
When either A or B (or both) is high (1), one of the
transistors (T1 or T2) conducts, allowing current to flow through the LED and pull the
output Y high (1).
Only when both A and B are low (0) will both transistors be off, preventing current flow
and keeping the output Y low (0).
2.6 XOR Gate (Exclusive OR):
Inputs: The XOR gate has two inputs, A and B.
Operation: It produces an output (Y) that is high (1)
if the number of high inputs (A or B) is odd;
otherwise, it's low (0).
Working Principle:
A combination of transistors and diodes is used to
create this logic gate.
The gate detects when the inputs A and B are not the
same (one is high, and the other is low), allowing current to flow through the LED and
pull the output Y high (1).
When both inputs are the same (both high or both low), the gate prevents current flow,
keeping the output Y low (0).
These digital logic gates, constructed using transistors and other discrete components, are the
building blocks of digital circuits, enabling us to perform various logical operations and process
binary information in electronic systems.
.
3
3 Schematic Diagram:
4 Component
Working:
4.1
2N3904
NPN
Transistor:
NPN Structure: The
2N3904 is an NPN
(Negative- Positive-
Negative) transistor,
which means it consists of
three layers of
semiconductor
material
Transistor States:
4
is minimal current flowing between the collector and emitter (Ic ≈ 0), and the transistor does not
conduct.
On State (Active): When a sufficient current flows into the base (Ib > 0), the transistor enters the
"on" state. In this state, a significant current flows from the collector to the emitter (Ic), and the
transistor acts as a current amplifier.
In this project, the 2N3904 transistors are used in configurations that exploit their ability to
switch between the "off" and "on" states based on the presence or absence of input signals. These
configurations enable the creation of digital logic gates and other electronic circuits, allowing us
to process and manipulate binary information. Depending on how the transistors are connected
and biased within the logic gates, they can perform logical operations such as AND, OR, NOT,
NAND, NOR, and XOR
LED Activation: The output of the gate is connected to an LED through a current-limiting
resistor. When the gate produces a logical '1' at its output, the output voltage is high enough to
forward-bias the LED. This means that electrons flow from the N-type region to the P-type
region within the LED.
4.3 Pushbuttons:
In this project, pushbuttons serve as input devices that allow us to
control the logic gates or other electronic components.
Mechanical Contact: A push-button is a simple mechanical device
with two electrical contacts. When you press the button, it physically
closes or completes an electrical circuit, allowing current to flow by Unknown Author is
licensed under
between the contacts.
Use in Logic Gates: In this project, pushbuttons are used as inputs to the logic gates. By pressing
or releasing these buttons, we can control the input states (0 or 1) of the gates. Depending on
how the pushbuttons are wired to the gates, they can simulate logical operations and help us
observe the gate's behavior.
5
Pushbuttons are versatile input devices widely used in electronics for user interaction and
control. In this project, they provide a means to input logical states into the constructed logic
gates, allowing us to experiment with different combinations of input signals and observe the
gates' responses.
4.4 Resistors:
In this project, the 9V power supply serves as a reliable source of electrical energy to ensure
that the logic gates, transistors, LEDs, and other components operate within their specified
voltage range. It provides the necessary power to perform logical operations, generate output
signals, and illuminate LEDs, allowing us to experiment with digital logic circuits and
observe their behavior.
5 Applications:
Educational Tool: This project serves as an excellent educational tool for students and
electronics enthusiasts to learn about digital logic gates, transistor operation, and basic
electronic principles. by providing a hands-on experience.
Prototyping and Experimentation: The constructed logic gates can be used as building
blocks for more complex digital circuits. This project can be a starting point for
prototyping and experimenting with various digital logic applications.
6
Basic Electronics Skills: It enhances practical electronics skills, including soldering,
circuit assembly, and troubleshooting.
Logic Gate Testing: The project allows for the real-time testing and validation of logic
gate behavior and logical operations. It's a useful tool for verifying how different
combinations of inputs affect gate outputs.
Logic Circuits Exploration: You can expand on this project by creating more complex
digital circuits, such as flip-flops, counters, or multiplexers, using the constructed gates as
components.
Digital Logic Simulations: It can serve as a practical companion to digital logic simulation
software, allowing individuals to compare real-world behavior to simulated results.
Logic Gate Debugging: It offers a platform for learning how to troubleshoot and debug
digital circuits when they do not function as expected.
6 Limitations:
While building digital logic gates using transistors, however it does come with certain
limitations:
Component Limitations: The project relies on discrete components like transistors and
resistors, which can limit the speed and complexity of the circuits you can build compared
to using integrated circuits (ICs).
Lack of Integration: The project does not incorporate modern integrated circuits,
microcontrollers, or programmable logic devices, which are essential in real-world digital
systems.
Practicality: While valuable for educational purposes, constructing logic gates from
discrete components is not practical for most real-world applications, where integrated
circuits are the norm.
Tolerance and Precision: Components like resistors have tolerance values that can affect
the accuracy of the logic gates constructed. High-precision circuits may require additional
calibration.
Limited Functionality: The constructed logic gates are static and don't have the flexibility
or programmability of digital devices that can be reconfigured for various tasks.
Signal Propagation Delay: Discrete components may introduce signal propagation delays,
limiting the speed at which the circuits can operate compared to IC-based solutions.
Limited I/O: The project may not offer extensive input and output capabilities, limiting the
complexity of the circuits you can build.
Maintenance: Discrete components may require more frequent maintenance and
troubleshooting than integrated circuits in real-world applications.
7 Conclusion:
In conclusion, this project is not just an end but a beginning, a starting point for those who seek
to understand, create, and shape the digital world. It has unlocked the doors to a universe of
electronic possibilities, offering both knowledge and inspiration for future endeavors in the field
of digital electronics and beyond.