concept Servers & hardware
ECC memory: correction, detection and limits
The eight-bit SECDED code here corrects one flipped bit and detects two distinct flips in a word. Beyond that bound, a damaged word can look correctable or pass every parity check.
What it means
An ECC label alone does not tell you which errors memory can correct. The guarantee for the code here applies to one eight-bit word: it can correct any one flipped bit, whether data or check, and detect but not correct any two distinct flipped bits. That is what single-error correction, double-error detection (SECDED) means.
The teaching code is extended Hamming (8,4) with even parity. Read positions 1 through 8 from left to right. Positions 3, 5, 6, and 7 hold the four data bits. The encoder sets the check bits at positions 1, 2, and 4 so each of the following groups contains an even number of ones:
- Check 1 covers positions 1, 3, 5, and 7.
- Check 2 covers positions 2, 3, 6, and 7.
- Check 4 covers positions 4, 5, 6, and 7.
Position 8 makes the number of ones in the entire word even. To decode a received word, add the numbers of the group checks that fail: the sum is the Syndrome, or 0 if all three pass. Overall parity is a separate result: 0 for an even number of ones across all eight positions, 1 for odd. Read the two results together before deciding whether to change a bit.
Try it
This simulation uses synthetic inputs, not measurements of your hardware. Data bits takes exactly four binary digits. For Injected bit positions, enter none or distinct positions from 1 through 8 separated by single spaces. Data such as 1021 or repeated positions such as 5 5 are invalid; neither produces a decoding result.
ECC memory: correction, detection and limits
Use a labeled small SECDED example; flip supported data/check-bit patterns and distinguish corrected, detected-uncorrectable and outside-model cases.
Synthetic inputs only. This is not a measurement of your hardware or service.
Parity checks identify a single position only under the declared error bound. A nonzero syndrome with even overall parity detects two errors but does not identify both.
Encoded word → received word → decoder evidence
- Encoded positions 1–8
- 01100110
- Received positions 1–8
- 01100110
- Syndrome
- 0
- Overall parity
- 0
- Bounded decoder outcome
- no-error-injected
- Corrected bit position
- No certified correction
- Corrected word
- 01100110
- Recovered data bits
- 1011
Evaluated evidence
- Data bits
- 1011
- Injected bit positions
- None
- Teaching code
- extended-Hamming(8,4)-even-parity
- Data-bit positions
- 3 · 5 · 6 · 7
Teaching code, not the exact organization of every ECC DIMM. Ground-truth injected error count is known only in this simulation.
About this model
Every input is local synthetic evidence. Numbers stay as raw text until this model validates them. The shown evaluated values come from the same result as the explanation.
Presets replace the entire scenario. Reset restores all starting fields, scenario selection and model state; it does not change the open or closed state of this help or article FAQ.
No external request, device command, stored-input history or measurement is performed.
With 1011 and none, the encoded and received words are both 01100110. The syndrome and overall parity are both 0, and the recovered data bits are 1011. The simulation can say no-error-injected because it knows the input. The parity checks alone say only that the word passes.
Keep Data bits at 1011 and compare these inputs:
- Enter `5`. The received word is
01101110. Checks 1 and 4 fail, giving syndrome 5, and overall parity is 1. Within the bound of at most two flips, odd parity means exactly one bit changed. The decoder flips position 5 back and recovers1011. If you enter8instead, overall parity is still 1 but the syndrome is 0: only the overall parity bit needs correction. - Enter `5 6` (Inject two data-bit errors). The received word is
01101010. Both flips affect check 4, so its group stays even. Checks 1 and 2 fail, giving syndrome 3, but overall parity is 0. The result isdetected-uncorrectable, not an instruction to flip position 3. In fact,3 8gives the same syndrome and overall parity. The checks cannot identify which pair to undo, so there are no recovered data bits. - Enter `1 2 4` (Inspect the evidence boundary). All three group checks fail, giving syndrome 7, and overall parity is 1. That looks exactly like a single flip at position 7. Yet position 7 is an unchanged data bit: flipping it would turn three damaged check bits into an incorrect data recovery. The simulation knows you injected three flips, so it returns
unknownrather than certifying a correction.
More than two flips do not even guarantee an error indication. With 1 2 3 8, the syndrome and overall parity are both 0, just as in the initial example. For any input with more than two distinct flips, unknown describes the limit of the guarantee, not a special signal the decoder found in the word. Reset restores the default scenario (1011, none) and clears the prior run state.
In practice
Before interpreting a hardware report of a corrected error, identify the code, the bits it protects together, and the error patterns its documentation covers. For example, Microchip’s eSRAM SECDED-ON description, section 5.2.2.1, specifies 32 data bits plus 7 check bits, with single-bit correction and double-bit detection across the data and check fields. The guarantee has the same name, but the word does not have the layout used here. For a DIMM, check both the module and controller documentation: Kingston’s ECC memory FAQ explains that ECC operation requires system support as well as suitable memory.
Parity checks test coding relationships, not who supplied the original data or whether those data were correct before encoding. Read “corrected” as a claim about a specified code and a supported error pattern, not as proof that memory is immune to corruption.
Frequently asked questions
Editorial questions based on the listed sources and explicitly labeled local examples.
Does ECC correct every error pattern?
No. The declared code corrects one bit and detects two distinct bit errors. More than two injected errors return unknown, even when their parity pattern resembles a correctable single error or a clean word.
Why add an overall parity bit?
In this even-parity extended Hamming example, the overall bit distinguishes odd from even error counts. Combined with the three-position syndrome, it separates the supported single-error and double-error cases.
Can this example describe every DIMM?
No. This is an eight-bit teaching word with four data bits. The cited controller, for example, uses a different data/check-bit organization; an actual DIMM requires its own controller and memory documentation.
Does correction prove stored data was authentic?
No. This decoder only checks the declared coding relationships. It does not verify a signer, the source of the original message or whether the original data was itself correct.
Sources & model boundaries
Primary references used for this explanation. The interactive example is an educational model, not a live check.
- Microchip eSRAM: SECDED-ON
5.2.2.1. The named controller uses32 data+7 check bits and supports single-bit correction/double-bit detection over data and check fields.
Checked .
- Kingston server-memory technical support
What is a memory rank?; What is the difference between registered, unbuffered, and ECC memory?. Rank count belongs to a memory module, rather than counting channels. ECC support adds memory/controller code-dependent requirements; a module label is not a specification of the toy SECDED code.
Checked .