Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probabilistic Databases

Authors: Dan Suciu, Dan Olteanu, Christopher Re, Christoph Koch

1st Edition

3031007514, 978-3031007514

More Books

Students also viewed these Databases questions