Study of Logic Gates and Verifying de Morgan's First Law
Study of Logic Gates and Verifying de Morgan's First Law
Study of Logic Gates and Verifying de Morgan's First Law
By
V Arya Vaisshnav
CSIR
June 2023
1
CERTIFICATE
This is to certify that V Arya Vaisshnav a student of Class 12 at Modern Convent School,
Dwarka - 4, New Delhi, has successfully completed the project titled "Study of Logic Gates
and Verifying De Morgan’s First Law using Simulation in Simulink and Experimental
Demonstration using ICs in the Trainer Kit" under the guidance of Dr. Anuj Krishna (Senior
Scientist, CSIR-NPL, New Delhi).
The project work was carried out under the guidance and supervision of Dr. Anuj Krishna
with dedication and commitment. The student has demonstrated excellent research skills,
critical thinking abilities, and proficiency in the subject matter throughout the project duration.
The project has been found to be original, innovative, and in compliance with the academic
standards set by the school. The project showcases the student's deep understanding of the
subject matter and their ability to apply theoretical knowledge to practical situations.
We appreciate the effort, hard work, and creativity displayed by V Arya Vaisshnav in
conceptualizing, planning, and executing this project. Their commitment to academic
excellence is commendable.
Dr Anuj Krishna
CSIR-NPL
2
ACKNOWLEDGEMENTS
I would like to express my sincere gratitude and appreciation to all those who have
contributed to the successful completion of this physics project titled " Study of Logic Gates
and Verifying De Morgan’s First Law using Simulation in Simulink and Experimental
Demonstration using ICs in the Trainer Kit ". Their support, guidance, and encouragement
have been invaluable throughout this journey.
I would like to extend my deepest thanks to my project guide, Dr. Anuj Krishna (Senior
Scientist, CSIR-NPL), for their unwavering support and expert guidance. Their knowledge,
expertise, and patience have been instrumental in shaping this project and steering me in
the right direction. I am truly grateful for their valuable insights, feedback, and constant
motivation.
I would also like to thank my physics teacher, Ms Deepali Jain for providing me with a strong
foundation in the subject and inspiring my passion for physics. Their dedication, enthusiasm,
and commitment to teaching have greatly influenced my academic growth.
Lastly, I would like to express my gratitude to the authors and researchers whose works and
publications have served as valuable resources and references for my project. Their
contributions to the field of physics have been instrumental in shaping my understanding and
providing a solid foundation for my work.
Thank you.
V Arya Vaisshnav
XII-A
3
ABSTRACT
This paper presents a thorough analysis of logic gates and the experimental demonstration
of De Morgan's First Law using integrated circuits (ICs) from a trainer kit in Simulink
simulation. The basic building blocks of digital circuits are logic gates, which allow for the
processing and manipulation of binary data. A fundamental rule of Boolean algebra known
as De Morgan's First Law explains the connection between the logical operations
complement and negation.
The study begins with a theoretical overview of logic gates, covering their types,
functionality, and truth tables. Emphasis is placed on understanding the logical operations
performed by different gates, such as AND, OR, and NOT gates. Subsequently, De
Morgan's First Law is introduced, illustrating how it relates to the logical equivalence
between the complement of the conjunction of two variables and the disjunction of their
complements.
A simulation is run using Simulink, a potent simulation environment widely used for
modelling and analysing dynamic systems, to validate the theoretical concepts. The outputs
are observed and compared against anticipated outcomes based on the truth tables after the
logic gates are simulated. Logic gate behaviour and De Morgan's First Law can be
understood and verified using the Simulink model as a virtual platform.
Furthermore, the study includes an experimental demonstration using ICs in a trainer kit.
The trainer kit provides a hands-on experience for students and enthusiasts to explore digital
circuits and implement logic gates using physical components. By configuring the ICs based
on circuit diagrams and connecting them appropriately, the logical operations are
implemented and observed through LEDs or other output indicators. The experimental
demonstration serves as a practical validation of the simulation results, reinforcing the
understanding of logic gates and De Morgan's First Law.
This study provides a thorough examination of logic gates and the validation of De Morgan's
First Law. A holistic approach to understanding digital circuits is provided by the combination
of Simulink simulation and experimental demonstration using ICs in a trainer kit, which
promotes a deeper understanding of the core ideas in digital electronics. The findings of this
research add to the pedagogical resources for teaching and learning digital logic, enhancing
the knowledge and abilities of those who are interested in this field.
TABLE OF CONTENTS
4
1. OBJECTIVE I – STUDY OF LOGIC GATES AND OTHER IMPORTANT FACTORS……………………….....6-14
1.4 Simulink………………………………………………………………………………………………………………………14
4. Conclusion……………………………………………………………………………………………………………………………41
5. References…………………………………………………………………………………………………………………………..42
5
OBJECTIVE I – STUDY OF GATES AND OTHER
IMPORTANT FACTORS
AND Gate
The output signal of the AND gate is generated when all input signals are high (logic level 1). If not,
the output signal will be of low quality (logic level 0). (Y = A.B)
Truth Table:
[1.1]
OR Gate
An OR gate produces an output when any of its inputs are high (logic level 1). Produces a Low output
signal only if all input signals are Low (logic level 0). (Y = A+B)
Truth Table:
6
[1.2]
Truth Table:
Input A Output Y
1 0
0 1
1 0
0 1
[1.3]
NAND Gate
An AND gate is combined with a NOT gate to form the NAND gate. It generates the output that is the
logical complement of the AND gate. [Y = (A.B)’]
Truth Table:
7
[1.4]
NOR Gate
An OR gate and a NOT gate are combined to form a NOR gate. It generates the output of the OR
gate's logical complement. [Y = (A+B)’]
Truth Table:
[1.5]
XOR Gate
When there are an odd number of high inputs, the EXOR gate generates a high output signal (logic
level 1). A low output signal (logic level 0) is produced if the number of high inputs is even.
8
[1.6]
XNOR Gate
The EXNOR gate is the EXOR gate's counterpart. When the number of high inputs is even, it
generates a high output signal (logic level 1). A low output signal (logic level 0) is produced if the
ratio of high inputs to high inputs is odd. [Y = A.B + A’.B’]
Truth Table:
[1.7]
9
Applications of Logic Gates
1. Computer and Digital Devices: In computers, calculators, smartphones, and other digital
devices, logic gates serve as the basic components of digital circuits. They carry out logical
operations and manage information flow within these systems.
3. Boolean Algebra: Boolean algebra, which is used to manipulate logical expressions and carry
out operations like AND, OR, and NOT, is closely related to logic gates.
4. Memory Units: To store and retrieve data in digital systems, logic gates are used in memory
units.
5. Encoders and Decoders: Information is converted from one format to another by logic
gates, which are also used for error detection and data transmission.
6. Multiplexers and Demultiplexers: To choose and route data between numerous input
and output lines, these devices employ logic gates.
7. Programmable Logic Controllers (PLCs): Industrial control systems use logic gates to
monitor sensors, manage actuators, and carry out complex logic.
8. Error Detection and Correction: Logic gates assist in identifying and fixing data
transmission or storage errors.
9. Digital Displays: Digital displays, like seven-segment displays, which are used in digital clocks,
calculators, and scoreboards, are driven by logic gates.
10. Security Systems: Alarms, access control, and encryption are examples of security systems
that employ logic gates to implement logical conditions and decision-making procedures.
10
IC Packages
Integrated circuit (IC) packages, also known as chip packages or integrated circuit enclosures, are
containers that protect integrated circuits (ICs). The ICs are shielded from physical harm by these
packages, which also provide electrical connections and heat dissipation during operation.
Depending on the particular needs of the integrated circuit and the application for which it is
intended, IC packages come in a variety of shapes, sizes, and materials.
[2.1]
[2.2]
11
Quad Flat Package (QFP)
Leads extend from all four sides of the square or rectangular shape of QFP packages. They offer a
large number of pins and are frequently used in high-performance ICs like microprocessors.
[2.3]
[2.4]
12
Plastic Leaded Chip Carrier (PLCC)
The underside of BGA packages is covered in a variety of tiny solder balls or bumps. The package is
mounted directly on the circuit board, and these balls provide electrical connections to it. Many
cutting-edge ICs, including graphics processors and microcontrollers, use BGAs.
[2.5]
[2.6]
13
Simulink
Simulink is a simulation tool and graphical programming environment created by MathWorks. It is
extensively used in many disciplines, including engineering, physics, and others, for modelling,
simulating, and analysing dynamic systems. Users can create models using blocks and connect them
using Simulink's visual programming interface to represent the behaviour of a system or process.
Block Diagram Modelling: Using a library of predefined blocks that represent different parts
and mathematical operations, Simulink enables users to create block diagrams of dynamic systems.
To simulate the behaviour of the system, these building blocks can be connected.
Simulation and Analysis: Simulink gives users the ability to simulate and examine the
behaviour of their models. It offers numerical solvers for the differential equations describing the
dynamics of the system. Users can specify the time range, step size, and solver options for
simulations.
Model-Based Design: Simulink supports model-based design, in which models created there
are used for a variety of tasks, including the creation of algorithms, the design of control systems,
and hardware-in-the-loop (HIL) testing. It makes it simple to iterate and improve models before
putting them into use.
Visualisation and Animation: Simulink offers visualisation tools to plot and analyse
simulation results. Simulink also offers animation. Users can design their own user interfaces,
animations, and plots to represent the system's behaviour.
Control system design, signal processing, robotics, power systems, communications, and automotive
engineering are just a few of the industries that frequently use Simulink. Engineers and scientists can
use it to model and simulate complex systems on a robust and user-friendly platform, analysing
system behaviour, perfecting designs, and validating algorithms before putting them into practise.
14
IC Trainer Kit
A specialised educational or experimental tool used to learn about and experiment with integrated
circuits (ICs) is an IC trainer kit, also known as an integrated circuit trainer kit or an IC testing and
development kit. It offers a setting for practical training in electronics and hands-on learning.
Breadboard: A platform with a grid of holes known as a breadboard is used for electronic
component prototyping and connection. It eliminates the need for soldering and enables simple
circuit assembly and modification.
Power Supply: In order to supply the necessary voltage and current for powering the ICs and the
circuit being tested, the trainer kit typically comes with a built-in power supply or power source.
IC Socket: An element that safely holds and connects the ICs to the trainer kit is called an IC
socket. During testing and experimentation, it enables simple insertion and removal of ICs.
LED Display and Seven-Segment Display: The trainer kit might come with an integrated
seven-segment display or an LED display to show the output or status of the circuit.
Switches and Push Buttons: Switches and push buttons that let users control the inputs or
simulate external events for testing and verification are frequently included in trainer kits.
Manual and Documentation: The trainer kit typically comes with a user manual or
documentation outlining the functionalities, circuit diagrams, and usage guidelines.
15
OBJECTIVE II – STUDY OF NOR GATE
The NOR gate, also known as the logical NOR (NOT OR) operation, is a type of logic gate. It receives
two or more input signals and outputs a single signal based on the inputs. An OR gate's output is
logically opposed by the output of a NOR gate.
You can see from the truth table that the output is only 1 (logic high) when both inputs are 0. Any
input of 1 results in an output of 0 (logic low).
[3.1]
The inputs are on the left side of the symbol, and the output is on the right.
Output: A NOR B
NOR gates can be used in a variety of ways when designing digital circuits. They are frequently used
as the building blocks for other logic operations, such as the construction of logic gates like the AND,
OR, and XOR gates by combining them in particular configurations. In addition to being used as
control components in electronic systems, NOR gates are also used in memory and arithmetic
circuits.
[3.2] [3.3]
16
Demonstration of NOR gate using Simulink
B: 0
Y: 1
A: 0
B: 1
Y: 0
17
A: 1
B: 0
Y: 0
A: 1
B: 1
Y: 0
18
Using Pulse Generators as Input
Circuit Diagram:
19
Pulse Generator1 Parameters:
Scope:
20
2. VARIATION OF AMPLITUDE IN PULSE GENERATOR
PARAMETERS
Pulse Generator Parameters:
21
Scope:
22
Pulse Generator1 Parameters:
Scope:
23
4. VARIATION OF PULSE WIDTH IN PULSE GENERATOR
PARAMETERS
Pulse Generator Parameters:
24
Scope:
25
Pulse Generator1 Parameters:
Scope:
26
OBJECTIVE III – PROOF OF DE MORGAN’S
FIRST LAW USING SIMULINK SIMULATION
AND ICs FROM THE TRAINER KIT
Electronics, especially digital circuit design, is significantly impacted by De Morgan's first law. It
offers a practical method for condensing and transforming logic expressions, which directly
translates into circuit designs that are more effective and small.
De Morgan's first law has a big impact on electronics, especially digital circuit design. It provides a
useful technique for condensing and transforming logic expressions, directly translating into more
efficient and compact circuit designs.
(A+B)’ = A’ . B’
Designers can manipulate and simplify complicated logic expressions using De Morgan's first law,
which results in more effective circuit designs. This optimisation is especially useful in integrated
circuits, where fewer gates and a simpler design can boost efficiency, cut down on power usage, and
free up physical space.
In conclusion, De Morgan's first law finds use in electronics by enabling designers to streamline and
improve logic expressions. By lowering the number of gates and inputs necessary, it helps create
circuit designs that are more effective and have better performance, lower power requirements, and
smaller physical sizes.
27
Truth Table for A’ . B’ :
B: 0
Y: 1
A: 0
B: 1
Y: 0
28
A: 1
B: 0
Y: 0
29
A: 1
B: 1
Y: 0
Circuit Diagram:
30
1. NO VARIATION IN PULSE GENERATOR PARAMETERS
Pulse Generator Parameters:
31
Scope:
32
Pulse Generator1 Parameter:
Scope:
33
3. VARIATION OF TIME PERIOD IN PULSE GENERATOR
PARAMETERS
Pulse Generator Parameters:
34
Scope:
35
Pulse Generator1 Parameters:
Scope:
36
5. VARIATION OF PHASE DELAY IN PULSE GENERATOR
PARAMETERS
Pulse Generator Parameters:
37
Scope:
38
B: 0
Y: 1
A: 0
B: 1
Y: 0
39
A: 1
B: 0
Y: 0
A: 1
B: 1
Y: 0
40
CONCLUSION
The project's main objectives were to learn about logic gates, validate De Morgan's First Law using
simulation in Simulink, and conduct real-world experiments using ICs from the Trainer Kit. We
learned valuable lessons about designing digital circuits, developed our skills in simulation, and
validated the logical equivalence by comprehending the behaviour of logic gates.
41
REFERENCES
Pictures:
1.1 https://de-iitr.vlabs.ac.in/exp/truth-table-gates/theory.html
1.2 https://de-iitr.vlabs.ac.in/exp/truth-table-gates/theory.html
1.3 https://en.wikipedia.org/wiki/Inverter_%28logic_gate%29
1.4 https://commons.wikimedia.org/wiki/File:Nand-gate-en.svg
1.5 https://en.wikipedia.org/wiki/NOR_logic
42
1.6 https://commons.wikimedia.org/wiki/File:Xor-gate-en.svg
1.7 https://commons.wikimedia.org/wiki/File:Xnor-gate-en.svg
2.1 https://www.fpgakey.com/wiki/details/287
2.2 https://www.wellpcb.com/news/small-outline-integrated-circuit.html
2.3 https://www.pcbdirectory.com/community/what-are-qfp-packages
2.4 https://blog.mbedded.ninja/pcb-design/component-packages/bga-component-
package/
2.5 https://www.7pcb.com/blog/plcc-component-packages
2.6 https://in.element14.com/cypress-semiconductor/s29gl512s10tfi010/flash-
memory-512mbit-100ns-tsop/dp/2646448
3.1 https://en.wikipedia.org/wiki/NOR_logic
3.2 https://components101.com/ics/74ls02-nor-gate-ic
3.3 https://mecha-tronx.com/product/7402-ic-nor-gate/
The Wikipedia
43