How to use the Odd parity Calculator tool
- Enter the data bits in the Binary digits box, for example 01001101.
- Select Convert, or select Example to generate the bit for the sample word.
- Read the parity bit, 0 or 1, in the Result box.
- Attach that bit to your data where your protocol expects it, then select Clear to check another word.
How odd parity is calculated
Count the 1 bits in the data. If the count is already odd, the parity bit is 0 and leaves it odd. If the count is even, including a count of zero, the parity bit is 1 and tips the total to odd. In formula form the bit is 1 minus the count modulo 2, which is the inverse of the XOR of all the data bits.
The tool outputs only that one bit. It does not append it to your word, because the position of the parity bit is a protocol decision.
Worked example with 01001101
The sample word 01001101 has 1s at four positions, an even count. The odd parity bit is therefore 1. Data plus parity now holds five 1s. A word with an odd count, such as 1000011 with three 1s, gets a parity bit of 0.
01001101 → 1 (four 1s, the bit makes five)
1000011 → 0 (three 1s already)
00000000 → 1 (no 1s, the bit makes one)Why protocols choose odd parity
A parity bit lets a receiver detect any single flipped bit, and more generally any odd number of flipped bits, by recounting the 1s. Odd parity has one extra property: a valid frame can never be all zeros. A broken or disconnected line that reads as constant 0 is therefore caught as an error, which even parity would accept.
Odd parity is the scheme used by the PS/2 keyboard and mouse protocol and by the parallel SCSI bus, and it is one of the selectable modes on a UART, where a setting such as 8O1 means eight data bits, odd parity and one stop bit. On x86 processors the parity flag is set when the low byte of a result has an even number of 1s, so the flag equals the odd parity bit of that byte.
Input format and limits
Paste the data bits only. If you include an existing parity bit, the tool counts it like any other digit.
- Only 0 and 1 are valid digits. Spaces, tabs and line breaks are removed before counting.
- A leading 0b prefix is ignored.
- The word may be 1 to 65,536 bits long.
- Empty input or any other character returns Enter between 1 and 65,536 binary digits.
Frequently asked questions
What is the odd parity bit for 1011001?
The word has four 1s, which is even, so the odd parity bit is 1. With the bit attached the frame has five 1s.
What is the difference between odd and even parity?
They are opposites. An even parity bit makes the total count of 1s even, and an odd parity bit makes it odd. For the same data the two bits always differ. The Even parity Calculator on this site returns the other one.
Where do I put the parity bit?
That depends on the protocol. A UART sends it after the data bits and before the stop bit. Memory systems store it as an extra bit beside each byte. The calculator gives you the value and leaves placement to you.
Can a parity bit correct errors?
No. Parity only tells you that an odd number of bits changed. It cannot say which bit is wrong, and two flipped bits cancel out and pass unnoticed. Error correction needs more check bits, as in Hamming codes.
What is the odd parity bit of all zeros?
It is 1. Zero is an even count, so the bit must be 1 to make the total odd. This is the property that lets odd parity detect a line stuck at 0.
How do I check a frame that already includes its parity bit?
Paste the whole frame, data and parity together. A valid odd parity frame has an odd number of 1s, so this generator returns 0 for it. A result of 1 means the frame fails the check.