Thus, if it is zero, then the sum will be in the form 2 () x, then it will be divided by 2, and if it is equal to 1, then the amount will be in the form 2 () +1 x, then it will not be divided by 2. The code might be perfect for your university assignment.Ģ) Receive input from the user for number of bits per stream.ģ) Receive the input from the user bit by bit ( Here we are using 4 streams of bits).Ĥ) Store them in a double array using 2 for loopsĥ) Check for row parity and if the number of 1s are even store 0 in the sender side row parity array otherwise store 1 in the arrayħ) Run a for loop to counter check the elements of the 4 arrays, and if they don't match, store the position of row parity array in one variable and position of column parity array in another. We can take 2 out of the context for all terms except the last, which can be equal to either 1 or 0. ![]() ![]() Hey there all, since I could not find any suitable 2D parity check technique implementation in C across the web, I decided to build my own :), the code is a bit redundant but works perfectly according to the books.
0 Comments
Leave a Reply. |