Translate

Hamming Code In Hindi

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

  1. डेटा बिट्स चुनें: उदाहरण के लिए 4 बिट्स।
  2. Parity Bit positions: 1, 2, 4… (2^n)।
  3. Parity calculation: हर Parity Bit अपने संबंधित बिट्स की जाँच करता है।
  4. Transmission: Sender parity जोड़कर संदेश भेजता है।
  5. 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

P1 (positions 1,3,5,7): D3 ⊕ D5 ⊕ D7 = 1 ⊕ 0 ⊕ 1 = 0
P2 (positions 2,3,6,7): D3 ⊕ D6 ⊕ D7 = 1 ⊕ 1 ⊕ 1 = 1
P4 (positions 4,5,6,7): D5 ⊕ D6 ⊕ D7 = 0 ⊕ 1 ⊕ 1 = 0
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

Encoded Hamming Code: 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

Check P1 (1,3,5,7): 0 ⊕ 1 ⊕ 0 ⊕ 1 = 0
Check P2 (2,3,6,7): 1 ⊕ 1 ⊕ 0 ⊕ 1 = 1
Check P4 (4,5,6,7): 0 ⊕ 0 ⊕ 0 ⊕ 1 = 1
Error Position = P4 P2 P1 = 1 1 0 = 6

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
Note: This example demonstrates (7,4) Hamming code which can detect and correct single-bit errors. The parity bits are calculated using XOR (⊕) operations on specific data bit positions.

Final Result

Original Data: 1 0 1 1
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 अधिक प्रभावी होते हैं।

TechniqueDetectionCorrection
Parity BitSingle-bitनहीं
Hamming CodeSingle-bit & Double-bit DetectSingle-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 – अक्सर पूछे जाने वाले प्रश्न

Q1. Hamming Code किस प्रकार की errors को ठीक कर सकता है?
Ans: यह single-bit errors को correct और double-bit errors को detect कर सकता है।
Q2. Parity Bit कैसे चुने जाते हैं?
Ans: Parity Bits को 2^n पोज़ीशन पर रखा जाता है।
Q3. क्या Hamming Code आज भी प्रयोग होता है?
Ans: हाँ, ECC RAM और डिजिटल कम्युनिकेशन में अभी भी उपयोग होता है।
Q4. Hamming Distance क्या है?
Ans: दो कोडवर्ड्स के बीच अलग बिट्स की संख्या।
Q5. 7,4 Hamming Code का मतलब क्या है?
Ans: 7 कुल बिट्स में 4 डेटा बिट्स और 3 parity bits शामिल हैं।

आपकी राय

💬 कमेंट करके बताइए कि अगला टॉपिक किस पर होना चाहिए — CRC या Parity?

📌 Further reading

🧑‍💻 About the Author

Anurag Rai एक टेक ब्लॉगर और नेटवर्किंग विशेषज्ञ हैं जो Accounting, AI, Game, इंटरनेट सुरक्षा और डिजिटल तकनीक पर गहराई से लिखते हैं।

Post a Comment

Blogger

Your Comment Will be Show after Approval , Thanks

Ads

 
↑ Top