I would like to explain this answer :)
In the question above we are talking about parity -- which is one of the methods used for Error Correction and detection
Now assume data we need to send is
ROW 1 : 1 1 1
Row 2 : 0 1 1
Row 3 : 1 0 1
now what we need to do we need to calculate parity ( assume even parity of 1 ) rowwise and columnwise .
So for rowise ( ROW 1) we will get parity bit as 1 ( we need to make even no of ones by counting parity and databits )
for row 2 : parity bit will be 0
for row 3 parity bit will be 0
now again calculate for columwise
coloum1 : parity bit is 0
column2 parity bit is 0
coloumn 3 parity bit is 1
now sender sends data and even parity bits that it calculate (rowwise and coloumnwise)
So data send here is :
Row 1 : 1 1 1
Row 2 : 0 1 1
Row 3 : 1 0 1
PRow : 1 0 0 where P row mean rowise parity
Crow : 0 0 1 where C mean colown parity ( calculated above )
Now next thing :
Reciever get data :
Assume he get
1 0 1
0 1 1
1 0 1
now he will calcuated parity rowise and columwise
so for row 1 : parity is 0
for row 2 : it is 0
for row 3 it is 0
now colum wise
col 1 : 0
col2 : 1
col 3 : 1
Now final step :
if we see parity at sender side was ( Rowise parity was ) : 1 0 0
f we see parity at column side was ( Rowise parity was ) : 0 0 0
see the first bit is changes from 1 -- 0 so error ( first row )
f we see parity at sender side was ( columnwise parity was ) : 0 0 1
f we see parity at column side was ( columwise parity was ) : 0 1 1
here the third bit doenst match it gt change from 1-- 0 ( second column)
Now the intersection or position of first row and 2 column , we have an error
And look the under lined 0 ( above ) . It is an erro bit . since we know the postion we flip the bit to 1
hence this way we can detect 1 bit error
But sometimes we cant detect also beacuse parity bits might get corrupted with data bits . so that they satisfy even parity criteria .
( you can try for out 2 bits :)) -- Just change any 2 bits and follow same procedure you wont be able to find out position of that on reciever side
The fact when we cant distinguish or find error even with the help of parity bits . Such errors are called meaningful errors