Question: in c programing please 16.45 Lab 8, P1(W): 2-Dim Parities visibi Thisyab gojnbe available until March 1711, 2:00 PM MST A two-dimensional parity check code


16.45 Lab 8, P1(W): 2-Dim Parities visibi Thisyab gojnbe available until March 1711, 2:00 PM MST A two-dimensional parity check code is used to detect errors that occur in the storage and transmission of bits. It operates by arranging a sequence of bits into a two-dimensional array and then computing the parity values for each row and column. For a given row (column) of the array, the corresponding parity bit is equal to 1 if the number of ones in that row (column) is odd, and otherwise. As an example, consider the following array and the corresponding horizontal and vertical parity bits marked in blue. 1011110 1000011 0011111 1111111 0101010 10111 The horizontal parity of the first line is O because there is an even number of ones in that row. Similarly, the corresponding vertical parity of the first column is 1 because there is an odd number of ones in that column. You are given a two dimensional array of size 5x5 that contains only binary values. You are to compute the "parity" values of this amay Develop a program that: a) Reads a 525 two dimensional array from file array.txt (create that file). Use the following function prototype for reading the array void readar (FILE - in, int x 1(51); b) Computes the parity bits c) Prints the 2 dim array plus parities on screen Sample Output Purity Array: 10111 10000 0011 IIIII 01010 Horizontal Parity: 01110 Vertical Parity: 10111 LABACTIVITY 16.45.1: Lab 8. P1(W): 2-Dim Parities 012 Downloadable files array.txt Download camboo ARIZONAECEIS Spring esiths 9 mid-s:(W)19.8 dB.Jan main.c Load default template 1 #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
