4.1.15 · D5Memory Technologies
Question bank — ECC and memory error correction
The three ideas everything below tests: distance decides power, the syndrome is an address (not a data index), and detection ≠ correction.
The four symbols this whole page leans on
Before the traps, pin down the letters — every trap below reuses them.
Now the traps.
True or false — justify
Adding more parity bits () always increases how many errors you can correct.
False. Correction power comes from (the narrowest gap between legal words), not the raw count of extra bits — badly placed parity can leave , which only detects. Placement (powers of two) is what buys distance.
A single Parity Bit can tell you which bit flipped.
False. One parity bit has : it only announces that an odd number of flips happened, with no location information. Locating needs a structured set of checks.
SECDED can correct any two-bit error.
False. With it corrects error and only detects two. "Double Error" in the name refers to detection, not correction.
If the syndrome is zero, the word is guaranteed correct.
False in general. Zero syndrome means "no detectable error"; a triple flip (or any error matching a codeword-to-codeword distance) can produce a zero syndrome and slip through silently.
A code with can never both correct one error and detect two.
False — this is a subtlety. By the raw numbers a code detects up to and corrects . What you cannot do is guarantee both roles on the same received word: a 2-flip may fall inside a wrong dot's bubble and get silently mis-corrected. Only (SECDED) leaves a clean no-man's-land so the decoder can signal "double" instead of mis-correcting.
Two bit flips always leave the overall parity bit unchanged.
True. Each flip toggles overall parity once; two toggles cancel, so total parity returns to its original (correct) value — which is exactly how SECDED spots a double error (nonzero Hamming syndrome but correct overall parity).
ECC eliminates the need to ever reboot a server for memory faults.
False. ECC corrects/detects soft errors (see Cosmic Rays and Soft Errors); a physically dead cell or a persistent hard fault will keep re-erroring and eventually needs hardware action. ECC buys reliability, not immortality.
Hamming(7,4) and a plain parity byte both "protect" data equally.
False. Hamming locates and fixes one flip; a parity bit merely raises a flag. Same "extra bits" idea, wildly different (3 vs 2) and capability.
Spot the error
"The syndrome came out 5, so data bit 5 is wrong."
Wrong: 5 is the position in the whole codeword of length (parity + data, counted from 1), not the 5th data bit. Position 5 could itself be a parity bit.
"We have parity bits, so we can correct up to 8 errors."
Wrong: parity-bit count sets how many positions the syndrome can name (), not how many simultaneous errors correct. SECDED over 64 data bits still corrects only one.
"To detect errors we need ."
Off by one — and here is the why. To flag flips you need : the nearest other legal codeword must be at least steps away, so flips can never reach it and disguise your word as another legal one. With only , an -flip could land exactly on a neighbouring codeword — a legal word, so nothing looks wrong.
"Non-overlapping correction balls just need centers more than apart, where is the correction radius ."
Wrong: two balls of radius stay disjoint only when centers are apart — you must clear radius on both sides plus one middle step. That requirement is exactly the minimum-distance guarantee, and rearranging it gives .
"The all-zero syndrome names error position 0, i.e. the first bit."
Wrong: all-zero is reserved for "no error." Positions are numbered from 1, so the smallest nameable error position is 1, leaving nonzero syndromes as addresses.
"Parity bit checks position 4 only."
Wrong: (at position ) checks every position whose binary index has bit-2 set — positions 4,5,6,7,12,13,… — not just position 4. That coverage is what makes the syndrome spell the address.
"Since correction picks the nearest codeword, a 2-bit error is always fixed correctly."
Wrong: with a 2-bit error can land closer to a wrong codeword (inside the wrong bubble), so "nearest" mis-corrects. This is precisely the danger SECDED's extra distance guards against.
Why questions
Why must parity bits sit at powers-of-two positions specifically?
So each check covers exactly the positions whose index has one particular binary bit set; then the failed-checks pattern is the binary address of the flip. Any other placement breaks the "syndrome = position" magic.
Why does the Hamming bound have a "+1" ()?
One syndrome value (all-zero) must mean "no error," so only syndromes remain to name the error positions. The +1 reserves that no-error slot.
Why is ECC framed as turning "silent corruption into a loud crash" a win?
A silent flip in a pointer or balance is undetectable until damage is done; a detected-but-uncorrectable error at least tells you, so software can halt rather than propagate garbage. Loud failure beats silent failure. See DRAM.
Why can't we just re-read a DRAM cell to fix a soft error?
The cell now genuinely holds the wrong charge — re-reading returns the same wrong value. You need independent redundancy (the ECC bits) to know what the value should have been.
Why does correction power depend on and not on which bits happen to flip?
is a worst-case guarantee over all codeword pairs — it promises every legal word has a clear bubble of radius . Individual lucky flips don't change the guarantee the code can always honour.
Why does Chipkill spread one word's bits across many DRAM chips?
If a whole chip dies, spreading means each chip contributed only a few bits to any word — turning a catastrophic chip failure into a handful of correctable per-word errors instead of one unrecoverable burst.
Why is XOR the natural operation for computing parity?
XOR outputs 1 exactly when an odd number of inputs are 1, which is the definition of a parity check; it's also linear, so recomputing checks after a flip cleanly yields the syndrome. See Boolean Algebra / XOR.
Edge cases
What does a Hamming decoder do if zero bits flipped?
All checks pass, syndrome — the reserved "no error" value — and it outputs the word untouched. Correct behaviour, not a special case to fear.
What happens if the flipped bit is itself a parity bit, not a data bit?
The syndrome still equals that parity bit's power-of-two position (e.g. 4), so the decoder flips it back. The recovered data was never affected, but the code still self-heals.
Three bits flip in a plain Hamming(7,4) code — what happens?
Undefined/wrong: the code guarantees correctness only up to . A triple flip may yield a nonzero syndrome pointing at an innocent bit, or even a zero syndrome — silent failure. This is why beyond- errors are out of scope.
In SECDED, syndrome but overall parity is correct — what is concluded?
A double error (even flip count keeps total parity, yet the Hamming checks still fire). It's detected as uncorrectable → raise an alarm, never attempt a fix.
In SECDED, syndrome but overall parity is wrong — what does that mean?
The single flip landed on the overall parity bit itself: the Hamming checks see nothing, but the global parity mismatches. Data is fine; flag/ignore is safe.
Can a code have , and what would it mean?
Yes if two codewords differ in a single bit — then even one flip disguises one legal word as another. Such a code detects nothing; it's effectively no protection at all.
Why is stronger coding like Reed-Solomon Codes used for burst errors instead of Hamming?
Hamming targets isolated single-bit flips; Reed-Solomon works over multi-bit symbols, correcting whole clustered/burst corruptions (e.g. a dead chip region) that would overwhelm a bit-level Hamming code.
Recall One-line self-test before you leave
If you can explain why the syndrome equals the binary address and why detect and correct are different numbers, you own this topic. The address trap ::: Syndrome names a whole-codeword position (1-based over all bits), possibly a parity bit — never "the Nth data bit." The capability trap ::: Detect uses ; correct uses ; SECDED does both cleanly only because leaves the middle gap.