1
ACKNOWLEDGEMENT
My acknowledgement goes out to Mr. Parminder Singh , our physics teacher who motivated and guided me in completion of this project. He provided me required material and information that helped me in completion of this project. Shraddha Verma
2
CERTIFICATE
This is to certify that ‘MAYANK KAUSHIK’ of class XII- A has performed as well as completed this project under my supervision.
(Mr. Parminder Singh)
3
AIM
“TO STUDY THE FUNCTIONING OF VARIOUS LOGIC GATES”
4
“INTRODUCTION”
Logic gates are building blocks of digital electronics. They are used in digital electronics to change input voltage to output voltage, according to some logical statement relating them. A logic gate may have one or more inputs, but it has only one output. The relation between the possible values of input and output voltages are expressed in the form of a table called truth table or table of combinations. Logic gates are related with “BOOLEAN ALGEBRA”, which is different from both ordinary and binary algebra. In this logical statements can have only two values, such as HIGH or LOW, ON or OFF, CLOSED or OPEN, YES or NO and TRUE or FALSE. The two values of the logic statements are denoted by the binary numbers 1 and 0. The logic statements that the logic gates follow are called BOOLEAN EXPRESSIONS. The operations of logic gates are normally done by logic digital integrated circuits (ICs). In other words digital ICs or logic circuits are the building blocks of digital computers and
5
calculators. The basic digital circuits are rather simple and will serve as an introduction to digital ICs.
We know the unidirectional characteristics of a solid state semi conductor diode. When forward biased this diode acted like a close switch. That is, it permitted current to flow in a complete circuit. When reverse biased it acted like an open switch and permitted a small current, if any to flow. This unique characteristic of diode is employed in the designing of basic logic circuits. In digital electronics a gate is a logic circuit with one output and one or more inputs. An output signal occurs for certain combinations of input signals. Modern computers do many jobs from scientific computation to business accounting. Computers are also used in the automatic control of manufacturing processes. These devices perform highly complex jobs. They consist of an arrangement of simple logic circuits.
6
To solve problems a computer has to make decisions as it progresses through the steps in the problem solving. Computer circuits that make decisions and comparisons are called logic circuits. Computer decisions are of the YES/NO variety, also known as two-state logic. Logic circuits can be in one of the two states such as an ON or OFF, CLOSED or OPEn, YES or NO, TRUE or FALSE.
Binary means ‘two’. Computers use the binary number system. Rather than having digits from 0 to 9, a binary number system, has only digits 0 to 1. This is better suited to digital electronics where the signals are LOW or HIGH, switches are OPEN or CLOSED and lights are ON or OFF. In our experiments we will use positive logic. This means binary 0 represents the LOW state and binary 1 represents HIGH state. With this in mind table-2 is the truth table of a two inputs and GATE as it is usually shown. This gives the same information as table-1 except is uses a binary code.
7
TABLE-1 TWO INPUT AND GATE IN ORDINARY SYSTEM INPUT
A
OUTPUT
B
Y
LOW
LOW
LOW
LOW
HIGH
LOW
HIGH
LOW
LOW
HIGH
HIGH
HIGH
8
TABLE-2 TWO INPUT AND GATE IN ORDINARY SYSTEM
INPUT
OUTPUT
A
B
Y
0
0
0
0
1
0
1
0
0
1
1
1
AND GATE
NOT GATE
NOR GATE
OR GATE
9
NAND GATE
XOR GATE
“LOGIC GATES DETAILS”
Logic gate is a digital circuit, which works according to some logical relationship between input and output voltages. Truth table of a logic gate is a table that shows all the input and output possibilities for the logic gate.
“BOOLEAN ALGEBRA”
1. Addition sign is referred as OR. Y=A+B It is read as Y equal OR B
10
2. Multiplication sign (.) is referred as AND. Y=A.B It is read as Y equal A AND B
3. The bar sign (-) is referred as NOT. Y=A It is read as Y equal NOT A.
1) The OR GATEThe OR gate is a two inputs and one output logic gate. It combines the inputs A and B with output Y following the Boolean expression. Y=A+B OR gate is realized with the help of electronic circuit using two diodes D1 and D2. Negative terminal of the battery is grounded and positive terminal of battery is at high voltage. The output is voltage at C w.r.t earth. When both A and B are connected to earth i.e. A=0 and B=0 both diode do not conduct and hence no voltage develops across resistor i.e. Y=0.
11
When input A is connected to earth and B is connected to the terminal of the battery then junction diode D1 does not conduct while D2 conducts being forward biased. If both are ideal diodes then there will be no voltage drop across D2 and at same voltage as that of +ve terminal of battery i.e. Y=1. When A is connected to +ve terminal and B is earthed then D1 will conduct while D2 will not conduct and there will be no voltage drop across D1 i.e. Y=1 When both are connected to +ve terminal then both will be no voltage drop i.e. Y=1.
Therefore, if both input are low then output is low. But if either input is high, or both are high, the output is high. Table-3 summarizes the operation of a two input OR gate in terms of binary 0’s and 1’s.
TABLE-3 TRUTH TABLE OF OR GATE INPUT
OUTPUT
A
B
Y=A+B
0
0
0
0
1
1
1
0
1
1
1
1
The Not gate is a one input and one output logic gate. It combines the input A with the output Y by following Boolean expression. Y=A’
12
i.e. Y equals not A. it can be realized by using a transistor. The base of transistor is connected to A through a resistor Rb while the emeter is earthed. The collector is earthed through a resistor Rc and a 5V battery.
A=0 The base of the transistor also gets earthed. Therefore base emitter junction is not forward biased. Since the base current is zero, the collector current is also zero. The transistor is said to be in cut- off mode. The output Y will be equal to voltage of attery, connected to collector i.e. Y = 1.
A=1 When A is connected to +ve terminal of battery the baseemitter junction gets forward biased and it leads to a large collector current. The transistor is said to have gone to saturation i.e. Y=0. Basically NOT gate is invert OR. If we give a low input the resultant is high and if the input is high then output is low.
TABLE-4 TRUTH TABLE OF NOT GATE INPUT
OUTPUT
A
B
0
1
1
0
13
The AND gate is a two inputs and one output logic hate. It combines input A and B with the output Y following Boolean expression. Y=A.B i.e. Y equals A and B. it can be realized by electronic circuit by using two ideal p-n junction diodes D1 and D2. the resistance R is connected to +ve terminal of a 5V battery. The output Y is the voltage at C w.r.t earth.
When both A and B are connected to earth i.e. A=0 and B=0 both D1 and D2 gets forward biased hence conduct. The diodes being ideal, no voltage drop across D1 and D2. Hence output will be 0.
When A is earthed and B is connected to +ve terminal of battery, then diode D1 will conduct while D2 not conduct. D1 being ideal, no voltage drop takes place across it. Therefore voltage drop of 5V takes place across R having D at voltage 5 and C at 0V w.r.t earth i.e. Y=0.
When A is connected to +ve terminal and B is earthed i.e. A=1 and B=0 then D2 will conduct while D1 not. D2 being ideal no voltage drop across it takes place. Therefore a voltage drop takes place across R which equals 5v, having terminal D at +5V and C at 0V w.r.t earth i.e. Y=0. When both D1 and D2 are connected to + ve terminal i.e. A=B=1 then none will conduct. There will be no current through R. now potential at C = potential at D i.e. +5V w.r.t earth i.e. Y=0. The action of logic gate AND is summarized in form of truth table given below-
14
TABLE-3 TRUTH TABLE OF AND GATE INPUT
OUTPUT
A
B
Y=A.B
0
0
0
0
1
0
1
0
0
1
1
1
15
Various combinations of three basic gates provides large number of complicated digital circuits. Few combinations of basic gates are following THE
“NOR” GATE-
It is a logic circuit in which OR gate is followed by a NOT gate. If output(Y) of OR gate is connected to input of NOT gate, the gate so obtained is called NOR gate. Boolean expression of NOR gate is- Y=A’+B’ i.e. A or B neglected or Y equal NOT( A or B)
TABLE-3 TRUTH TABLE OF NOR GATE INPUT
OUTPUT
A
B
Y=A’+B’
0
0
1
0
1
0
1
0
0
1
1
0
THE
“NAND” GATE-
16
It is a logic gate in which AND gate is followed by a NOT gate. If output Y’ of AND gate is connected to input of NOT gate, the gate so obtain is called NAND gate. TABLE-3 TRUTH TABLE OF NAND GATE INPUT
OUTPUT
A
B
Y=A’+B’
0
0
1
0
1
0
1
0
0
1
1
0
6) THE “XOR: GATE- It is called “exclusive OR gate”. XOR gate can by- Y=AB+A’B’ It can be realized by making the circuit shown in the figure. In XOR gate the output is 1 if one of the input is 0 if both the inputs are 0 or 1 then output is zero. Truth table for XOR gate-
TABLE-6 TRUTH TABLE OF XOR GATE INPUT A
B
A’
B
0
0
1
1
Y’=A’B’
0
Y”=A.B
0
OUTPUT
0
17
0
1
1
0
1
0
1
1
0
0
1
0
1
1
1
1
0
0
0
0
0
18