The parity bit calculator above adds one bit to a word so that the number of ones comes out even or odd, and checks a received word against the same rule. It handles the four schemes a serial port offers, both check bit positions, and text input where each character gets its own parity bit.
This is a teaching tool and Arb Digital says so on the page. A parity bit is the smallest possible piece of error control, which makes it the clearest thing to learn first and one of the weakest things to rely on. It notices that something has gone wrong, sometimes, and it can never tell you what or fix it. Understanding exactly where that boundary sits is the point of this page.
What This Parity Bit Calculator Does
In compute mode it counts the ones in your data word and emits the bit that makes the total match the chosen scheme. Under even parity the check bit is 1 when the data contains an odd number of ones, and 0 otherwise. Under odd parity it is the opposite. Mark and space parity ignore the data entirely and send a constant 1 or 0, which sounds pointless and has a real purpose covered below.
In verify mode it takes the whole received word, separates the check bit from the position you specify, recomputes what the check bit should be, and reports whether the two agree. A disagreement means an odd number of bits flipped somewhere in the word, and that is the entire content of the result: not which bit, not how many, only that the count of flips was odd.
Text mode encodes your input as UTF-8 and computes a parity bit per byte, which is what an asynchronous serial link actually does. It is included because people frequently expect one parity bit to protect a whole message, and seeing a bit per character makes the real granularity obvious.
How to Use It
- Pick compute or verify. Compute treats every bit as data; verify reserves one of them as the check bit, so the same input means different things in the two modes.
- Choose the scheme before typing. Even and odd give opposite check bits for the same data, and a mismatch between sender and receiver looks exactly like a link fault.
- Set the check bit position. Appended is the usual convention in written examples; a serial frame sends the parity bit after the data bits and before the stop bit.
- Use text mode for a realistic picture. One parity bit per character is what a real link transmits, and it is far weaker over a long message than a single bit over a short word.
- Try flipping two bits. The check still passes, which is the most useful thing this tool can demonstrate.
The Formula: How the Parity Bit Is Derived
The parity bit is the exclusive-or of all the data bits. Exclusive-or over a set of bits returns 1 when an odd number of them are 1, which is precisely the definition of odd population count, so for even parity the check bit is that exclusive-or directly and for odd parity it is the complement.
Work the default. The data word is 1011001, which contains four ones, an even number. Under even parity the total must stay even, so the check bit is 0 and the transmitted word is 10110010. Under odd parity the total must become odd, so the check bit is 1 and the word is 10110011. Either way the word is eight bits long: seven of data and one of check, a code rate of 0.875.
Now flip one bit of 10110010, say the third, giving 10010010. The ones count is now three, which is odd, so an even parity check fails and the error is detected. Flip a second bit as well, giving 10000010 with two ones, and the count is even again: the check passes and the corruption goes unnoticed. That is the whole strength and the whole weakness of one check bit, and the second preset above sets it up so you can watch it happen.
Where Parity Is Actually Used
Asynchronous serial links are the classic home. A UART frame is a start bit, five to nine data bits, an optional parity bit and one or two stop bits, which is what a configuration string like 8E1 describes: eight data bits, even parity, one stop bit. The widely used 8N1 has no parity at all, which is an honest acknowledgement that on a short reliable cable the bit buys little. Industrial protocols running over long RS-485 runs are more likely to keep it.
Parity also protected early computer memory, where a ninth bit per byte flagged a corrupted word and triggered a machine halt rather than letting bad data propagate. That role has been taken over by error-correcting memory, which uses a single-error-correcting double-error-detecting code derived from the Hamming construction and repairs single flips instead of merely reporting them. The Hamming code calculator shows how that extra capability is bought with a handful of extra bits.
The transition from parity to real coding is standard undergraduate material; the readings for MIT OpenCourseWare 6.02, Introduction to EECS II: Digital Communication Systems, move from coping with bit errors straight into linear block codes and syndrome decoding, which is the natural next step once you have seen what one bit cannot do.
Mark and Space Parity Are Not Useless
Sending a constant 1 or 0 in the parity position detects nothing at all, which makes them look like a joke setting. They exist because the parity position is a ninth bit in the frame, and a ninth bit is useful for things other than error detection.
Multi-drop addressing is the main one. On a bus where one master talks to many slaves, the ninth bit can mark a byte as an address rather than data: the master sends addresses with mark parity and data with space parity, and slaves ignore everything until they see their own address. Some protocols also used it as a crude out-of-band flag for framing or for a second channel.
The practical consequence is that if a device datasheet specifies mark or space parity, it is almost certainly not asking for error detection and you should look for what it is using the ninth bit to signal. Configuring it as even or odd because that seems more correct will break the protocol.
Three Neighbouring Tools, Three Different Jobs
The boundaries in one sentence each. This page adds a single check bit, which detects an odd number of flips and corrects nothing. The Hamming code calculator adds several check bits arranged so their failure pattern spells out the position of a flipped bit, which lets it repair one error. The Hamming distance calculator measures how many positions two words differ in, which is the property that decides what any code can do.
In those terms a parity bit is a code with minimum distance two. Every valid word is at least two flips away from every other valid word, which is enough to notice one error and never enough to identify it. Distance three allows correction of one error, and that is exactly the step from this page to the Hamming code. For detection strength far beyond either, the checksum comparator uses cryptographic digests, and the contrast in RFC 1071, Computing the Internet Checksum, is instructive too: a whole-packet checksum built for cheap incremental updates rather than for maximum detection.
Arb Digital builds free tools like this one because useful pages earn attention. If you want tools, calculators or content built for your own audience, we can help.
Browse All Free Tools Talk to Arb DigitalCommon Mistakes to Avoid
- Expecting parity to correct anything — it reports that a word is wrong and gives no information at all about which bit.
- Assuming a passing check means clean data — any even number of flips cancels out and passes silently.
- Mismatching even and odd between the two ends — every single frame fails, which looks like a broken cable rather than a configuration error.
- Thinking one parity bit covers a whole message — a serial link sends one per character, so a long message has no message-wide protection at all.
- Configuring mark or space parity as error detection — those send a constant bit and detect nothing; they are almost always carrying a protocol flag.
Related Free Tools From Arb Digital
For error control that can actually repair a bit, see the Hamming code calculator, and for the measure underneath it the Hamming distance calculator. Turn characters into bits first with the text to binary converter or back again with the binary to text converter. The bitwise calculator performs the exclusive-or that defines parity, the ASCII table lists the character codes that serial links carry, and the baud rate calculator covers how long a framed character takes on the wire. The checksum comparator handles stronger detection, and the free online tools hub has the rest.
Frequently Asked Questions
An odd number of flipped bits in the word it covers. One flip, three flips or five flips all change the count of ones from even to odd or the reverse, and the check fails. Any even number of flips leaves the count unchanged and passes.
No, and it never can. The check produces a single bit of information, pass or fail, which is not enough to identify a position among several. Correction needs enough redundancy to point at the faulty bit, which is what a Hamming code provides and a single parity bit cannot.
Even parity makes the total number of ones, data plus check bit, come out even. Odd parity makes it come out odd. They are equally strong; the only practical difference is that odd parity means an all-zero word is never valid, so a link stuck at zero is caught.
They send a constant 1 or 0 in the parity position and detect nothing. They exist because that ninth bit is useful as a protocol flag, most often to distinguish address bytes from data bytes on a multi-drop bus.
Not on a serial link. There, each character carries its own parity bit, so protection is per character rather than per message. A long transfer has no message-wide check unless the protocol adds one, which is what a CRC at the end of a frame is for.
Eight data bits, even parity and one stop bit, which is a common serial port configuration. The widely used 8N1 has no parity bit at all, on the reasonable grounds that on a short reliable cable a single check bit adds very little.
Because detecting an error and halting is much less useful than correcting it and continuing. Error-correcting memory uses a code derived from the Hamming construction that repairs a single flipped bit and detects a double one, for a handful of extra bits per word rather than one.
This page adds one check bit that only reports whether something is wrong. The Hamming code calculator adds several, arranged so that the pattern of failed checks spells out the position of the flipped bit, which is what makes repair possible.