skip to content

Noisy Transmission

Getting bits across a link that corrupts them: bit-flip and erasure models, capacity as the reliable-rate ceiling, then detection with checksums and repair with block codes. Core reliability ground.

part ofComputer science fundamentalsoverview, primer and where to startread it →
on this pageshow

questions

page 1 of 2

A single parity bit is appended to each data word: which corruptions does a parity recheck catch, and which slip through?

level: juniorimportance: must knowfreq 62%

answer

  1. one extra bit, whole-codeword check
  2. counts ones, ignores arrangement
  3. odd counts flip it
  4. even flips cancel silently
  5. no position, no repair

basics

~20 s

A parity recheck catches every odd number of flipped bits in the codeword and misses every even number. It cannot say which bit flipped, cannot repair anything, and is blind to bits that were reordered rather than flipped.

solid answer

~40 s

The sender sets one extra bit so the number of `1` bits in the whole codeword has an agreed parity; the receiver recounts and compares that parity. Flipping a bit changes the one-count by one and so flips its parity, and flipping a second bit flips it back. The rule is therefore exact, not probabilistic: any odd number of flips — including a flip of the parity bit itself — is always detected, and any even number is always missed. Parity also depends only on how many bits are one, not where they are, so a permutation of the bits passes untouched. The result is one bit of information, pass or fail, which is far too little to name a position, so nothing can be repaired from it.

go deeper

for a junior

Recall the exact rule: odd numbers of flipped bits are caught, even numbers are missed, and nothing is repaired. Being able to say 'it detects single-bit errors but not double-bit errors' already clears the first screen.

for a middle

Explain why the rule holds — each flip changes the one-count by one, so two flips restore the parity — and add the blind spot most people miss: a permutation of the bits preserves the count and passes.

for a senior

Show judgement about when one bit of overhead is the right purchase: single-flip-dominated faults yes, bursty noise no. Note that the odd convention rejects an all-zero codeword, which catches a dead sender.

for a principal

Frame it as a cost boundary. One check bit buys a pass/fail verdict and nothing else, so recovery must live in the surrounding system; widening the check is a deliberate trade of bits for localisation and repair.

## The construction A **parity bit** is a single extra bit carried alongside a group of data bits — a byte on a bus, a word in a register file, a character on a serial line. The sender counts the `1` bits in the data and sets the extra bit so that the number of `1` bits across the whole codeword, data plus parity, is even. That convention is **even parity**; **odd parity** is the same rule with the total forced odd. Equivalently, the parity bit is the XOR of all the data bits under even parity, or its complement under odd parity. The field costs one bit no matter how wide the data is. That is why it survives on buses, memory lanes and slow links where a wider check would cost real money: it is the cheapest integrity field that exists. ## What the recheck actually tests The receiver does not compare the parity bit against a stored copy — it recomputes. It counts the `1` bits in everything it received, the parity bit included, and asks whether that count has the agreed parity. Exactly two outcomes exist: the parity holds, or it does not. Flipping any one bit changes the one-count by exactly one, which flips the count's parity. Flipping a second bit flips it back. The detection rule falls straight out of that arithmetic: - an **odd** number of flipped bits anywhere in the codeword — one, three, five, and including a flip of the parity bit itself — always changes the parity, and is always caught; - an **even** number of flipped bits always restores the parity, and is always missed. Neither statement carries a probability. A two-bit error is not usually missed; it is missed every time. ## The blind spots | What happened to the codeword | Parity recheck | |---|---| | one data bit flipped | detected | | the parity bit itself flipped | detected | | three bits flipped | detected | | any two bits flipped | missed | | a burst flipping four adjacent bits | missed | | the bits permuted, none flipped | missed | | the word replaced by a different word of the same parity | missed | The last two rows are the ones candidates rarely reach. Parity is a function of **how many** bits are one, never of **where** they are, so a corruption that rearranges bits without flipping any of them — two swapped lanes on a parallel bus, a rotation, a pair of units delivered in the wrong order — leaves the count identical and passes. And since half of all words carry any given parity, a corruption that substitutes a whole unrelated word slips through roughly half the time. ## Detection only, and why one bit can never be more A parity result carries exactly one bit of information: pass or fail. One bit distinguishes two states, so it can never point at one of eight positions, and with no position there is nothing to repair. Naming the flipped position needs enough check bits to address every position plus the no-error case, which is a different and more expensive family of codes. A single parity bit sits deliberately on the cheap side of that trade. That is why a detection-only check pushes recovery out of the code and into the system around it. The response to a failed parity is to discard the unit and obtain it again, never to fix it in place. ## Where one bit is still the right choice - Where the dominant fault genuinely is a single flip — an isolated cell upset, one noisy lane — the two-flip case is a second-order term, and one bit of overhead buys most of the available value. - Under **odd** parity an all-zero codeword is illegal, so a dead transmitter or a line stuck low is rejected rather than accepted as a legitimate zero word. Under even parity all zeros is a perfectly valid codeword. That operational difference, not detection strength, is the honest reason to prefer one convention over the other. - Where flips are independent with probability p per bit, the missed cases start at the two-flip term, which grows with p squared. That is tolerable when p is genuinely tiny and useless when noise arrives in bursts, because a burst delivers an even number of flips about half the time. ## In the interview The answer that scores states the rule and its boundary in one breath: odd flip counts always caught, even flip counts always missed, no localisation, no repair, and blind to rearrangement. Saying 'parity detects errors' and stopping describes a claim rather than a mechanism, and claiming that a parity bit can correct the flip it found confuses it with a code carrying enough redundancy to name a position.

  • Does choosing odd parity rather than even parity change what gets detected?
    No. Both detect exactly the odd flip counts and miss exactly the even ones; the convention only fixes the value of the extra bit. Odd parity has one operational advantage: an all-zero codeword becomes illegal, so a dead sender or a line stuck low is rejected instead of being accepted as a legitimate zero word.
  • Why does a parity check pass when a byte's bits are permuted but none are flipped?
    Parity is computed from how many bits are one, not from where they sit. Every permutation preserves that count, so the recomputed parity still matches. Corruptions that rearrange rather than flip — two swapped lanes on a parallel bus, for instance — are invisible to the check.
  • Why can a single parity bit never point at the corrupted position?
    Its result is one bit wide: pass or fail. One bit separates two states, and naming which of eight positions changed needs at least three. Localisation, and the repair that depends on it, therefore requires extra check bits and belongs to a different family of codes.

