Question: i need to write a program in C to generate some data, then add parity bits, and print the results. Assume each piece of data
i need to write a program in C to generate some data, then add parity bits, and print the results. Assume each piece of data is one byte, or 8 bits. So you need space for 9 bits. You need a two-dimensional array of 9 columns and 12 rows. Fill the arrays first 8 columns randomly with 1 and 0 by using rand()%2 Then compute parity bit for each row. Print data and parity bit. 9th column will be the result when you compute the parity bit, and it needs to be shown as, if the number of 1's is even parity bit is 0, if its odd, parity bit is 1
11001100 0
00101100 1
11001111 0
11011001 1
... it should look like this when the program ryns but as 12 columns
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
