Archive Cast Forum RSS Books! Poll Results About Search Fan Art Podcast More Stuff Random Support on Patreon 
New comics MonFri; reruns SatSun

1 {scene: The pirate ship Allosaurus, at sea.}
1 Long Tom: Arrr, it be good to be havin' the wind at our backs again!
2 Parrot: Awwwrk! Pieces of eight! Pieces of eight! Pieces of nine! Pieces of eight!
3 Long Tom: What be the problem with that scurvy creature?!
4 Wendy: A parroty error, cap'n.
First (1)  Previous (1469)  Next (1471)  Latest Rerun (1980) 
Latest New (4040) First 5  Previous 5  Next 5  Latest 5 Pirates theme: First  Previous  Next  Latest  First 5  Previous 5  Next 5  Latest 5 This strip's permanent URL: http://www.irregularwebcomic.net/1470.html
Annotations off: turn on
Annotations on: turn off

Pieces of eight refers to the silver coins known as Spanish dollars that circulated from the 16th to 19th centuries, and traditionally formed large parts of pirate treasure. This dollar was subdivided into eight reales, which were often physically realised by cutting a silver coin into eight more or less equal pieces. Thus "pieces of eight".
Computer programmers will need no further explanation.
For the rest of us: Parity basically means equality. In mathematical usage, it refers to the concept of things being divisible into two classes, most usually referring to the classification of whole numbers as either odd or even.
Computer science has taken this meaning and extended it to refer to the "oddness" or "evenness" of a piece of binary computer data. Binary information is stored as a sequence of individual pieces (called bits, short for "binary digits"), which come in one of two different possible values, conventionally represented by the digits 0 and 1.
For example, a piece of binary data might look like 1101000, which might represent, say, the letter h. Now looking at this sequence merely as a number, you would call it "even", since it ends in a zero. A more useful definition of parity for computing turns out to be what you get if you add together the individual bits of the data. In this case, there are three 1s, an odd number, making the parity of this bit sequence odd.
In some cases, when binary information is transmitted from computer to computer, or within a single computer (say from hard drive to processor), a bit can accidentally get "flipped", or changed from one value to the other. This is bad, because the sequence 1101010  just one bit different to our h  might represent the completely different letter j.
Notice that flipping a bit has changed the parity of our h from odd (three 1s) to even (four 1s). If it had been changing a 1 to a 0, the result would also be even (two 1s). Here's the clever part. What if we add an extra bit to the start of our piece of data, where the value of the extra bit is determined to make the overall parity of our data even?
In that case, our h would be represented by 1101000, with an extra 1 stuck on the front: 11101000. The parity is now even. How does this help?
Well, the letter j would be represented by 1101010, with an extra 0 stuck on the front, because its parity is already even: 01101010. This leaves the parity even.
Now what happens if we have the same transmission error that causes the same bit on our h to flip? We end up with 11101010. Notice two things: This is not the same as our new representation for the letter j, and, more importantly, the parity is now odd. This tells us two things: that the data we have received is definitely not a letter j, so we don't make the same mistake as before, but also, because the parity is odd and we know that the parity of all our data should be even, that an error has occurred.
Before, without the parity bit, if an error occurred, we would misinterpret our data and carry on blithely unaware. With the parity bit, we know that an error has occurred, and can do things to fix it, like send a request back to the original source of the data and ask for it to be sent again.
Clever, huh?
Some of you may be wondering: What if two bits accidentally flip? Well, in that case, our simple onebit parity check would fail. But the chances of getting a twobit error are much less than a onebit error, and that may be an acceptable level of risk. If not, then there are more complex schemes that involve adding additional parity bits according to more complex mathematical rules, which can solve that problem. But that's about all you really want to know about that. The basic principle is the same.
So a parity error is what you get when you were expecting all of your data to be even, and suddenly you get one that is unexpectedly odd.
Oddly enough, the cut up subcoins of a Spanish dollar, of value one real each, were known as bits.
I should have given this parrot more lines and made it a recurring character. Hmmmm.
[1] Pun intended, oh yes, indeedy.
LEGO^{®} is a registered trademark of the LEGO Group of companies,
which does not sponsor, authorise, or endorse this site. This material is presented in accordance with the LEGO^{®} Fair Play Guidelines. 