Lesson 3 of 3 · Error correction and check intervals
Check and correct memory words
23 minute lesson · 3 checks along the way
Your goal for this lessonDecode a declared parity code within its fault assumptions, then calculate how check spacing changes a model of accumulated wrong bits.
In this lesson 4 sections · 3 checks
Read & understand
Specify a code and a fault class
The 2004 X-SAT Linux study discusses scheduled and on-demand memory checks, including single-bit correction and double-bit detection for protected words. It also recognizes checker corruption and changing-data limitations. Its exact word layout is not supplied. Our original teaching code is extended Hamming(8,4), not a reconstruction of X-SAT’s flight software: eight stored bits protect four data bits, and every stored position can suffer an error.
Number positions 1–8 from left to right. Data occupy 3, 5, 6 and 7; check bits occupy 1, 2 and 4; position 8 enforces even parity across the whole word. XOR gives one when a group contains an odd number of ones. Define s₁=XOR(1,3,5,7), s₂=XOR(2,3,6,7), s₄=XOR(4,5,6,7), syndrome s=s₁+2s₂+4s₄, and P=XOR(all eight). A valid word has s=0 and P=0.
Read & understand
Use both checks before correcting
Assume at most two positions are wrong. Nonzero s with P=1 identifies one wrong position s. With s=0 and P=1, only position 8 is wrong. Nonzero s with P=0 indicates two wrong positions: detect the problem without treating s as a correction address. Zero s and P indicate no error only within this stated fault class. The overall parity bit distinguishes cases that a syndrome alone cannot separate.
Data 1011 encode as 01100110. Flipping position 6 gives 01100010, s=6 and P=1, so flip 6 back. Flipping positions 3 and 5 instead gives 01001110, still s=6 but P=0: a double error. For alternate data 0101, valid word 01001011 becomes 01000011 after flipping 5, with s=5 and P=1. Flipping 2 and 7 gives 00001001, s=5 and P=0. The same syndrome can therefore require different actions.
Check 1 of 3
10 pointsUse the reading above. You can try again without losing points.
Read & understand
Model wrong positions at a check
Start with a correct word. Assume each bit independently toggles according to a homogeneous Poisson process at fictional rate λ=0.001 per second. Repeated toggles can cancel; a bit is wrong after an odd number. At interval τ, p=(1−exp(−2λτ))/2. The number K of wrong positions is then binomial with eight trials. Consequently P(K≥2)=1−(1−p)⁸−8p(1−p)⁷, subtracting the zero-wrong and exactly-one-wrong cases from one.
For τ=10 seconds, p≈0.009900663 and P(K≥2)≈0.002637949, or 0.2638%. For τ=5 seconds, p≈0.004975083 and the tail is 0.000679377, or 0.06794%. Shorter exposure reduces the chance of reaching two or more wrong positions. This tail counts snapshots outside guaranteed single-error correction; it is neither a mission-failure probability nor a probability that every such pattern will be detected. Some patterns with more errors defeat the declared decoder.
Use syndrome and overall parity together
Original extended Hamming construction and independent Poisson toggle model. The 2004 engineering paper discusses software protection but does not specify this eight-bit code or the invented upset rate.
Open full-size diagram in a new tab: Use syndrome and overall parity togetherCheck 2 of 3
10 pointsUse the reading above. You can try again without losing points.
Read & understand
Account for restoration and unchecked patterns
Over 1,000 seconds, assume perfect externally assured restoration after every check, even for patterns this decoder cannot repair. Expected at-risk snapshots per word are (1000/10)×0.002637949≈0.263795 or (1000/5)×0.000679377≈0.135875. These expectations are not probabilities of at least one event. A separate approximate cost of 0.1 seconds per check uses 1% or 2% of elapsed time. The probability calculation treats checks as instantaneous; it does not model races during a finite scan or repair.
Three errors show why fault limits matter. Flipping positions 1, 2 and 3 of 01100110 produces 10000110 with s=0, P=1. A single-error decoder would flip 8 and produce 10000111, a different valid word with wrong data. Positions 2, 4 and 6 provide another such triple because their binary labels XOR to zero. Correlated upsets, bad checkers and imperfect recovery can likewise violate the clean, independent model. Passing parity is evidence under assumptions, not unconditional proof that stored information is correct.
Check 3 of 3
10 pointsUse the reading above. You can try again without losing points.
Put it together
Your lesson progress
Each check connects to a part of the story. Complete all 3 to earn your 25-point lesson bonus.
Explore further · Optional
Go to the source
Explore the evidence behind this lesson. These optional readings and videos open in a new tab.