Question: NOTE: Write program(s) to answer the following problems. You MUST write your own program! Use a programming language of your choice. (1) Write a program

 NOTE: Write program(s) to answer the following problems. You MUST write

NOTE: Write program(s) to answer the following problems. You MUST write your own program! Use a programming language of your choice. (1) Write a program to check for the number of Is. If the number of Is is odd, the program will return (print) 1; if the number of Is is even, the program will return 0. For example: if your input is 10111, the output is O since the number of Is is 4 (= even). If your input is 00010, the output is I since the number of Isis 1 (= odd). (2) Simulation of the simple parity check detection code C(5, 4). Using the function/program which you have created in problem 1, write a program which asks the user to enter 5 bits codeword. The program will check whether the codeword contains an error by checking the syndrome (S). The program will print the words *) "No error in codeword" if there no error (*) "Error in codeword" if there is an error Remember that C(5, 4) could only check for odd number of errors. To test your program, use the following inputs: 00101 and 10101 (3) Simulation of Hamming error correction code H(7.4). Using the function program which you have created in problem I, write a program which asks the user to enter 7 bits codeword. The program will check whether the codeword contains an error by checking the syndrome (S2 S1 SO). (*) If the codeword contains no error the program will print the words "No error in codeword". (*) If the codeword contains an error, the program will check where is the location of the error, fix it, and print out the correct codeword. To test your program, use the following inputs: 0101110 and 1 100110

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!