1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Odd parity

  1. Sep 19, 2013 #1
    1. The question
    The following message was originally transmitted with odd parity in each short bit string.
    In which strings have errors definitely occurred?

    11001 11011 10110 00000 11111 10001
    10101 00100 01110

    2. The attempt at a solution

    It says that it is transmitted with odd parity originally, so do I only have to look if the bit string has an odd or even number of ones? Or do I have to add an parity number, and how would I do that?

    Let's say I only have to look at odd/even, answer would be:
    11011, and 10001 as these have even 1 numbers. What about the 00000? It doesn't have any ones so not odd, and not even, that's not an error right?

    I've seen in the explanation that an parity number is added, but for some reason they add sometimes 0, and sometimes 1. They add 0 when the 1's are already odd, and a 1 as parity number if it's even, to make it odd. I'm kinda confused by this, as this will make every string odd, so there wouldn't be any errors?

    I might be thinking weird, but I can't seem to understand how this works.
    Can anyone please explain this to me?

    Many thanks!
  2. jcsd
  3. Sep 19, 2013 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    What you're missing here is that if you are using a parity bit, this extra bit is added BEFORE transmission, not afterwards.

    Afterwards, during the error checking, what this ensures is that if no single bit errors have occurred, the message (including parity bit) will have the specified parity. If it doesn't, you conclude that a bit error has occurred.

    Example, suppose you are using odd parity. Your message *including* the extra parity bit must therefore always have an odd number of ones. So, if you want to transmit a 4 bit message 1001, you'd add a fifth parity bit. In this case, it would be a 1, in order to make the parity odd. 10011. If you receive 11011, you have even parity, which tells you that a bit error has occurred. (But it doesn't tell you WHICH bit is wrong, since that would require foreknowledge of the message, in which case why would it need to be sent?).

    A single parity bit can only detect an ODD number of bit errors. If an even number of bit errors occurs, your error check will come out with the correct parity, even though the message is wrong. E.g. if 10011 becomes 01011 upon receipt (TWO bits have been flipped), your error check will tell you that you have odd parity and that the message is correct, even though it is not.
  4. Sep 19, 2013 #3
    So the parity bits are already added, this would mean that bit string: 11011, and 10001 still have an even amount of ones. This would mean that 11011 and 10001 would be the errors. However this is a single bit parity, so there needs to be an odd number of bit errors for it to be an definite error. I have 2 errors, which is even. So what would the answer be?

    11011, and 10001? But that's not definite, right?

    I think 10001 is a error, and 11011 isn't, as it should've gotten a 0 as parity bit, so it would be odd.
    So 11011 must've been 0011 originally, they then added a 1 parity bit, but it became 11011, so two bits flipped.

    Is this right? 10001 is the answer
  5. Sep 19, 2013 #4


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Yes, they have an even number of ones, and your problem specifies that each string was transmitted with odd parity.

    HUH??? This bit in bold makes no sense. I meant that you can only detect an odd number of errors in EACH bit string. If an even number of errors occurs within a given string, you will never know, because that string will come out with the correct parity.

    In this case, both of those strings had the wrong parity, which means you know FOR SURE that an odd number of bit errors occurred to each of those strings. They are both corrupted.

    Again, none of what you've said here makes any sense. How do you know that the parity bit isn't one of the ones that got corrupted? You can't reconstruct what each original 5-bit string was. All you can do is check its parity, and if its parity turns out to be wrong, then you know that that string is wrong. Both 10001 and 11011 are wrong.
  6. Sep 19, 2013 #5
    Oh I read that part completely wrong =( So odd number of errors in each bit string, not in total -.-

    In which strings have errors definitely occurred? (part of question)
    How do you know if it might have an error or definitly has an error?

    I would say 11011 and 10001 are definite errors, as the number of ones are even.
  7. Sep 19, 2013 #6


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    That's the entire point of what I've been trying to explain. If the string has the wrong parity, then it must have an error. Wouldn't you agree?

    However, just because the string has the correct parity doesn't mean errors haven't occured. It just means that the number of errors in the string is even, which is not detectable by this scheme.
  8. Sep 19, 2013 #7
    Oh many thanks! I finally understand it!
    Can you change the thread title to [closed], or is it not needed, and how can I do that?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted