logic gates (1)
TRANSCRIPT
![Page 1: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/1.jpg)
![Page 2: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/2.jpg)
ALLAH, IN WHOSE NAME I BEGIN, THE MOST AFFECTIONATE, THE MOST MERCIFUL.
2
![Page 3: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/3.jpg)
Objective:To understand the function of
Logic Gates.
•APPARATUS: Breadboard Diode
Transistor Connecting Wires
Resistor LED
3
![Page 4: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/4.jpg)
A digital system deals with quantities or variables which have only
two discrete values or states.
Following are the examples of such quantities:
• a switch can be either closed or open.
• the answer of a question can be either yes or no.
• a certain statement can be either true or false.
• a bulb can be either off or on.
Digital Systems
4
![Page 5: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/5.jpg)
•We have mostly two inputs A, B & one output C.
• There are many different ways that C could depend upon A and B.
• The output C is a function, - a logic function - of the inputs A and B.
Operations on logic signals
5
![Page 6: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/6.jpg)
• DEFINITION:• A logic gate is an elementary building block of a digital circuit. 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).
Logic Gates
6
![Page 7: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/7.jpg)
Types of Basic logic gates
AND
OR
NOT
NAND
NOR
7
![Page 8: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/8.jpg)
Symbols of Logic Gates
8
![Page 9: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/9.jpg)
Inputs & Outputs
9
![Page 10: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/10.jpg)
• Some gate symbols have a circle on their output which means that their function
includes inverting of the output. It is equivalent to feeding the output through a not
gate.
The inverting circle (o):
10
![Page 11: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/11.jpg)
•A DIAGRAM OF THE OUTPUTS FROM ALL POSSIBLE COMBINATIONS
OF INPUT
Truth Table
Input A Input B Output Q
0 0 0
0 1 0
1 0 0
1 1 1
11
![Page 12: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/12.jpg)
12
![Page 13: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/13.jpg)
Definition
The AND gate implements the Boolean AND function where the output only is logical 1 when all inputs are logical 1.
13
![Page 14: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/14.jpg)
SymbolLogical
Expression
The Boolean expression for the
AND gate is C=A.B
14
![Page 15: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/15.jpg)
Boolen Expression for AND
Inputs Output
A B C
0 0 0
0 1 0
1 0 0
1 1 1
Truth Table
15
![Page 16: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/16.jpg)
Circuit Diagram
16
![Page 17: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/17.jpg)
Mode Of Action
17
1. When A is at 0V, diode D1 conducts. So the
point C is driven to 0V.
2. The same mechanism is repeated if B is at 0v,
then D2 conducts which switches the point like
0v.
3. When both A & B are at 0V, both the diodes
conduct and point C is at 0V.
4. When both the inputs A & B are at +5V, no
current will flow. The point C will be at 5V and
we get the logic answer 1.
![Page 18: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/18.jpg)
Application
18
Person Sensor
Alarm SwitchBurglar Alarm
ON/OFF
ON/OFFON/OFF
If both the Person Sensor AND the
Alarm Switch are on then the
Burglar Alarm is activated.
![Page 19: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/19.jpg)
1. ELECTRONIC DOOR WILL ONLY OPEN IF IT DETECTS A PERSON AND THE SWITCH IS SET
TO UNLOCKED.
2. MICROWAVE WILL ONLY START IF THE START BUTTON IS PRESSED AND THE DOOR
CLOSE SWITCH IS CLOSED.
19
General Application
![Page 20: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/20.jpg)
20
![Page 21: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/21.jpg)
Definition
The OR gate implements the Boolean OR function where the output is logical 1 when
just input is logical 1.
21
![Page 22: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/22.jpg)
. SymbolLogical
Expression
The Boolean expression for the
OR gate is C=A+B
22
![Page 23: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/23.jpg)
Boolen Expression for OR
Inputs Output
A B C
0 0 0
0 1 1
1 0 1
1 1 1
Truth Table
23
![Page 24: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/24.jpg)
Circuit Diagram
24
![Page 25: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/25.jpg)
Mode Of Action
25
1. When A is at +5V, D1 is forward biased and
hence conduct. We get +5V at point C.
2. Same mechanism happens if B is at +5V, D2
Conducts, switching the point C at 5V.
3. When both A & B are at 5V, both the diode D1
and D2 conduct and the point C is again at
5V.
4. The point C will be at 0V if and only both A &
B are at 0V.
![Page 26: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/26.jpg)
Application
26
Front Doorbell Switch
Back Doorbell SwitchDoorbell
ON/OFF
ON/OFFON/OFF
If either the Front Doorbell Switch
OR the Back Doorbell Switch is
pressed then the Doorbell rings.
![Page 27: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/27.jpg)
27
![Page 28: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/28.jpg)
Definition
The NOT gate implements the Boolean NOT function where the output is the inverse of
the input.
28
![Page 29: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/29.jpg)
SymbolLogical
Expression
The Boolean expression for the
NOT gate is
A=C’Or
A= 𝑪
29
![Page 30: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/30.jpg)
Boolen Expression for NOT
Truth Table
Input Output
A C’ or 𝑪
0 1
1 0
30
![Page 31: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/31.jpg)
Circuit Diagram
31
![Page 32: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/32.jpg)
Mode Of Action
32
1. When A is at 5V, the emitter based junction is
forward biased and the transistor is on and
maximum current flows through the emitter lead.
So point C will be at 0V.
2. When we connect A with 0V, the transistor stops
working and we get the point C at +5V.
![Page 33: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/33.jpg)
Application
33
Temperature Detector
(Above 20°C)Central Heating
ON/OFF ON/OFF
If the temperature is above 20°C
then the Central Heating is switched
off.
If the temperature is below 20°C
then the Central Heating is switched
on.
![Page 34: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/34.jpg)
1. MICROWAVE WILL STOP IF THE DOOR IS NOT CLOSED.
2. TRAFFIC LIGHT WILL OPERATE NORMALLY IF IT'S NOT IN MAINTENANCE
MODE.
3. STREET LIGHTS ARE TURNED ON WHEN THERE IS NO SUNLIGHT OR JUST
WITH TWILIGHT.
34
General Application
![Page 35: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/35.jpg)
35
![Page 36: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/36.jpg)
Definition
The NOR is a combination of an OR followed by a NOT gate. The output is logical 1 when non of the
inputs are logical 0NOR gates are so-called "universal gates" that can be
combined to form any other kind of logic gate.
36
![Page 37: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/37.jpg)
SymbolLogical
Expression
The Boolean expression for the
NOR gate is
C = 𝑨 + 𝑩
37
![Page 38: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/38.jpg)
Boolen Expression for NOR
Truth Table
Inputs Output
A B C D
0 0 0 1
0 1 1 0
1 0 1 0
1 1 1 0
38
![Page 39: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/39.jpg)
Circuit Diagram
39
![Page 40: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/40.jpg)
• NOR GATE CAN BE USED TO REALIZE THE BASIC LOGIC FUNCTION OF OR GATE, AND GATE
1. AS OR GATE:
THE OUTPUT FROM NOR GATE IS 𝑨 + 𝑩 BY USING ANOTHER INVERTER IN THE OUTPUT, THE OUTPUT IS INVERTED AND IS GIVEN BY , C=A+B, WHICH IS LOGIC FUNCTION OF A SIMPLE OR GATE.
2.AS AND GATE:
TWO INVERTERS WILL BE USED, ONE FOR EACH INPUT. THE INPUTS HAVE BEEN INVERTED BEFORE THEY HAVE BEEN APPLIED TO THE NOR GATE. THE OUTPUT IS
𝑨 + 𝑩 = 𝑨.𝑩
WHICH IS DEMORGAN’S THEOREM.
40
NOR gate as Universal Gate
![Page 41: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/41.jpg)
Mode Of Action
41
1. The function of NOR gate is just the reverse
of OR gate function.
2. NOR gate will have an output 1 only when
both inputs A & B are at logic 0V
3. If any of the input is 1V, the output is 0V.
![Page 42: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/42.jpg)
Application
42
![Page 43: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/43.jpg)
43
![Page 44: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/44.jpg)
Definition
The NAND gate is an AND gate followed by a NOT gate. The output is logical 1 when one of
the inputs are logical 0
44
![Page 45: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/45.jpg)
SymbolLogical
Expression
The Boolean expression for the
NAND gate is
C = 𝑨.𝑩
45
![Page 46: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/46.jpg)
Boolen Expression for NAND
Truth Table
Inputs Output
A B C D
0 0 0 1
0 1 0 1
1 0 0 1
1 1 1 0
46
![Page 47: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/47.jpg)
Circuit Diagram
47
![Page 48: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/48.jpg)
• NAND GATE CAN BE USED TO REALIZE THE BASIC LOGIC FUNCTION OF OR GATE, AND GATE
1. AS AND GATE:
THE OUTPUT FROM NAND GATE IS 𝑨.𝑩 BY USING ANOTHER INVERTER IN THE OUTPUT, THE OUTPUT IS INVERTED AND IS GIVEN BY , C=A.B , WHICH IS LOGIC FUNCTION OF A SIMPLE AND GATE.
2.AS OR GATE:
TWO INVERTERS WILL BE USED, ONE FOR EACH INPUT. THE INPUTS HAVE BEENINVERTED BEFORE THEY HAVE BEEN APPLIED TO THE NANDGATE. THE OUTPUT IS
𝑨. 𝑩 = 𝑨 + 𝑩
WHICH IS DEMORGAN’S THEOREM.
48
NAND gate as Universal Gate
![Page 49: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/49.jpg)
Mode Of Action
49
1. The function of NAND gate is just the reverse of
AND gate function.
2. NAND gate will have an output 1 only when both
inputs A & B are at logic 0V or any of the inputs is
0V.
3. If both the inputs are 1, the output will be 0V.
![Page 50: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/50.jpg)
Application
50
A door closing system of an automobile
A car needs to be so designed that the driver gets a visual indication if any of the doors of the car is open so that it helps to avoid accident and injury to the passengers. Assuming there are two doors where this system is fitted, the circuit can be designed using a NAND gate as followsYou can see from the figure that when any of the switches is open due to the door position, the NAND gate energies the lamp inside the car, hence warning the driver.
![Page 51: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/51.jpg)
51
REFERENCES
![Page 52: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/52.jpg)
52
![Page 53: Logic gates (1)](https://reader030.vdocuments.net/reader030/viewer/2022020101/55a5e53d1a28ab32368b4859/html5/thumbnails/53.jpg)