
Updated On : 02-10-2025
Hamming Code क्या है? (Hamming Code in Hindi)
क्या आपने कभी सोचा है कि आपका WhatsApp मैसेज बिना गलती के कैसे पहुँचता है? इसका रहस्य छुपा है Hamming Code जैसी Error Detection & Correction तकनीकों में।
परिचय: Digital Communication में Error Correction
डिजिटल सिस्टम में डाटा ट्रांसफर के दौरान Noise या अन्य कारणों से बिट्स बदल सकते हैं। ऐसे में Error Detection और Error Correction तकनीक ज़रूरी होती है।
त्रुटि सुधार (Error Correction) की आवश्यकता
बिना Error Correction के डेटा पैकेट में छोटी सी गलती पूरी जानकारी को बेकार कर सकती है। Hamming Code इन त्रुटियों को पहचान कर सही बिट्स को पुनः प्राप्त करता है।
Hamming Code का मूल सिद्धांत (Basic Concept)
Hamming Code एक Linear Error-Correcting Code है। यह डेटा बिट्स में Parity Bits जोड़कर काम करता है। Parity Bits को इस तरह रखा जाता है कि वे एक साथ कई बिट्स की जाँच कर सकें।
Step-by-Step Calculation
- डेटा बिट्स चुनें: उदाहरण के लिए 4 बिट्स।
- Parity Bit positions: 1, 2, 4… (2^n)।
- Parity calculation: हर Parity Bit अपने संबंधित बिट्स की जाँच करता है।
- Transmission: Sender parity जोड़कर संदेश भेजता है।
- Error Detection: Receiver parity को दोबारा गणना करके गलत बिट खोजता है।
7,4 Hamming Code उदाहरण step-by-step
मान लीजिए डेटा बिट्स D1 D2 D3 D4 हैं। Parity Bits P1 P2 P4 होंगे।
संदेश भेजते समय उनका क्रम होगा: P1 P2 D1 P4 D2 D3 D4
.
यदि ट्रांसमिशन में कोई एक बिट बदल जाए, तो Receiver Parity चेक से गलत बिट का स्थान खोज लेता है और उसे सुधार देता है।
Hamming Code: Detailed Numerical Example
Step 1: Original Data Bits
Let's start with 4 data bits: 1 0 1 1
Bit Position | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|---|---|
Type | P1 | P2 | D3 | P4 | D5 | D6 | D7 |
Value | ? | ? | 1 | ? | 0 | 1 | 1 |
Step 2: Calculate Parity Bits
Bit Position | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|---|---|
Type | P1 | P2 | D3 | P4 | D5 | D6 | D7 |
Value | 0 | 1 | 1 | 0 | 0 | 1 | 1 |
Step 3: Transmitted Code Word
Final encoded message: 0 1 1 0 0 1 1
Step 4: Error Introduction
Let's assume bit position 6 flips during transmission:
Bit Position | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|---|---|
Sent | 0 | 1 | 1 | 0 | 0 | 1 | 1 |
Received | 0 | 1 | 1 | 0 | 0 | 0 | 1 |
Step 5: Error Detection & Correction
Step 6: Correct the Error
Flip bit at position 6 to correct the error:
Bit Position | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|---|---|
Before | 0 | 1 | 1 | 0 | 0 | 0 | 1 |
After | 0 | 1 | 1 | 0 | 0 | 1 | 1 |
Final Result
Encoded: 0 1 1 0 0 1 1
Received (with error): 0 1 1 0 0 0 1
Corrected: 0 1 1 0 0 1 1
Extracted Data: 1 0 1 1 ✓
व्यावहारिक उपयोग
- Digital Communication (Satellite, Mobile Networks)
- Computer Memory (ECC RAM)
- Data Storage Systems
History & Inventor
Richard W. Hamming ने 1950 में यह तकनीक विकसित की थी ताकि Bell Labs की कंप्यूटर मशीनें स्वचालित रूप से त्रुटि सुधार कर सकें।
सीमाएँ (Limitations of Hamming Code)
Hamming Code केवल single-bit errors को correct और double-bit errors को detect कर सकता है। High-noise चैनलों में Reed–Solomon या Turbo Codes अधिक प्रभावी होते हैं।
Technique | Detection | Correction |
---|---|---|
Parity Bit | Single-bit | नहीं |
Hamming Code | Single-bit & Double-bit Detect | Single-bit Correct |
Worked Example: 7,4 Hamming Code
डेटा: 1011 → Parity Bits P1,P2,P4 कैलकुलेशन टेबल यहां।
Try Yourself
डेटा 1101 के लिए parity bits निकालें।
Hamming vs Reed–Solomon
Reed–Solomon codes multi-bit burst errors को संभाल सकते हैं जबकि Hamming केवल single-bit के लिए है।
FAQ – अक्सर पूछे जाने वाले प्रश्न
Ans: यह single-bit errors को correct और double-bit errors को detect कर सकता है।
Ans: Parity Bits को 2^n पोज़ीशन पर रखा जाता है।
Ans: हाँ, ECC RAM और डिजिटल कम्युनिकेशन में अभी भी उपयोग होता है।
Ans: दो कोडवर्ड्स के बीच अलग बिट्स की संख्या।
Ans: 7 कुल बिट्स में 4 डेटा बिट्स और 3 parity bits शामिल हैं।
आपकी राय
💬 कमेंट करके बताइए कि अगला टॉपिक किस पर होना चाहिए — CRC या Parity?
📌 Further reading
- Divergence और Curl: Maxwell's Equations, Fluid Flow और Vector Calculus को सरल भाषा में समझें
- मैट्रिक्स पर e की घात — कैसे तथा क्यों (Matrix Exponential) | आसान हिंदी गाइड
- Riemann Zeta Function क्या है? | Analytic Continuation और Visualisation
🧑💻 About the Author
Anurag Rai एक टेक ब्लॉगर और नेटवर्किंग विशेषज्ञ हैं जो Accounting, AI, Game, इंटरनेट सुरक्षा और डिजिटल तकनीक पर गहराई से लिखते हैं।
Post a Comment
Blogger FacebookYour Comment Will be Show after Approval , Thanks