Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

***Please show all work*** Q2. Parity bit error checking a. Derive the probabili

ID: 3820076 • Letter: #

Question

***Please show all work***

Q2. Parity bit error checking

a. Derive the probability of error for 3-bit packet using a parity bit as a method of error checking. List all the cases that the parity bit won’t be able to detect an error when it’s in fact occurring vs. the cases that the parity bit algorithm would detect an error, and compute out of all the possible combinations, what is the probability of parity bit error checking failing?

b. Extend this analysis to an n-bit packet and find the probability of an error in parity checking as n tends to infinity.

Explanation / Answer

Let the 3-bits data be represented using X2X1X0 and let the bit X3 added at the left-most corner be the parity bit. For our example we will consider an odd-parity detection i.e, the bit X3 will set the total number of bits with value '1' to be either 1 or 3. In that the list of cases with paritybit X3 and code X2X1X0 would be:

X3 X2 X1 X0

1 0 0 0

0 0 0 1

0 0 1 0

1 0 1 1

0 1 0 0

1 1 0 1

1 1 1 0

0 1 1 1

The odd parity algorithm would detect an error if the received 4-bit packet (parity + 3 bit data) has an even parity. Hence the algorithm detects an error if the following 4 bit packets are received:

0 0 0 0

0 0 1 1

0 1 0 1

0 1 1 0

1 0 0 1

1 0 1 0

1 1 0 0

1 1 1 1

ie., if the number of errors are odd (one or three), the received packet will have even parity and the algorithm will detect an error. else if the number of errors are even (two or 4), the received packet will have odd parity and the algorithm will not detect an error.

From the above lists it is very clear that if the received packet has even parity bits (half the total data - 8 packets) and if the received packet has odd parity bits, either received packet has no error or the algorithm cannot detect it as an error. (half of the total data 8 packets).

Computing the probability is very difficult as there is no way to find the cases in which either correct packet is received or even number of errrors received. But as the number of packets to detect an error is half of the total number of packets, we can simply say that 0.5 is the probability.

b) If the analysis is extended for n-bit packets and only one parity is added, half of the packets may help to detect errors and half will not indicate whether error has occurred or not. Hence for any large value of n or as n tends to infinity, half of the packets shall indicate errors and remaining half may not help to detect errors. Hence the proability is again 0.5 using the same analysis.