24.4.1 Parity Bit Calculation
The parity bit is calculated by doing an exclusive-or of all the data bits. If odd parity is used, the result of the exclusive or is inverted. The relation between the parity bit and data bits is as follows:
- Peven
- Parity bit using even parity
- Podd
- Parity bit using odd parity
- dn
- Data bit n of the character
If used, the parity bit is located between the last data bit and first stop bit of a serial frame.