Pre-requisite: Hamming code
Hamming code is a set of error-correction codes that can be used to detect and correct the errors that can occur when the data is moved or stored from the sender to the receiver. It is a technique developed by R.W. Hamming for error correction.
Input: message bit = 0101 r1 r2 m1 r4 m2 m3 m4 0 1 0 1 Output: Generated codeword : r1 r2 m1 r4 m2 m3 m4 0 1 0 0 1 0 1 Explanation: Initially r1, r2, r4 is set to '0'. r1 = xor of all bits position which has '1' in its 0th-bit position r2 = xor of all bits which has '1' in its 1st-bit position r3 = xor of all bits which has '1' in its 2nd-bit position
Below is the implementation of the Hamming Code:
Generated hamming code r1 = 0 r2 = 1 r4 = 0 0100101
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Hamming code Implementation in C/C++
- Hamming Code in Computer Network
- Java Program to Convert Binary Code Into Equivalent Gray Code Using Recursion
- Difference between Fastag, Bar Code, QR Code and NFC
- Difference between QR Code, Bar Code and NFC
- Implementation of Blockchain in Java
- Java Implementation of Deffi-Hellman Algorithm between Client and Server
- Java implementation of Digital Signatures in Cryptography
- Implementation of Affine Cipher
- Implementation of Diffie-Hellman Algorithm
- TCP Server-Client implementation in C
- UDP Server-Client implementation in C
- Rabin Cryptosystem with Implementation
- Approaches to Information Security Implementation
- Implementation of a Back-off Algorithm for CSMA/CD
- Java | CDMA (Code Division Multiple Access)
- Java Code for Moving Text | Applet | Thread
- How to generate and read QR code with Java using ZXing Library
- Java Program to Convert English Text to Morse Code and Vice-Versa
- Java Program to Determine the Unicode Code Point at Given Index in String
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : Akanksha_Rai