Advertisement

Parity bit calculator

Generate or check odd and even parity at any position in a binary message, with the parity bit and decoded payload shown separately.

Calculator

Parity bit
1.000000
Encoded or received message
11011
Payload without parity
1011
Parity check
Generated

Advertisement

How this calculator works

Even parity makes the total count of one bits even; odd parity makes it odd. Insert the extra bit at the chosen position. Checking counts all received bits and compares the parity with the chosen convention. A match means no parity error was found, not that every bit is correct.

Formula

Even parity bit = count(payload ones) modulo 2. Odd parity bit = 1 XOR even parity bit.

Worked example

1011 contains three one bits. Even parity adds 1, giving 11011 when placed first. Odd parity adds 0, giving 01011.

Advertisement

Frequently asked questions

Can parity correct a bad bit?

No. A single parity bit can detect an odd number of flips but does not locate them.

What does position mean?

Position 1 is the leftmost bit. In generation mode, length plus one appends parity at the end.

Does matching parity prove the data is intact?

No. Any even number of flipped bits preserves parity.

Sources

Advertisement