Position : 7 6 5 4 3 2 1 Bit: d3d2 d1 p2 d0 p1 p0 Given that p2 = d3 XOR d2 XOR
ID: 3612935 • Letter: P
Question
Position : 7 6 5 4 3 2 1 Bit: d3d2 d1 p2 d0 p1 p0 Given that p2 = d3 XOR d2 XOR d1 p1 = d3 XOR d2 XOR d0 p0 = d3 XOR d1 XOR d0Question: Assume that no errorscan occurin the parity bits. Under this assumption we aretrying to minimize the number of parity bits in the code, yet westill want to be able to correct any single bit error inthe data bits. How many parity bits do we needat a minimum? Please provide a clear explanation. Thank you:) Position : 7 6 5 4 3 2 1 Bit: d3d2 d1 p2 d0 p1 p0 Given that p2 = d3 XOR d2 XOR d1 p1 = d3 XOR d2 XOR d0 p0 = d3 XOR d1 XOR d0
Question: Assume that no errorscan occurin the parity bits. Under this assumption we aretrying to minimize the number of parity bits in the code, yet westill want to be able to correct any single bit error inthe data bits. How many parity bits do we needat a minimum? Please provide a clear explanation. Thank you:)
Explanation / Answer
Position : 7 6 5 4 3 2 1 Bit: d3d2 d1 p2 d0 p1 p0 Given that p2 = d3 XOR d2 XOR d1p1 = d3 XOR d2 XOR d0 p0 = d3 XOR d1 XOR d0
Only one parity bit is needed to detect and correct any single biterror in the above code.
Let the parity bit be p at position 8.
Now find k =d3 xor d2 xor d1 xor p2 xor d0 xor p1 xor p0
if k=p, then there is no single bit error, if k is not equal to p,then there is a single bit error. p2 = d3 XOR d2 XOR d1
p1 = d3 XOR d2 XOR d0 p0 = d3 XOR d1 XOR d0
Only one parity bit is needed to detect and correct any single biterror in the above code.
Let the parity bit be p at position 8.
Now find k =d3 xor d2 xor d1 xor p2 xor d0 xor p1 xor p0
if k=p, then there is no single bit error, if k is not equal to p,then there is a single bit error.
1) suppose error is with d3..
p2 != d3 XOR d2 XOR d1, p1 != d3 XOR d2 XOR d0 ,
p0 !=to d3 XOR d1 XOR d0
then we will know that error is with d3
2) IF
p2 != d3 XOR d2 XOR d1, p1 != d3 XOR d2 XOR d0
but
p0 =to d3 XOR d1 XOR d0
then we will know that error is with d2
3) IF
p2 != d3 XOR d2 XOR d1,
p0 !=to d3 XOR d1 XOR d0,
but
p1 = d3 XOR d2 XOR d0
then we will know that error is with d1
4) if
p2 != d3 XOR d2 XOR d1,
but
p1 = d3 XOR d2 XOR d0 ,
p0 =to d3 XOR d1 XOR d0
then we will know that error is with p2
5) if
p2 = d3 XOR d2 XOR d1,
p1 = d3 XOR d2 XOR d0 ,
but
p0 !=to d3 XOR d1 XOR d0
then we will know that error is with p0
6) if
p2 = d3 XOR d2 XOR d1,
p0 =to d3 XOR d1 XORd0
but
p1 != d3 XOR d2 XOR d0 ,
then we will know that error is with p1
7) if
p2 = d3 XOR d2 XOR d1,
but
p0 !=to d3 XOR d1 XOR d0
p1 != d3 XOR d2 XOR d0 ,
then we will know that error is with d0
Therefore we can correct and detect any single bit error.....usingonly one parity bit.
p2 != d3 XOR d2 XOR d1, p1 != d3 XOR d2 XOR d0 ,
p0 !=to d3 XOR d1 XOR d0
then we will know that error is with d3
2) IF
p2 != d3 XOR d2 XOR d1, p1 != d3 XOR d2 XOR d0
but
p0 =to d3 XOR d1 XOR d0
then we will know that error is with d2
3) IF
p2 != d3 XOR d2 XOR d1,
p0 !=to d3 XOR d1 XOR d0,
but
p1 = d3 XOR d2 XOR d0
then we will know that error is with d1
4) if
p2 != d3 XOR d2 XOR d1,
but
p1 = d3 XOR d2 XOR d0 ,
p0 =to d3 XOR d1 XOR d0
then we will know that error is with p2
5) if
p2 = d3 XOR d2 XOR d1,
p1 = d3 XOR d2 XOR d0 ,
but
p0 !=to d3 XOR d1 XOR d0
then we will know that error is with p0
6) if
p2 = d3 XOR d2 XOR d1,
p0 =to d3 XOR d1 XORd0
but
p1 != d3 XOR d2 XOR d0 ,
then we will know that error is with p1
7) if
p2 = d3 XOR d2 XOR d1,
but
p0 !=to d3 XOR d1 XOR d0
p1 != d3 XOR d2 XOR d0 ,
then we will know that error is with d0
Therefore we can correct and detect any single bit error.....usingonly one parity bit.
p2 != d3 XOR d2 XOR d1, p1 != d3 XOR d2 XOR d0 ,
p0 !=to d3 XOR d1 XOR d0
then we will know that error is with d3
2) IF
p2 != d3 XOR d2 XOR d1, p1 != d3 XOR d2 XOR d0
but
p0 =to d3 XOR d1 XOR d0
then we will know that error is with d2
3) IF
p2 != d3 XOR d2 XOR d1,
p0 !=to d3 XOR d1 XOR d0,
but
p1 = d3 XOR d2 XOR d0
then we will know that error is with d1
4) if
p2 != d3 XOR d2 XOR d1,
but
p1 = d3 XOR d2 XOR d0 ,
p0 =to d3 XOR d1 XOR d0
then we will know that error is with p2
5) if
p2 = d3 XOR d2 XOR d1,
p1 = d3 XOR d2 XOR d0 ,
but
p0 !=to d3 XOR d1 XOR d0
then we will know that error is with p0
6) if
p2 = d3 XOR d2 XOR d1,
p0 =to d3 XOR d1 XORd0
but
p1 != d3 XOR d2 XOR d0 ,
then we will know that error is with p1
7) if
p2 = d3 XOR d2 XOR d1,
but
p0 !=to d3 XOR d1 XOR d0
p1 != d3 XOR d2 XOR d0 ,
then we will know that error is with d0
Therefore we can correct and detect any single bit error.....usingonly one parity bit.
p1 != d3 XOR d2 XOR d0 ,
p0 !=to d3 XOR d1 XOR d0
then we will know that error is with d3 p1 != d3 XOR d2 XOR d0
but
p0 =to d3 XOR d1 XOR d0
then we will know that error is with d2
3) IF
p2 != d3 XOR d2 XOR d1,
p0 !=to d3 XOR d1 XOR d0,
but
p1 = d3 XOR d2 XOR d0
then we will know that error is with d1
4) if
p2 != d3 XOR d2 XOR d1,
but
p1 = d3 XOR d2 XOR d0 ,
p0 =to d3 XOR d1 XOR d0
then we will know that error is with p2
5) if
p2 = d3 XOR d2 XOR d1,
p1 = d3 XOR d2 XOR d0 ,
but
p0 !=to d3 XOR d1 XOR d0
then we will know that error is with p0
6) if
p2 = d3 XOR d2 XOR d1,
p0 =to d3 XOR d1 XORd0
but
p1 != d3 XOR d2 XOR d0 ,
then we will know that error is with p1
7) if
p2 = d3 XOR d2 XOR d1,
but
p0 !=to d3 XOR d1 XOR d0
p1 != d3 XOR d2 XOR d0 ,
then we will know that error is with d0
Therefore we can correct and detect any single bit error.....usingonly one parity bit.
p1 = d3 XOR d2 XOR d0
then we will know that error is with d1
4) if
p2 != d3 XOR d2 XOR d1,
but
p1 = d3 XOR d2 XOR d0 ,
p0 =to d3 XOR d1 XOR d0
then we will know that error is with p2
5) if
p2 = d3 XOR d2 XOR d1,
p1 = d3 XOR d2 XOR d0 ,
but
p0 !=to d3 XOR d1 XOR d0
then we will know that error is with p0
6) if
p2 = d3 XOR d2 XOR d1,
p0 =to d3 XOR d1 XORd0
but
p1 != d3 XOR d2 XOR d0 ,
then we will know that error is with p1
7) if
p2 = d3 XOR d2 XOR d1,
but
p0 !=to d3 XOR d1 XOR d0
p1 != d3 XOR d2 XOR d0 ,
then we will know that error is with d0
Therefore we can correct and detect any single bit error.....usingonly one parity bit.
p1 = d3 XOR d2 XOR d0 ,
p0 =to d3 XOR d1 XOR d0
then we will know that error is with p2
p1 = d3 XOR d2 XOR d0 ,
but
p0 !=to d3 XOR d1 XOR d0
then we will know that error is with p0
6) if
p2 = d3 XOR d2 XOR d1,
p0 =to d3 XOR d1 XORd0
but
p1 != d3 XOR d2 XOR d0 ,
then we will know that error is with p1
7) if
p2 = d3 XOR d2 XOR d1,
but
p0 !=to d3 XOR d1 XOR d0
p1 != d3 XOR d2 XOR d0 ,
then we will know that error is with d0
Therefore we can correct and detect any single bit error.....usingonly one parity bit.
but
p1 != d3 XOR d2 XOR d0 ,
then we will know that error is with p1
7) if
p2 = d3 XOR d2 XOR d1,
but
p0 !=to d3 XOR d1 XOR d0
p1 != d3 XOR d2 XOR d0 ,
then we will know that error is with d0
Therefore we can correct and detect any single bit error.....usingonly one parity bit.
but
p0 !=to d3 XOR d1 XOR d0
p1 != d3 XOR d2 XOR d0 ,
then we will know that error is with d0
Therefore we can correct and detect any single bit error.....usingonly one parity bit.