{{ result.output || (mode ==='check' ? result.dataBits :'') }}
- {{ app }}
ℹ️ About Parity Bit Calculator
Parity Bit is a simple error detection mechanism that adds a single bit to data to make the total number of 1s either even or odd. It's one of the most fundamental error detection techniques used in digital communications and storage.
POSIX serial-line configuration exposes parity controls such as PARENB and PARODD in
termios,
which is why parity still appears in UART, RS-232, modem, and embedded-device settings.
Parity Types:
- Even Parity: Total number of 1s (including parity bit) must be even
- Odd Parity: Total number of 1s (including parity bit) must be odd
- Mark Parity: Parity bit is always set to 1, regardless of data
- Space Parity: Parity bit is always set to 0, regardless of data
How It Works:
- Encoding: Count 1s in data and set parity bit according to chosen parity type
- Detection: Recalculate parity and compare with received parity bit
- Error Indication: Mismatch indicates single-bit error occurred
- Limitation: Cannot detect even number of bit errors
- No Correction: Parity can flag some corruption, but it cannot identify which bit changed
Applications:
- Serial communication protocols (UART, RS-232)
- Memory systems and storage devices
- Network protocols and data transmission
- Legacy computer systems and embedded devices
Calculation Methods:
- Even Parity: Parity bit = XOR of all data bits
- Odd Parity: Parity bit = NOT(XOR of all data bits)
- Mark/Space: Fixed value regardless of data content
Limitations: a single parity bit detects any odd number of flipped bits, but two flipped bits can cancel each other out. Use checksums, CRCs, Hamming codes, or stronger integrity mechanisms when you need better burst-error detection or correction.
API Usage Example:
POST /api/tools/conversion/parity-bit
Content-Type: application/json
{
"mode": "add",
"input": "1011001",
"parityType": "even"
}