Académique Documents
Professionnel Documents
Culture Documents
Structure
Introduction
Objectives
Boolean Algebra
Logic Gates
AND Gate
OR Gate
NOT Gate
NAND Gate
NOR Gate
NAND and NOR Gates as Universal Gates
16.1 INTRODUCTION
So far your students have been dealing with analog quantities, without, of course,
knowing the term. The signals that they have been using are analog signals - their
values vary in a continuous fashion over a broad range with respect to time. Now you
will be introducing another way of representing physical quantities: the digital mode.
In the digital mode of representation, physical quantities assume only discrete values
called digits. Your students are now going to l e a n about an important part of
electronics, which involves such discrete signals or digits - that is why it is called
digital electronics. Digital electronics is based on the binary number system that
involves only two digits 0 and 1.
Digital Systems
Assume only discrete values
Analog systems
Values vary over a broad range continuously
The digital representation based on two numbers (0,l)is the basis for sophisticated
computers. Logically. these numbers can be used to perform varying operations that
involve even mimicking the functions of the human brain. The Binary digiTs together
form what is referred to as the "bit" in digital logic. Under the positive system of
logic, we can identify the following operations:
The "on" and "off' are used to represent flow and stoppage of current in any arcjog
circuit. In most circuits 5V (analog DCV) represents it as being switched ON and 0'8;
(analog (DCV) or ground as switched OFF. Using this two-valued logic system, every
statement or condition must either be "true" or "false"; it cannot be partly true and
partly false. While this approach may seem limited, it actually works quite nice!y, and
can be expanded to express very complex relationships and interactions among any
number of individual conditions. In fact, digital'or binary logic is the basis of al:
digital electronics today.
One essential reason for basing logical operations on the binary number systen: .;k!#-,,
it is easy to design simple, stable electronic circuits that can switch back and f-4between two clearly defined states, with no ambiguity attached. It is also possible to
design and build circuits that will remain indefinitely in one state unless and until they
are deliberately made to switch over to the other. Examples from analog electronics
include thep-n junction diode (in its forward and reverse bias) and the bi-polar
junction transistor (BJT) between its saturation and cut-off values. We can connect
these devices to form logic gates, the basic components of digital circuits.
A digital circuit is designed for a desired application by a combination of several logic
gates. In this unit, we discuss the teaching of the basic concepts of Boolean algebra,
different logic gates: AND, OR, NOT, NAND and NOR, and electronic circuits for
logic gates. We also deal with integrated circuits in brief and give some real world
applications of logic gates, which you can use in your teaching.
Objectives
After studying this unit, you should be able to:
a
Logic Gates
It is based on only two numbers, 0 and I , commonly thought of as "low or false" and
"high or true", respectively. Binary numbers and Boolean algebra are natural to use
with modern digital computers, which deal with switches and electrical currents that
.
are either on or off.
Tt involves the use of three basic operations on the binary digits 0 and 1. These are
called the
>
The NOT operator operates on one value (the operand) (0 or 1) and negates it:
NOT 0 is 1 and NOT 1 is 0. It is represented by a bar over the Boolean variable.
For example:
= Not X.
(Explain to your students that operand means the value operated upon).
The OR operator operates on at least two operands, and yields a high value if
any of its operands (or both) are high (1 or true). It is represented by a + sign.
For example: X + Y = X OR Y.
P
'
The AND operator operates o,n at least two operands, and yields a high (1 or true)
value if all of its operands are high (1 or true.) It is represented by a dot ( 0 ) .
For example: X Y = X AND Y.
You can explain the NOT, AND and OR operations using Fig. 16.2.
0..
........................
NOT*
0 -.............................
1
AND+
0 ....................................
0R+l
These basic operations can be combined in many ways to give different outputs for
combinations of inputs. You can tell your students that just as we carry out arithmetic
operations on algebraic'functions, we can carry out these three operations on Boolean
functions for several practical applications. The three operations can be carried out
practically using electronic logic gates. Any Boolean function can be practically
implemented by using these logic gates.
By definition, a logic gate is a circuit with one or more input voltages but only one
output voltage. Logic gates work according to some logical relationship (involving
the three logical operations AND, OR and NOT) between input and output voltages.
The gates are used in digital electronics to change one voltage level (input voltage)
into another (output) according to the logical relationship between them.
We express the relation between possible values of input and output voltages in the
,form of a table called the Truth table.
These basic logic circuits perform the logical operations of AND, OR and NOT.
Do tell your students the following points so that they have a better understanding of
logic gates:
Electronic logic gates require a power supply to function.
INPUTS to the gates are voltages having two discrete values, e.g., OV and 5V
representing logic 0 and logic 1, respectively (under positive logic of
operation).
The OUTPUT of a gate provides one of the two values of voltage only, e.g.
OV and 5V representing logic 0 and logic 1, respectively.
There exist other logical gates, like the NAND, NOR, and XOR gates. NAND
and NOR gates are also known as universal gates since all other operations like
NOT, AND, OR, XOR and XNOR can be simulated using them.
After a basic introduction to logic gates, you can go into the details of the basic logic
gates AND, OR and NOT as follows:
You can ask your students to construct the truth table for a two-input AND gate on the
basis of its definition
>
The AND gate gives a high output (1) only if all its inputs are high.
The AND gate is so named because it acts in the same way as the logical
"AND" operator.
Logic Gates
16.3.2 OR Gate
The OR gate implements the Boolean-ORfunction where the output is 1 when any one
input is logical 1.
You can have your students arrive at the truth table for a two-input OR gate using its
definition.
-
1>
The OR gate gives a high output if one or more of its inputs are high.
INPUT
X=Af
Let students write the truth table for the NOT gate
Now you can introduce some simple combinations of the basic gates such as the
NAND gate and the NOR gate.
INPUTS
OUTPUTS
- X = (AB)'
A-
~enbtesInversion
X
B-
= (AB)'
II
Logic Gates
The output of NAND gate is high if any of the inputs are low.
OUTPUTS
' : = ( A +B)'
Denotes Inversion
The truth table for the NOR gate can be determined by your students
P the output is 1 when none of the inputs are 0. In other words, the outputs of all
NOR gates are low if any of the inputs is high.
J
Tell your students that if n is the number of input variables the total number
of possible input combinations ( N ) is given by: N = 2".
You can give your students some quick problems to solve before you proceed further.
SAQ 1
Devise a set of questions to help students check their understanding. You could
include questions like the following:
You can make use of Table 16.1 to compare different logic gates.
Table 16.1: Comparison of logic gates
Basic Logic Gates
Logic
Boolean
Expression
Symbol
Dy
Y = A+B
OR
.B
A
NOT
Table
ay
Y = A-B
AND
English
Truth
A
0
0
1
B
0
1
01
0
0
01
B
0
1
0
1 .A 1 Y
A
0
0
1
0
1
Y=A
Y
0
1
1
1
Expression
The only time the
output is HIGH is
when all the inputs
are high.
Y = A-B
NAND
A
0
0
B
0
1
Y
1
1
1
1
0
1
1
16.3.6 NAND and NOR Gates as Universal Gates
You could explain the NAND Gate Operations as a universal gate, as follows:
NAND gates can be used as NOT, AND and OR gate as shown below in Fig.16.8:
-
Explain each of these operations to your students. Ask them to construct the
truth tables for each case and verify the results for themselves.
y-.Am
NAND
NOR gates can also be used as NOT, AND and OR gate as shown in Fig. 16.9.
Explain each of these operations to your students. Ask them to construct the truth
tables for each case and verify the results for themselves.
You can also do the following activity to show these gates to your students.
Activity 1
Take a 7400 IC (Quad 2 input NAND gates) and show the realization of all other
gates (NAND, NOT, OR, AND, NOR, XOR, XNOR). It is a 14 pin DIP (Dual in line
package) IC. You will need the following components to show the working of the
gates:
Bread-board 1PCB (Printed Circuit Board) 1 Chassis
14 pin or greater IC base
LEDs (Green, Red, Orange, Yellow) -to differentiate between the input states and
output states.
5V dc supply, Connecting wires
Resistance - 1K, 3.3K to fiction as current limiting resistors
Typical cost of the 7400 IC is Rs.71We give in the margin the diagram of the 7400 IC with the interconnections:
Connect the pin 14 of the 7400 IC to the positive of the 5V dc supply and pin 7 to the
ground terminal (negative in this case). The binary high (1) and low (0) states will be
+5V and OV, respectively. Now connect the NAND gates as in Fig. 16.8 to show the basic gates: AND, OR and
This activity should help stydents acquire a feel for what logic gates are about: they
allow an output for given inputs according to certain logical operations.
Now you could explain the electronic circuits that make up these gates.
. ~ o ~Gates
i c
The circuit for the two input AND gate is shown in Fig. 16.10. It has two p-n
junction diodes (of silicon).
+5v
L
-T
A.
--
Output
'Y
The resistor in the circuit controls the current passing through the diodes. Repeat
to your students that a low value (0 bit) is assigned OV and high value (1 bit) is
assigned 5V. But point out that such accurate values are not possible at the output
in practical electronic circuits. In fact, a low value is assigned a'voltage range OV
to 0.8 V and a high value is assigned a voltage range of 3 V to 5V.
You can explain the operation of this circuit as follows:
When input A is connected to the ground terminal and input B is connqcted to the
positive terminal of the battery (5V), then diode Dl is forward biased ut diode D2
is not biased (as both p and n sides of diode are connected to the Sam voltage
5V). Thus output voltage is voltage drop across diode Dl (which is 0.7 V). It is
thus low or 0.
When both the inputs are connected to the 5V battery then both the sides of the
diodes (Dl and D2) are at same voltage and hence both diodes are not conducting.
Therefore the output voltage is the battery voltage which is 5V, i.e., high or 1.
Draw all four circuit diagrams on the board or an OHP transparency and explain each
step clearly.
All these four cases satisfy the truth table of AND gate.
~ o ; m o r e input AND gate the number of diodes will be more. There will be as many
diodes as the number of inputs.
You can show your students an AND gate in the lab.
You can use the following components:
Diodes - IN4001
R-lKc2
The power supply is a 5V dc source
Use LEDs along with the diodes to show which of the signal diodes (lN4001) is
actually conducting.
b) OR gate
The circuit of an OR gate has two p-n junction diodes as shown in Fig. 16.1 1.
+re'
Dl
+5v
1,
__
Be
Output
'Y
The input voltage is applied to the terminals A and B. It can be either 0 or 5V. You can
again explain the following cases:
1) A=O and B=O.
When the inputs are connected to ground terminal or OV, then both the diodes are
not biased or do not conduct (as both p and n sides of diode are connected to same
voltage OV) and hence no current flows through the diodes. Thus the output
voltage is l o p or 0.
When input A is connected to the ground terminal and input B is connected to the
positive terminal of the battery (5V), then diode Dl is not biased or does not
conduct (as both p and n sides of diode are connected to same voltage OV) but
diode D2 is forward biased with 0.7 V voltage drop across it and 4.3 V(5-0.7 V)
across the resistor. Point out that the output in this case is the voltage drop across
the resistor. Thus output voltage is high or 1 .
Logic Gates
The components used to set up the AND gate can be used here also. You can
demonstrate the OR gate to your students or ask them to connect the circuit and
verify its operation.
c) NOT gate
The circuit for the NOT gate has a transistor as shown in Fig. 16.12.
The base of the transistor is connected to input A fhrough the resistor RB,while the
emitter is earthed. The collector is earthed through a resistor Rc and 5V battery. You
can explain the operation of this circuit as follows:
When the input A is connected to the ground terminal of the battery, then the base
of the transistor also gets earthed. Therefore, emitter-base junction is not forward
biased (as both the emitter and base are earthed or connected to same OV).
Moreover since the base current is zero, the collector current is also zero. This is
said to be the cut-off mode of the transistor. Since there is no voltage drop across
Rc, the output voltage will be equal to the voltage of the battery (5V) connected to
the collector, i.e., high or 1.
When the input A is connected to the positive terminal.of battery (5V), then the
emitter base junction gets forward biased. It leads to a very large base current
resulting in a very large collector current. The transistor is then in the saturation
mode. This indicates that most of the bias voltage (-5V) drops across Rc and the
output voltage is low or 0.
Logic Gates
To demonstrate the NOT gate, use a transistor in BC 148 series. The main idea is to
switch the transistor between its saturation and cut-off values based on the input and
not allow it to function in the active region. You can use the following components:
Rc=1KRto1OKl2
Rb=lOKR
The voltage source can be a 5V dc supply.
SAQ 2
Demonstrate the working of logic gates to your students.. Write a report on how well
these worked in helping them understand the concept better.
Classification
Complexity
Examples
MSI(Medium Scale
integration)
10 to 100 gates
Logic Gates
16.7 SUMMARY
Boolean algebra is used to describe the input and output relationship with the
help of boolean expression.
Logic gates are digital circuits that work according to some logical relationship
between input and output voltages.
Digital systems are constructed by using three basic logic gates viz. AND, O R
and NOT gate.
Output of AND gate is high (1) only when all the inputs are high.
The output of O R gate is low (0) only when all inputs are low.
The output of NOT,gate is inverse or complement of the input.
NOT gates can be cdmbined with AND or OR to give NAND (not and) or NOR
(not or) gates.
The NAND and NOR are called universal gates since with either one the AND,
OR and NOT gates can be generated.
In a truth table the total number of possible input combinations is 2" where n is
the number of input variables.
The circuits of logic gates can be made with the help of diodes or transistors etc.
An integrated circuit (IC) contains from several to millions of individual gates on
a silicon chip in a plastic package.
The different sizes of the integration (SSI, MSI, LSI, VLSI and ULSI) of IC chips
are usually defined in terms of the number of logic gates or number of
components fabricated on a chip.
Logic gates form the building blocks of a digital systems and have wide ranging
applications in life today.
2. How did your students perform on the test? What were their difficulties? What
moredo you need to do to improve their understanding?
(ii) 0
(b) Depends on the circuit you used.
2. Bring your report to the ECP.
Terminal Questions
1. Bring the set of problems you designed and some responses of your students to
the ECP.
a) The digital system is one that processes a Gnite set of data in digital (numeric)
form rather than processing continuous variables and is capable of
manipulating discrete elements of information. Whereas in analog systems
data values show a continuous variation over a broad range. See details in Sec.
16.1.
2. Bring your report to the ECP.