Logic Gates क्या हैं? Types, Symbols, Truth Table, Boolean Algebra और Applications
Introduction – Logic Gate क्या है?
Logic Gate एक basic electronic circuit है, जिसका उपयोग digital electronic systems में logical operations perform करने के लिए किया जाता है। Logic Gates binary signals यानी 0 और 1 पर काम करते हैं।
Digital electronics में:
0 = LOW = OFF
1 = HIGH = ON
Logic Gates input signals को process करके एक output generate करते हैं। Output, input signals की combination और संबंधित gate के logical rule पर निर्भर करता है।
Logic Gates का उपयोग Computers, PLCs, Microcontrollers, Digital Circuits, Automation Systems, Control Panels और Electronic Devices में किया जाता है।
Digital electronics के fundamental building blocks को समझने के लिए Logic Gates का ज्ञान बहुत जरूरी है।
1. Logic Gate कैसे काम करता है?
Logic Gate एक या अधिक inputs लेता है और logical operation के अनुसार output देता है।
उदाहरण के लिए, अगर किसी AND Gate में दो inputs A और B हैं, तो output तभी 1 होगा जब दोनों inputs 1 हों।
अगर:
A = 1
B = 1
तो:
Y = 1
लेकिन अगर A या B में से कोई भी input 0 है, तो output 0 होगा।
Logic Gates को समझने के लिए तीन चीजें महत्वपूर्ण हैं:
Logic Gate Symbol
Boolean Expression
Truth Table
2. Binary Number System क्या है?
Logic Gates Binary Number System पर काम करते हैं।
Binary system में केवल दो digits होते हैं:
0
1
इनका उपयोग digital circuits में electrical signal की दो states represent करने के लिए किया जाता है।
| Binary | Electrical State (Conceptually) |
|---|---|
| 0 | LOW |
| 1 | HIGH |
Actual voltage levels circuit की supply और logic family पर depend करते हैं। इसलिए 0 और 1 को हमेशा किसी universal voltage value के बराबर नहीं माना जाता।
3. Logic Gates के Types
Digital electronics में commonly used Logic Gates निम्नलिखित हैं:
Basic Logic Gates
AND Gate
OR Gate
NOT Gate
Universal Logic Gates
NAND Gate
NOR Gate
Special Logic Gates
XOR Gate
XNOR Gate
अब सभी Logic Gates को एक-एक करके समझते हैं।
4. AND Gate
AND Gate एक ऐसा logic gate है, जिसका output HIGH (1) तभी होता है जब सभी inputs HIGH (1) हों।
अगर किसी भी input की value LOW (0) है, तो output LOW (0) होगा।
Boolean Expression
Y = A · B
यहाँ:
A = First Input
B = Second Input
Y = Output
AND operation को multiplication symbol (·) से represent किया जाता है।
AND Gate Truth Table
| A | B | Y = A·B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
AND Gate का Practical Example
मान लीजिए एक motor तभी start होनी चाहिए जब:
Start Command ON हो।
Safety Condition Healthy हो।
Motor start logic:
Motor Start = Start Command AND Safety Healthy
अगर दोनों conditions ON हैं, तभी motor start command generate होगा।
AND Gate Applications
Safety Interlocking
PLC Logic
Machine Control
Digital Circuits
Permission Logic
Process Automation
5. OR Gate
OR Gate का output HIGH (1) होता है, जब किसी भी input की value HIGH (1) हो।
अगर सभी inputs LOW (0) हों, तो output LOW (0) होता है।
Boolean Expression
Y = A + B
OR operation को Boolean Algebra में plus (+) से represent किया जाता है।
OR Gate Truth Table
| A | B | Y = A+B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
OR Gate का Practical Example
मान लीजिए एक pump को दो अलग-अलग locations से start किया जा सकता है।
Local Start Command
Remote Start Command
अगर किसी भी एक start command से pump start हो सकती है, तो logical condition OR होगी।
Pump Start = Local Start OR Remote Start
OR Gate Applications
Alarm Systems
Multiple Start Commands
Emergency Signals
Fire Detection Systems
PLC Control Logic
6. NOT Gate
NOT Gate को Inverter भी कहा जाता है।
यह input signal को उलट देता है।
Input 0 → Output 1
Input 1 → Output 0
NOT Gate में केवल एक input होता है।
Boolean Expression
Y = A̅
या
Y = NOT A
NOT Gate Truth Table
| A | Y = A̅ |
|---|---|
| 0 | 1 |
| 1 | 0 |
NOT Gate का Practical Example
मान लीजिए किसी tank में Low Level Switch लगा है और उसका signal logical तरीके से invert करना है।
NOT Gate input को invert करके opposite logic produce करता है।
PLC programming में भी NOT logic का उपयोग input condition को invert करने के लिए किया जाता है।
NOT Gate Applications
Signal Inversion
Digital Circuit
Complement Logic
PLC Programming
Switching Circuits
7. NAND Gate
NAND Gate का full form है:
NOT AND
NAND Gate, AND Gate के output को invert करता है।
AND Gate में सभी inputs 1 होने पर output 1 होता है, लेकिन NAND Gate में सभी inputs 1 होने पर output 0 होता है।
बाकी सभी combinations में output 1 होता है।
Boolean Expression
Y = (A · B)̅
NAND Gate Truth Table
| A | B | Y = NAND |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
NAND Gate का Practical Example
अगर किसी digital circuit में AND operation के बाद output invert करना हो, तो NAND Gate का उपयोग किया जा सकता है।
NAND Gate Applications
Digital ICs
Memory Circuits
Logic Circuit Design
Control Systems
Universal Gate Applications
8. NOR Gate
NOR Gate का full form है:
NOT OR
NOR Gate, OR Gate के output को invert करता है।
OR Gate में किसी भी input के 1 होने पर output 1 होता है, लेकिन NOR Gate में output 0 होता है।
Output केवल तभी 1 होगा जब सभी inputs 0 हों।
Boolean Expression
Y = (A + B)̅
NOR Gate Truth Table
| A | B | Y = NOR |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
NOR Gate Applications
Digital Logic
Control Circuits
Memory Circuits
Switching Circuits
Universal Gate Applications
9. XOR Gate (Exclusive OR)
XOR Gate का full form है:
Exclusive OR
XOR Gate का output HIGH (1) तभी होता है जब दोनों inputs अलग-अलग हों।
अगर दोनों inputs समान हैं, तो output 0 होगा।
Boolean Expression
Y = A ⊕ B
XOR Gate Truth Table
| A | B | Y = A⊕B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
XOR Gate का Practical Example
अगर दो inputs की states अलग हैं, तो XOR Gate output ON करता है।
Example:
A = 0, B = 1 → Output = 1
A = 1, B = 0 → Output = 1
A = 1, B = 1 → Output = 0
XOR Gate Applications
Half Adder
Full Adder
Parity Generator
Parity Checker
Digital Arithmetic
Error Detection
10. XNOR Gate (Exclusive NOR)
XNOR Gate, XOR Gate का inverted version है।
XNOR Gate का output HIGH (1) तब होता है जब दोनों inputs समान हों।
Boolean Expression
Y = (A ⊕ B)̅
XNOR Gate Truth Table
| A | B | Y = XNOR |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
XNOR Gate का Practical Example
XNOR Gate का उपयोग दो binary signals को compare करने के लिए किया जा सकता है।
अगर दोनों signals समान हैं, तो output 1 होगा।
XNOR Gate Applications
Digital Comparators
Equality Detection
Error Detection
Control Systems
Digital Logic
11. सभी Logic Gates की Truth Table
नीचे सभी प्रमुख 2-input Logic Gates की combined truth table दी गई है।
| A | B | AND | OR | NAND | NOR | XOR | XNOR |
|—|—|—|—|—|—|—|
| 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 |
NOT Gate के लिए केवल एक input होता है, इसलिए उसकी truth table अलग होती है।
12. Universal Logic Gates क्या हैं?
NAND और NOR Gates को Universal Logic Gates कहा जाता है।
इनका उपयोग करके किसी भी basic logic gate को बनाया जा सकता है।
इसका मतलब है कि केवल NAND Gates या केवल NOR Gates की मदद से AND, OR और NOT जैसे functions implement किए जा सकते हैं।
NAND Gate से NOT Gate
अगर NAND Gate के दोनों inputs को एक ही signal A से connect कर दिया जाए:
Y = A NAND A
तो:
Y = A̅
इससे NAND Gate को NOT Gate की तरह उपयोग किया जा सकता है।
NAND Gate से AND Gate
NAND Gate का output invert करने पर AND operation मिलता है।
Y = (A NAND B)̅
इसलिए NAND Gates की मदद से AND Gate बनाया जा सकता है।
NAND Gate से OR Gate
De Morgan’s Law के अनुसार:
A + B = (A̅ · B̅)̅
इसलिए NAND Gates का उपयोग करके OR function implement किया जा सकता है।
इसी प्रकार NOR Gates से भी सभी basic logic functions implement किए जा सकते हैं।
13. Boolean Algebra क्या है?
Boolean Algebra digital logic की mathematical system है, जिसमें variables की values केवल 0 और 1 होती हैं।
Boolean Algebra का उपयोग Logic Gates और Digital Circuits को design और simplify करने के लिए किया जाता है।
Basic Boolean Operations
| Operation | Symbol | Meaning |
|---|---|---|
| AND | A·B | दोनों inputs 1 होने पर 1 |
| OR | A+B | कोई भी input 1 होने पर 1 |
| NOT | A̅ | Input का opposite |
Basic Boolean Laws
1. Identity Law
A + 0 = A
A · 1 = A
2. Null Law
A + 1 = 1
A · 0 = 0
3. Idempotent Law
A + A = A
A · A = A
4. Complement Law
A + A̅ = 1
A · A̅ = 0
5. Double Negation
(A̅)̅ = A
6. Commutative Law
A + B = B + A
A · B = B · A
7. Associative Law
A + (B + C) = (A + B) + C
A · (B · C) = (A · B) · C
8. Distributive Law
A · (B + C) = A·B + A·C
A + (B · C) = (A + B) · (A + C)
14. De Morgan’s Theorem
De Morgan’s Theorem Boolean Algebra का महत्वपूर्ण rule है।
यह AND और OR operations को invert करने में उपयोग होता है।
First Theorem
(A · B)̅ = A̅ + B̅
AND operation को invert करने पर OR operation और दोनों inputs inverted हो जाते हैं।
Second Theorem
(A + B)̅ = A̅ · B̅
OR operation को invert करने पर AND operation और दोनों inputs inverted हो जाते हैं।
De Morgan’s Theorem का उपयोग digital circuits को simplify करने और NAND/NOR based logic design में किया जाता है।
15. Logic Gates और PLC Programming
Logic Gates का concept PLC programming में बहुत महत्वपूर्ण है।
PLC में AND, OR और NOT logic को Ladder Logic, Function Block Diagram और अन्य programming languages के माध्यम से implement किया जाता है।
PLC में AND Logic
दो conditions के true होने पर output ON होता है।
Example:
Pump Start Command = ON
Level Condition = Healthy
दोनों conditions true होने पर pump start logic allow हो सकता है।
PLC में OR Logic
किसी एक condition के true होने पर output ON हो सकता है।
Example:
High Pressure Alarm
High Temperature Alarm
किसी भी एक alarm condition के true होने पर common alarm generate किया जा सकता है।
PLC में NOT Logic
किसी signal की opposite condition को logic में use किया जाता है।
Example:
Motor Running Feedback NOT available
Pump Stop Condition
Inverted Sensor Logic
Important: PLC में वास्तविक field wiring, NO/NC contacts, input polarity और fail-safe conditions को समझकर logic implement करना चाहिए। केवल gate logic देखकर safety circuit design नहीं करना चाहिए।
16. Logic Gates के Industrial Applications
Logic Gates का उपयोग विभिन्न industries और automation systems में किया जाता है।
1. Industrial Automation
Machines को automatic control करने के लिए AND, OR, NOT और अन्य logic operations उपयोग होते हैं।
2. Motor Control
Motor start, stop, interlocking और permissive conditions implement करने में logic का उपयोग होता है।
3. Safety Interlocking
Machine operation को required conditions के अनुसार allow या inhibit करने के लिए control logic का उपयोग होता है। Safety-rated functions के लिए appropriate safety hardware और validated safety logic जरूरी है।
4. Alarm Systems
Multiple alarm conditions से common alarm generate करने के लिए OR logic का उपयोग किया जाता है।
5. Digital Computers
Logic Gates CPU, memory, arithmetic circuits और digital processing systems के basic building blocks हैं।
6. Communication Systems
XOR, XNOR और अन्य logic operations error detection तथा data processing में उपयोग होते हैं।
7. Water Treatment Plants
Pump permissive logic
Tank level control
Blower interlocking
Auto/manual control logic
Alarm generation
Sequence operation
17. Logic Gates और Electrical Relay Logic
Logic Gates और relay circuits में logical functions समान हो सकते हैं, लेकिन implementation अलग होता है।
| Logic Gate | Relay Logic Concept |
|---|---|
| AND | Series contacts |
| OR | Parallel contacts |
| NOT | Inverted condition / NC logic |
| NAND | AND के बाद inverted logic |
| NOR | OR के बाद inverted logic |
| XOR | Different-state detection logic |
| XNOR | Same-state detection logic |
PLC Ladder Logic में series contacts AND logic represent करते हैं और parallel branches OR logic represent करती हैं, जबकि instruction और contact configuration के अनुसार inversion implement किया जा सकता है।
18. Logic Gates के Advantages
Digital circuits को design करना आसान बनाते हैं।
Automation systems में logical control provide करते हैं।
Fast switching operation.
Electronic systems में reliability बढ़ाते हैं।
Complex circuits को छोटे logic blocks में design किया जा सकता है।
Computers और microprocessors के fundamental building blocks हैं।
PLC और industrial control systems में logical decision making enable करते हैं।
19. Logic Gates के Limitations
Basic logic gates limited logical operations perform करते हैं।
Complex circuits में कई gates की आवश्यकता हो सकती है।
Gate delay और propagation time circuit performance को प्रभावित कर सकते हैं।
Noise और incorrect voltage levels से malfunction हो सकता है।
Complex logic circuit design और troubleshooting difficult हो सकती है।
20. Frequently Asked Questions (FAQs)
Q1. Logic Gate क्या है?
Logic Gate एक digital electronic circuit है, जो binary inputs पर logical operation perform करके output generate करता है।
Q2. Logic Gates कितने प्रकार के होते हैं?
Basic और commonly used gates हैं AND, OR, NOT, NAND, NOR, XOR और XNOR।
Q3. Universal Logic Gates कौन से हैं?
NAND और NOR Gates universal logic gates हैं, क्योंकि इनसे सभी basic logic functions implement किए जा सकते हैं।
Q4. AND Gate का output कब ON होता है?
AND Gate का output तभी ON होता है जब सभी inputs ON हों।
Q5. OR Gate का output कब ON होता है?
OR Gate का output कम से कम एक input ON होने पर ON होता है।
Q6. NOT Gate क्या करता है?
NOT Gate input को invert करता है। Input 0 हो तो output 1 और input 1 हो तो output 0 होता है।
Q7. XOR Gate और XNOR Gate में क्या difference है?
XOR का output inputs अलग होने पर 1 होता है, जबकि XNOR का output inputs समान होने पर 1 होता है।
Q8. Logic Gates का उपयोग PLC में होता है?
हाँ, PLC programming में AND, OR, NOT और अन्य logic functions का उपयोग machine control, interlocking, alarm और automation sequences बनाने के लिए किया जाता है।
Q9. Logic Gates का उपयोग कहाँ होता है?
Computers, PLCs, Microcontrollers, Digital Electronics, Automation Systems, Communication Systems और Control Circuits में Logic Gates का उपयोग होता है।
Conclusion
Logic Gates digital electronics और industrial automation के fundamental building blocks हैं। ये binary signals यानी 0 और 1 पर काम करते हैं तथा logical conditions के अनुसार output generate करते हैं।
AND, OR और NOT basic logic gates हैं, जबकि NAND और NOR universal logic gates कहलाते हैं। XOR और XNOR gates comparison, arithmetic और digital logic applications में महत्वपूर्ण भूमिका निभाते हैं।
Logic Gates को समझना PLC programming, Digital Electronics, Microcontrollers, Computer Engineering और Industrial Automation सीखने के लिए बहुत आवश्यक है।
Learn Electrical Technology – Learn Electricity, Understand Technology, Build Your Skills.
