Question on parity

nabil

Member
Mar 4, 2007
7,320
1
0
35
North Carolina / Kandy
Hi guyz..
i hav my unit exams tomoro so preparing for it..
i came across a question that i hav no idea how to solve.. its bout parity bits.

Q: The ASCII codes for P and Q are 1010000 and 1010001 respectively. In an even parity transmission system, what will be the value of the parity bit for the characters P and Q..

can any1 help? :D
 

x-pert

Member
Jun 13, 2006
20,952
77
0
In an even parity system, we use 1 to represent the number or 1 bits in the string are even. And we use 0 to represent that the number of 1 bits are odd.

(Guess you know about some thing about parity ryt?)

So in P: There are 2 "1" bits. So thats even. Hence we add a 1 as the parity bit

In Q: There are 3 "1" bits. So that's odd. Hence we add a 0 as the parity bit

:)

Guess it's clear.

[Someone verify this plz. I did these kinda things 4 years back so not 100% sure]
 

nabil

Member
Mar 4, 2007
7,320
1
0
35
North Carolina / Kandy
x-pert said:
In an even parity system, we use 1 to represent the number or 1 bits in the string are even. And we use 0 to represent that the number of 1 bits are odd.

(Guess you know about some thing about parity ryt?)

So in P: There are 2 "1" bits. So thats even. Hence we add a 1 as the parity bit

In Q: There are 3 "1" bits. So that's odd. Hence we add a 0 as the parity bit


:)

Guess it's clear.

[Someone verify this plz. I did these kinda things 4 years back so not 100% sure]
thats exactly what i wanted to know.. and ur ryt i hav the answer but just wanted the method to get it.. thnx a load :D
 

x-pert

Member
Jun 13, 2006
20,952
77
0
nabil said:
thats exactly what i wanted to know.. and ur ryt i hav the answer but just wanted the method to get it.. thnx a load :D


Are you 100% sure that the answer is right..??

I got a small doubt about it..
 

x-pert

Member
Jun 13, 2006
20,952
77
0
nabil said:
ya i guess the answer is ryt for the opposite letters..
i.e. P= 01010000
and Q = 11010001

so for P a 0 is added as the parity bit and 1 is added for Q

Oh there you go :D :D :D

So my earlier answer was wrong... :)

This is the correct explanations then.

In an even parity system:

You add "1" as the parity bit if the number of 1 bits are odd in the given string inorder to make the number of 1s even.

And

You add "0" as the parity bit, if the number of 1 bits are even in the given string inorder to keep the number of 1s even.

Really sorry about the earlier confusion machang :)

Hope this helps :)
 

nabil

Member
Mar 4, 2007
7,320
1
0
35
North Carolina / Kandy
k a lil research.. understood ith the help of ur answer..
In an even parity transmission system , the total number of "on" bits including the parity bit should be even.. does "on" mean "1"? :confused:
 

x-pert

Member
Jun 13, 2006
20,952
77
0
nabil said:
k a lil research.. understood ith the help of ur answer..
In an even parity transmission system , the total number of "on" bits including the parity bit should be even.. does "on" mean "1"? :confused:

Good work :D

Yeah on is 1 and off is 0 ;)
 

nabil

Member
Mar 4, 2007
7,320
1
0
35
North Carolina / Kandy
x-pert said:
Oh there you go :D :D :D

So my earlier answer was wrong... :)

This is the correct explanations then.

In an even parity system:

You add "1" as the parity bit if the number of 1 bits are odd in the given string inorder to make the number of 1s even.

And

You add "0" as the parity bit, if the number of 1 bits are even in the given string inorder to keep the number of 1s even.

Really sorry about the earlier confusion machang :)

Hope this helps :)
oh k.. clear as a crystal.. thnx :D