Even Parity Bit Calculator

Count the 1-bits in a binary data word, then compute the parity bit that keeps the total number of ones even — the simplest error-detection code used in digital communication and memory.

Quick Facts

Formula
Parity bit = (number of 1-bits) mod 2
Equivalently, XOR every bit together — the result is the even-parity bit for the whole word.

Your Results

Calculated
Even parity bit
-
Bit value (0 or 1)
Ones in data
-
Count of 1-bits / word length
Full codeword
-
Data bits plus parity bit
Odd parity bit
-
For reference (opposite scheme)

Ready

Enter a binary data word and press Calculate.

Understanding the Even Parity Bit

A parity bit is the simplest error-detecting code used in digital systems: one extra bit added to a binary word so that a receiver can tell, after transmission or storage, whether a single bit was corrupted. With even parity, the parity bit is chosen so that the total number of 1-bits in the data plus the parity bit is always an even number. If the data already has an even number of ones, the parity bit is 0; if it has an odd number of ones, the parity bit is 1 — because adding that extra 1 brings the total back to even.

The formula

For a data word with bits b1, b2, …, bn, the even parity bit P is:

  • P = (number of 1-bits in the data) mod 2
  • Equivalently, P = b1 XOR b2 XOR … XOR bn — XORing every bit together produces 1 exactly when the count of ones is odd, which is the same test.

The resulting codeword (data bits plus parity bit, in whichever order the protocol specifies) always contains an even number of 1s. That single invariant is what lets a receiver check the data.

Worked examples

  • Data 1011001 has four 1-bits — already even — so the parity bit is 0. Appended, the codeword is 10110010, still four ones.
  • Data 1101 has three 1-bits — odd — so the parity bit is 1. Appended, the codeword is 11011, now four ones (even).
  • Data 0000000 has zero 1-bits — even (zero counts as even) — so the parity bit is 0.

How the check works on the receiving end

When a codeword arrives, the receiver counts the 1-bits across the whole word, including the parity bit. If that count is even, the word passes the parity check — no single-bit error was detected. If the count comes out odd, exactly one bit (or any odd number of bits) must have flipped in transit, and the receiver flags the word as corrupted. This is why even parity is described as an error-detecting, not error-correcting, code: it tells you something is wrong but not which bit to fix.

Limits of a single parity bit

A lone parity bit only catches errors that flip an odd number of bits. If exactly two bits flip at the same time, the ones count changes by an even number and the parity check still passes — the error slips through undetected. This is why real systems that need to catch more error patterns use two-dimensional parity, Hamming codes (which add enough parity bits to also locate the flipped bit), or checksums like CRC-32.

Frequently Asked Questions

What is even parity and how is the parity bit calculated?
Even parity means the total number of 1-bits in a data word plus its parity bit is always an even number. To find the parity bit, count the 1-bits in the data: if that count is odd, the parity bit is 1 (bringing the total to even); if the count is already even, the parity bit is 0. This is the same result you get by XORing every bit in the word together.
Does it matter whether the parity bit is placed before or after the data?
No, the parity value itself is identical either way — only its position in the transmitted codeword changes. Appending it after the data is common in protocols like RS-232 serial framing, while some memory and storage systems prepend it. Sender and receiver just need to agree on the position in advance.
Can even parity catch every transmission error?
No. A single flipped bit always changes whether the ones count is even or odd, so parity reliably catches it. But two bits flipping at once cancel out and restore the original parity, so the error goes undetected, and parity never identifies which bit is wrong. Stronger schemes like Hamming codes or CRC checksums are used when that matters.
What is the difference between even parity and odd parity?
Even parity requires the total number of 1-bits, including the parity bit, to be even; odd parity requires that total to be odd. For the same data word, the even-parity bit and the odd-parity bit are always opposite values. Both catch the same single-bit errors — the choice between them is simply a convention the sender and receiver agree on beforehand.