Find Jobs
Hire Freelancers

C language— To check a Hamming code for a single-bit error, and to report and correct the error

$10-30 USD

Completed
Posted about 8 years ago

$10-30 USD

Paid on delivery
Objective: To check a Hamming code for a single-bit error, and to report and correct the error (if any). Inputs: The maximum length of a Hamming code The parity of the check bits (even=0, odd=1) The Hamming code Outputs: The erroneous bit (if any) The corrected Hamming code (if there was an error) Specification: The program checks a Hamming code for a single-bit error based on choosing from a menu of choices, where each choice calls the appropriate procedure, where the choices are: 1) Enter parameters 2) Check Hamming code 3) Quit program To use the Math library, use: “#include <math.h>” to access various functions, such as pow(base, exp), log(number), etc. To perform the XOR function, use the operator “^”. To use the String library, use: “#include <string.h>” to access various functions, such as strlen(string) which returns an integer representing the length of a string of characters. Skeleton code already posted, do not change the skeleton code Output: Error detection/correction: --------------------------- 1) Enter parameters 2) Check Hamming code 3) Quit Enter selection: 1 Enter the maximum length: 12 Enter the parity (0=even, 1=odd): 0 Error detection/correction: --------------------------- 1) Enter parameters 2) Check Hamming code 3) Quit Enter selection: 2 Enter the Hamming code: 1000110 There is an error in bit: 6 The corrected Hamming code is: 1100110 Error detection/correction: --------------------------- 1) Enter parameters 2) Check Hamming code 3) Quit Enter selection: 1 Enter the maximum length: 21 Enter the parity (0=even, 1=odd): 1 Error detection/correction: --------------------------- 1) Enter parameters 2) Check Hamming code 3) Quit Enter selection: 2 Enter the Hamming code: 1000110 There is an error in bit: 1 The corrected Hamming code is: 1000111 Error detection/correction: --------------------------- 1) Enter parameters 2) Check Hamming code 3) Quit Enter selection: 2 Enter the Hamming code: 1000111 There is no bit error Error detection/correction: --------------------------- 1) Enter parameters 2) Check Hamming code 3) Quit Enter selection: 3
Project ID: 10043851

About the project

3 proposals
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
It is easy assignment, can be done in few hours.
$23 USD in 1 day
4.9 (946 reviews)
7.1
7.1
3 freelancers are bidding on average $32 USD for this job
User Avatar
Hello, Before you select a part time developer from here, take a look at fugacode.com. If you like what you see, contact us. That's all. "Why hire freelancers? when you can hire professional developers for the same cost" Regards, FUGACODE Team
$24 USD in 1 day
4.8 (20 reviews)
6.3
6.3
User Avatar
Hi. i have a lot of experience in networking. I can easily help you with this project in given time. we can have a chat about it. thanks.
$50 USD in 1 day
4.8 (38 reviews)
4.9
4.9

About the client

Flag of UNITED STATES
northridge, United States
5.0
11
Payment method verified
Member since Nov 10, 2015

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.