saying these in an interview costs you the question

  • Claims a parity bit detects any two-bit error
  • Says the parity bit identifies which position flipped
  • Believes parity can correct the error it detects
  • Says odd parity detects strictly more errors than even parity
  • Assumes shuffling a byte's bit order will fail a parity check
  • Treats a passing parity check as proof the byte is intact
open as a page

A noisy link has a channel capacity of 0.53 bits per channel use - what does that number promise and what does it forbid?

level: middleimportance: must knowfreq 60%

basics

~20 s

Channel capacity is a reliable-rate ceiling. Any code carrying fewer than 0.53 data bits per channel use can be made as close to error-free as you like by using long enough blocks; no code above that rate can, however much redundancy it adds.

open as a page

On a binary symmetric channel with crossover probability p, what does p predict about a thousand-bit block over a radio link?

level: middleimportance: must knowfreq 62%

basics

~20 s

A binary symmetric channel flips each transmitted bit independently with probability p, and the receiver cannot see which bits changed. With p = 0.001 a thousand-bit block averages one flip, yet only about 37 percent of blocks arrive clean.

open as a page

In a binary erasure channel the receiver sees which positions vanished; why is that cheaper to repair than a flip?

level: middleimportance: must knowfreq 56%

basics

~20 s

Repair has two halves: finding the damaged position and fixing its value. An erasure hands you the position for free, so only the value must be recovered, which takes roughly half the redundancy a silent flip of unknown location needs.

open as a page

Which corruptions slip past a one's-complement additive checksum on a configuration blob pushed over a serial link?

level: middleimportance: must knowfreq 54%

basics

~20 s

An additive sum is unchanged by reordering whole words, by inserting or deleting a word that adds nothing, and by two changes that cancel each other. Any change confined to a single word is caught, which is what makes the holes structural rather than random.

open as a page

In a cyclic redundancy check, what is divided by what, and in which arithmetic?

level: middleimportance: must knowfreq 60%

basics

~20 s

A CRC reads the frame's bits as the coefficients of a polynomial, shifts it left by the generator's degree r, and divides by a fixed generator polynomial in GF(2) arithmetic, where addition is XOR and nothing carries. The r-bit remainder is the check field.

open as a page

A block code's minimum Hamming distance is 3 - how many flipped bits can it correct, and how many can it merely detect?

level: middleimportance: must knowfreq 62%

basics

~20 s

