In standard C (C89) You will write a parity and checksum detection program that takes a coded binary file as input,
examines the bytes for validity (even parity), and also examines each line for validity (checksum).
Your program should write the decoded text of the input binary file to the screen, so that it may be
viewed, along with indicators of the corrupted data that was found. After all the data in the file has
been processed, your program should report how many corrupted characters and lines were found in
You are given a binary file on the BB that you may assume has already been transmitted to your
computer, and which was coded for error detection. It contains redundant information to be analyzed
to help find what data may have been corrupted on transmission. It has even parity for each byte and
also a 16 bit checksum value after each new line in the file. Read from "CodedText" as a binary file.
You must check the parity of each byte, and then extract the character of text from the byte. Whenever
a new line character is found, read in the next two bytes of data as an unsigned short int which contains
the recorded checksum value for that line. Also you will need to find the sum of the ASCII values of
all characters on that line (including the parity bits and the new line character). Thus you will have the
checksum_from_file and the checksum_as_calculated. These will need to be compared to see if you
have a corrupted line. You may assume that the new line characters have not been corrupted.
For each input line along with the checksum value there are 3 possible output cases that you must
handle: In all cases you will need to strip out the parity bits and the checksum value before you output
that line to the screen.
Recently Asked Questions
- There is a debate about the need for more proof or better science before we make significant changes in our energy economy. How do we approach this? How much
- if an object is dropped and takes 9s to land at what velocity in ft/s would it have to be thrown from ground level to reach the height from which it was dropped
- Item32 Item 32 Which of the following could result in a corporation having more than 100% of its income subject to state taxation?