Answered step by step
Verified Expert Solution
Question
1 Approved Answer
import java.util.Scanner; class HammingCode { static void print ( int ar [ ] ) { for ( int i = 1 ; i < ar
import java.util.Scanner;
class HammingCode
static void printint ar
for int i ; i arlength; i
System.out.printari;
System.out.println;
static int calculationint ar int r
for int i ; i r; i
int x int Math.pow i;
for int j ; j arlength; j
if j i &
if x j
arx arx arj;
System.out.printlnp x arx;
return ar;
static int generateCodeString str int M int r
int ar new intr M ;
int j ;
for int i ; i arlength; i
if MathceilMathlogi Math.log
Math.floorMathlogi Math.log
ari;
else
ariintstrcharAtj;
j;
return ar;
public static void mainString args
Scanner scanner new ScannerSystemin;
Input message from the user
System.out.printEnter Data: ;
String str scanner.nextLine;
int M strlength;
int k ;
K M K
while Math.pow kM k
k;
int ar generateCodestr M k;
System.out.printlnGenerated hamming code ;
ar calculationar k;
printar;
scanner.close;
you must do this hamming code with random noise error
you must calculate the percentage of correcting error single bit error, burst error you must do it to check and correct large data
Step by Step Solution
There are 3 Steps involved in it
Step: 1
To implement Hamming code with random noise error and calculate the percentage of correcting errors singlebit error burst error you can modify the exi...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started