0% found this document useful (0 votes)
7 views9 pages

Hamming Code

Hamming code file

Uploaded by

SHREYA BHUVAD
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
7 views9 pages

Hamming Code

Hamming code file

Uploaded by

SHREYA BHUVAD
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
import [Link] dass Harnmingcode { public static void main(String args{]) ( Scanner scan = new Scanner{[Link]); [Link]("Enter the number of bits for the Hamming data "y int n= [Link](); int al] = new intin]; for(int i=0 ji ca, crpedteb cAteboset pat! rogram Files\Java\jdk1.8.0_192\bin C.\teb>javac [Link] c:\teb>java HammingCode Enter the number of bits for the Hammi; 7 Enter bit no. 7: 1 Enter bit Enter bit no. 5: 1 Enter bit no. 4: ° Enter bit no. 3: 1 enter bit nO: 2 o enterbit no. 2: 1 you entered: 3010101 Generated code is: 40100101111. Enter position of a bit to alti ‘0 check for error detecti jon at the receiver en 4 (0 for no error): 5 sent code is: so100111111 Error is at location 5. Corrected code is:

You might also like