Minimum distance 3 corrects one flipped bit or detects two, but not both at once. Correcting t flips needs distance at least 2t+1; detecting e flips needs only e+1. Correction costs about twice the distance detection does.

open as a page

In a seven-bit codeword carrying four data bits, how do the three parity-check bits tell a decoder which bit flipped?

level: middleimportance: must knowfreq 55%

basics

~20 s

Each check covers a fixed subset of positions, chosen so the three recomputed checks read as a binary number equal the index of the flipped bit. That number is the syndrome; zero means no single flip was seen.

open as a page

In a Reed-Solomon codeword, why does knowing which symbols are missing double how many can be repaired?

level: middleimportance: must knowfreq 57%

basics

~20 s

An unknown-position error hides two things, where it is and what it should be, so it consumes two parity symbols. A known-position loss hides only the value, so it consumes one. With n minus k parity symbols the code repairs that many erasures but only half as many errors.

open as a page

A device appends a 32-bit CRC to each frame on a bus; why does a matching check field not prove the frame was unaltered?

level: seniorimportance: must knowfreq 64%

basics

~20 s

A CRC is keyless and public, so anyone who edits the payload simply recomputes the field. Worse, it is linear: an attacker who knows only which bit positions they flipped can patch the check field without seeing the payload at all. It detects noise, not intent.

open as a page

Erasure coding a blob as ten data plus four parity fragments instead of keeping three replicas — what does that change about storage cost and fault tolerance?

level: seniorimportance: must knowfreq 60%

basics

~20 s

Overhead falls from three times the blob to about 1.4 times, and tolerated simultaneous losses rise from two copies to any four fragments. The price is paid on the read and repair paths, and only if placement keeps the fourteen fragments genuinely independent.

open as a page

How do you turn a channel capacity of 0.53 bits per use into a usable payload rate for a downlink?

level: middleimportance: should knowfreq 46%

basics

~20 s

Multiply capacity by the number of channel uses per second to get the reliable bits-per-second ceiling, then pick a code rate k/n strictly under 0.53. Payload throughput is that rate times the symbol rate, with margin left for a worse-than-modelled channel.

open as a page

Why does a Fletcher-style checksum keep a second running sum, and which blind spot of a plain additive sum does that close?

level: middleimportance: should knowfreq 37%

basics

~20 s

A Fletcher-style checksum accumulates a second sum over the running first sum, which weights each word by its distance from the end. That makes the check order-sensitive and closes a plain additive sum's blindness to reordered words, at two additions per word.

open as a page

For a CRC whose generator polynomial has degree r, which corruption patterns on a frame are guaranteed to be detected?

level: middleimportance: should knowfreq 50%

basics

~20 s

A corrupt frame escapes only when the generator divides the error pattern exactly. That yields hard guarantees: every single flipped bit, every burst of length at most r, and every odd number of flipped bits when the generator has (x + 1) as a factor.

open as a page

Why does a Reed-Solomon code correct whole multi-bit symbols over a finite field rather than individual bits?

level: middleimportance: should knowfreq 44%

basics

~20 s

Reed-Solomon treats each m-bit group as one symbol in a finite field, so contiguous damage that mangles many adjacent bits still costs one symbol. Exact field arithmetic is what lets any k of n symbols rebuild the rest.

open as a page

A bandwidth-starved downlink buys less and less rate for each extra watt of transmit power - why?

level: seniorimportance: should knowfreq 42%

basics

~20 s

Capacity grows with the logarithm of the signal-to-noise power ratio, so each doubling of power adds only about one more bit per second per hertz. Bandwidth sits outside the logarithm as a multiplier, which is why a starved link is starved.

open as a page

Why is a channel's capacity defined as a maximum over input distributions rather than fixed by the noise alone?

level: seniorimportance: should knowfreq 38%

basics

~20 s

Noise fixes only how outputs follow from inputs. How much information actually gets through also depends on how the sender drives the input, so capacity is the best achievable over all input distributions - the maximum mutual information per channel use.

open as a page

A radio link measures a 0.1 percent bit error rate, yet whole blocks fail far more often than an independent-flip model predicts; why?

level: seniorimportance: should knowfreq 44%

basics

~20 s

The average rate is right but the memoryless assumption is wrong. Fading concentrates errors into bursts, so most blocks arrive perfectly clean while the few blocks a burst touches carry far more errors than any fixed repair budget covers.

open as a page

A gateway drops whole frames while the radio hop flips bits; how do you model a link carrying both kinds of damage?

