One of the funniest signature lines I have seen in some
There are 10 kinds of people:
Those who understand binary and those who don't
By Joshua Erdman
Let's say I gave you a piece of paper with value of 237 written in binary: 1 1 1 0 1 0 0 1
Now while you had the paper it got severely crumpled and now here is what you can make out so far: 1 X 1 0 1 0 0 1
Now because you cannot determine the second character, you do not know the value'. This is where parity steps in.
The next paper I give you still has the value of 237 but I also told you that I will include a 9th bit that is a '1' if the first 8 bits have an odd number of 1s. It will be a '0' if the first 8 bits are an even number of 1s.
Since there are 5 '1's in the binary value of 237 the 9th bit will be a '1'. So here is what I wrote on the new piece of paper: 1 1 1 0 1 0 0 1 1
Now you receive the paper and once again you cannot read the 2nd bit.
Here is what you can see: 1 X 1 0 1 0 0 1 1
Now since we know the rule about the 9th bit we know the first 8 bits will have to be an odd number of '1's since the 9th bit is a '1'. Right now we have only 4 '1's so we know that the missing bit should be a '1' as well.
You can try it some more on any of the other 8 bits and see that it still works. And if the 9th bit is garbled that is still OK because we have all the data we need from the first 8.
Clue: Parity is not limited to 8 data bits and a parity bit either. You can work with with as few as 2 data bits and a parity bit or as many data bits as needed. However realize that if any 2 bits were garbled, the system would not work. And as you increase the total number of data bits, you are more likely to have too much data corruption for the parity bit to be useful.