Skip to content
Other

Even Parity Bit Calculator

Enter a binary data word to instantly find its even parity bit and the full encoded message. Switch to Check mode to verify whether a received binary string has valid even parity, flagging any single-bit transmission error. Choose where the parity bit is inserted - at the end (most common) or at the beginning - and see every calculation step explained.

Your details

Generate: compute the parity bit to attach to your data. Check: verify a message you already received includes a valid parity bit.
Enter only 0s and 1s. In Generate mode this is the raw data before the parity bit is added. In Check mode this is the full received message including the parity bit.
Where to insert the parity bit in the encoded message. Both sender and receiver must agree on this convention.
Parity bit
0

The even parity bit value (0 or 1)

Encoded message10101100
Number of 1-bits in data4 (even)

Even parity bit is 0 - encoded message is 10101100.

  • The data word "1010110" contains 4 (even) of 1-bits.
  • A parity bit of 0 makes the total count of 1-bits across the entire encoded message even.
  • The parity bit is placed at the end (LSB side) of the message by convention.
  • Both the transmitter and receiver must agree on even parity and bit position for error detection to work.

Next stepSend the encoded message. The receiver will count all 1-bits: if the total is odd, a single-bit error has occurred and retransmission should be requested.

What is a parity bit?

A parity bit is a single extra bit added to a binary data word before it is transmitted or stored. Its only job is to make the total count of 1-bits in the combined message (data plus parity) conform to an agreed rule. With even parity that rule is: the total number of 1-bits must be even. If the data word already has an even count of 1-bits, the parity bit is set to 0, leaving the total unchanged. If the data word has an odd count, the parity bit is set to 1 to bring the total up to an even number. When the receiver counts the 1-bits in the received message, any result that is odd immediately signals that exactly one bit was corrupted. Even parity is widely used in serial communications (RS-232, UART), RAM chips with parity, and simple checksum schemes because it adds only one bit of overhead.

How to calculate the even parity bit

Step 1: write down the binary data word. Step 2: count the number of 1-bits. Step 3: if the count is already even, the parity bit is 0; if the count is odd, the parity bit is 1. In mathematical terms, the parity bit equals the count of 1-bits modulo 2. For example, the data word 1010110 has four 1-bits. Four is even, so the parity bit is 0, and the encoded message becomes 10101100 (parity appended at the end). Another way to think about it: XOR all the bits together. The XOR of all bits in the data word equals the parity bit directly, because XOR is equivalent to modulo-2 addition.

Checking a received message

The receiver applies the same rule to the entire received message, including the parity bit. If the total number of 1-bits is even, parity is intact and the message is assumed to be correct. If the total is odd, at least one bit was flipped and the receiver knows to request retransmission. Parity can only detect an odd number of errors: one flip changes the count by one (even becomes odd), but two flips change the count by two and cancel out, so the message appears valid even though two bits are wrong. This is why parity is rated as a Hamming distance 2 code. For more robust detection (and correction) use a CRC or Hamming code.

Even parity vs odd parity

Even parity targets a total 1-bit count that is even; odd parity targets a total that is odd. Neither is inherently better for error detection, both detect single-bit errors with equal reliability. The choice is a convention agreed between sender and receiver. Even parity is slightly more common in modern systems. One practical difference is that an all-zero data word (which can indicate a dead channel) gives a parity bit of 0 under even parity and a parity bit of 1 under odd parity, so odd parity ensures the encoded line is never all zeros, which can be useful for synchronisation.

Even parity bit truth table (3-bit data examples)

Data word1-bit countEven parity bitEncoded message (parity at end)
0000 (even) 0 0000
0011 (odd) 1 0011
0101 (odd) 1 0101
0112 (even) 0 0110
1001 (odd) 1 1001
1012 (even) 0 1010
1102 (even) 0 1100
1113 (odd) 1 1111

For any data word, count the 1-bits. If the count is even, the parity bit is 0; if odd, the parity bit is 1.

Frequently asked questions

What is the formula for the even parity bit?

The even parity bit P equals the XOR of all data bits: P = d1 XOR d2 XOR ... XOR dn. This is identical to computing (sum of all data bits) modulo 2. If the result is 0 the count of 1-bits is already even and the parity bit is 0; if the result is 1 the count is odd and the parity bit is 1.

Does even parity correct errors as well as detect them?

No. A simple parity bit can only detect that an error occurred, it cannot tell you which bit was flipped or correct it. For error correction you need a more sophisticated code such as a Hamming code, which uses multiple parity bits placed at strategic positions to both locate and correct a single-bit error.

What happens if two bits are flipped?

Even parity will not detect the error. Two flipped bits change the 1-bit count by two, which preserves the even or odd nature of the total. The receiver will count an even number of 1-bits and incorrectly conclude the message is valid. Parity has a Hamming distance of 2, meaning it guarantees detection of only a single-bit error.

Where should the parity bit be placed in the message?

Convention determines placement. In many serial communication protocols the parity bit follows all data bits (appended at the end, LSB side). In some Hamming-code schemes parity bits occupy specific power-of-two positions. What matters is that sender and receiver agree on the same convention. This calculator supports both appending at the end and prepending at the start.

How does even parity differ from a CRC?

A Cyclic Redundancy Check (CRC) divides the data by a generator polynomial and appends the remainder (several bits) as a check value. CRC can detect burst errors of any length up to its degree, which makes it far more reliable for noisy channels and large data blocks. Even parity uses just one extra bit and catches only single-bit errors. Parity is simpler and faster to compute; CRC is much stronger. For memory chips and low-overhead serial links, parity is often sufficient; for file transfers and networking, CRC or stronger codes are preferred.

Sources

Written by Grace Mbeki, MSc Data Scientist & Educator · Nairobi, Kenya

Turning everyday numbers into clear, actionable answers for the decisions that matter most.

Search 3,500+ calculators

Loading search…