level: seniorimportance: should knowfreq 37%

basics

~20 s

Model the two layers separately: bit flips within frames that arrive, and whole-frame loss as a burst erasure of every symbol in that frame at once. A dropped frame is only an erasure if something marks the gap; otherwise the stream silently shortens.

open as a page

A trailing check field fails on a received configuration blob: what can the receiver do about it, and what can it not?

level: seniorimportance: should knowfreq 45%

basics

~20 s

A failed check proves only that the covered bytes differ from what the sender summed. It names no position, quantifies no damage, repairs nothing, and leaves exactly one recovery path: discard the whole covered unit and obtain it again.

open as a page

Why does adding one overall parity bit to a distance-3 code let a memory controller correct one flip and detect two?

level: seniorimportance: should knowfreq 41%

basics

~20 s

The extra bit covers every position, so it fails on an odd number of flips and passes on an even one. That raises the minimum distance from 3 to 4 and lets the decoder separate one flip from two instead of miscorrecting the pair.

open as a page

Rebuilding one lost fragment of a ten-of-fourteen erasure-coded blob costs far more than replacing a lost replica — why?

level: seniorimportance: should knowfreq 43%

basics

~20 s

Nothing on disk equals the missing fragment, so it must be recomputed: the repair reads ten surviving fragments, a whole blob's worth of traffic, to restore a tenth of a blob. Replication restores a lost copy by copying one copy.

open as a page

How would you decide the width and generator polynomial for the frame check on a new long-lived industrial bus?

level: principalimportance: should knowfreq 34%

basics

~20 s

Work backwards from a failure budget: frame rate times corrupted fraction times the residual must sit under the tolerable rate of undetected frames. That sets the width; the link's noise structure and the maximum frame length then pick a published, characterised generator.

open as a page

A memory array corrects single-bit flips per word, but flips accumulate over months - how do you keep stored words recoverable?

level: principalimportance: should knowfreq 34%

basics

~20 s

Repair is only applied when a word is read, so rarely touched words accumulate flips until two share one word and correction fails. A background scrub that reads and rewrites every word on a fixed period bounds that accumulation window, and the corrected-error counts it produces drive retirement decisions.

open as a page

How do you size k and n in an erasure-coded object store to balance durability, storage cost and repair load?

level: principalimportance: should knowfreq 33%

basics

~20 s

Set n minus k from the correlated failures placement can actually isolate, then pick k as wide as the repair and read fan-out can absorb, since overhead falls as k rises but repair reads k fragments. Rebuild speed matters as much as the parity count.

open as a page

Why does a single-error-correcting block code cost proportionally fewer check bits as the protected word grows wider?

level: middleimportance: nice to knowfreq 26%

basics

~20 s

Check bits name a position rather than guard a bit, and r checks can name 2^r minus 1 positions. Positions grow exponentially with checks, so the check count grows only logarithmically with word width and the percentage overhead falls.

open as a page

Why are Reed-Solomon symbols interleaved across several codewords when damage arrives as long contiguous runs?

level: middleimportance: nice to knowfreq 27%

basics

~20 s

Interleaving spreads one codeword's symbols far apart, so a contiguous run of damage is shared out across many codewords instead of destroying one. Each codeword then takes a few damaged symbols that fit inside its own repair budget.

open as a page

What does the claim that a 16-bit check field misses only one bad block in 65,536 actually assume?

level: seniorimportance: nice to knowfreq 29%

basics

~20 s

The 2^-k figure assumes corruption drives the recomputed check to a value independent of and uniform over the correct one. Structured errors — reordered words, cancelling pairs, faults outside the covered span — break that assumption and pass every time, not one time in 65,536.

open as a page

What does widening a frame's CRC from 16 to 32 bits actually buy, and what does it leave untouched?

level: seniorimportance: nice to knowfreq 30%

basics

~20 s

It buys exactly two things: guaranteed detection of bursts up to 32 bits instead of 16, and a residual escape rate for unstructured corruption falling from about 1 in 65,536 to about 1 in 4.3 billion. It fixes nothing outside the covered bytes.

open as a page

Approaching a link's capacity needs long code blocks - how do you weigh that against a latency budget?

level: principalimportance: nice to knowfreq 27%

basics

~20 s

The reliability guarantee is asymptotic in block length, so rates near capacity need long blocks a decoder must receive in full before it emits anything. Buying latency back means operating further below capacity and paying in throughput instead.

open as a page

showing 1–30 of 31