Parity-Bit
A parity bit is a single extra bit added to a block of data specifically to let a receiver detect whether that data was corrupted during storage or transmission — set so that the total count of 1-bits across the data plus the parity bit itself always comes out to a predetermined, agreed-upon value, either always even or always odd depending on which convention the system uses. It's the simplest possible form of error detection a digital system can implement, costing just one extra bit per block of data, and while it can't fix a detected error or catch every possible corruption, understanding exactly what it can and can't catch is essential to understanding why more elaborate error-detection schemes exist at all. How a parity bit actually gets computed, attached, and checked looks like this:
A few things are worth knowing about exactly what a single parity bit can catch, and why its limits matter just as much as its detection ability:
A parity bit reliably detects any single-bit error in its data block, but silently misses any error that flips exactly two bits, which is a direct mathematical consequence of how the 1-bit count changes under different kinds of corruption. Flipping any single bit in the data always changes the total count of 1-bits by exactly one, switching it from even to odd or odd to even — which means the parity check, re-counting 1-bits on arrival and comparing against the agreed convention, will always catch that mismatch. But flipping exactly two bits changes the count by two, which preserves whether the total was even or odd, meaning the corrupted data passes the parity check completely undetected even though it's genuinely wrong. This isn't a flaw in a particular implementation — it's an inherent mathematical limitation of using a single parity bit, which is exactly why parity alone is considered adequate only for situations where errors are expected to be rare, isolated single-bit events, not for situations where burst errors corrupting multiple adjacent bits are a real possibility.
Parity detects an error, but it never identifies which bit was wrong, which is exactly why parity-based systems can only ask for a resend rather than correct the problem themselves on the spot. Knowing that the overall 1-bit count doesn't match the expected convention proves something in the block is wrong, but the single parity bit carries no information at all about which specific position within the data actually flipped — there's simply no way to work backward from one summary bit to one specific location among many possible data bits. This is the fundamental reason systems relying on simple parity, like older serial communication protocols, respond to a detected parity error by requesting retransmission of the entire block rather than attempting any kind of automatic correction, and it's exactly the gap that more elaborate error-correcting codes, using multiple parity-like bits arranged so their pattern of failures pinpoints the exact error location, are specifically built to close.
Parity RAM, memory that stores one extra parity bit alongside every byte of actual data, was the dominant memory error-checking approach in early computing specifically because it could flag that a memory error had occurred using minimal extra storage, even though it couldn't say which bit failed or fix the problem automatically. Older computer systems commonly used 9-bit-wide memory modules, eight bits of actual data plus one parity bit, so that any single-bit memory corruption — caused by electrical noise, a cosmic ray strike, or a genuinely failing memory cell — would be flagged by a parity mismatch on the next read, typically triggering a system halt or an error report rather than letting corrupted data silently propagate through to whatever program was using it. This represented a meaningful safety improvement over having no error checking at all, but as memory capacity and the resulting total error rate grew across larger and larger systems, the inability to actually correct detected errors, not just flag them, became a real practical limitation.
Error-correcting code memory, universally known as ECC memory, solves exactly the limitation plain parity can't — not just detecting that an error occurred, but actually identifying and automatically correcting it — by using multiple parity-like check bits computed across carefully overlapping subsets of the data rather than one simple parity bit covering everything equally. Where plain parity gives a single yes-or-no answer about whether the overall count matches, ECC schemes like Hamming codes compute several parity bits, each one covering a different, carefully chosen and deliberately overlapping subset of the data bits, so that the specific combination of which checks pass and which fail uniquely pinpoints exactly which single bit was wrong — once identified, correcting a single flipped bit is simply a matter of flipping it back. This is exactly why server and data-center memory almost universally uses ECC rather than plain parity or no checking at all — at the scale of a data center running continuously, memory errors from cosmic rays and electrical noise are a statistical certainty over time, not a rare edge case, and silently corrupted data in that environment is a far more expensive problem than the modest extra memory cost ECC requires.
Read a parity bit as the simplest possible error signal, not an error-fixing mechanism: it reliably catches any single-bit corruption by tracking whether a 1-bit count matches an agreed convention, it mathematically cannot catch certain patterns like two simultaneous bit flips, and it can never say which bit was wrong — limitations that plain parity accepts as an acceptable, low-cost tradeoff for simple applications, and that more elaborate schemes like ECC memory exist specifically to overcome wherever a system genuinely can't tolerate silent, uncorrected data corruption.