In 2003 a Belgian election-counting machine gave a candidate exactly 4096 extra votes. No
fraud, no bug in the software — a single bit deep in the machine's memory had silently flipped from
This lesson is about dependability — how we quantify a machine's trustworthiness, and the beautiful coding theory that lets a chip notice when a bit has gone bad and, remarkably, put it right without ever telling the software anything happened.
Reliability engineers are pedantic about vocabulary, and for good reason: confusing these three words makes it impossible to reason about where to spend your defence budget.
| Term | What it is | Example |
|---|---|---|
| Fault | a defect or upset in the physical machine | a memory cell whose charge got flipped by a particle |
| Error | a fault that has corrupted some state | the stored value is now wrong |
| Failure | the error becomes visible in the service delivered | the wrong vote total reaches the screen |
The whole art of dependability is to stop the chain before it reaches the last box. A fault that is caught and corrected never becomes a failure. This is why a cosmic ray hits your laptop's RAM roughly once a day yet you almost never notice: the fault happens, but error-correcting hardware breaks the chain.
Industry folds trustworthiness into three letters, RAS: Reliability (does it give the right answer?), Availability (is it up when you need it?), and Serviceability (how fast can you fix it?). The first two have crisp definitions built from three mean times.
Availability is the fraction of time the system is actually working:
Engineers quote availability in "nines". Five nines —
Slide the
Knowing a machine will suffer bit flips, we add redundancy so it can catch them.
The cheapest scheme is a single parity bit: append one bit chosen so the total number of
Richard Hamming, furious at a weekend's work lost to a card-reader error in 1950, invented the fix. A
Hamming code uses several parity bits, each guarding an overlapping subset of positions,
so a single error trips a unique pattern of failed checks — the syndrome — that
spells out, in binary, the exact position to flip back. The classic
Each parity bit checks the positions whose index includes its bit. Parity
The general rule uses the Hamming distance — the number of bit positions in which two
legal code words differ. A code that guarantees a minimum distance
Add one more overall parity bit and you reach
SECDED assumes errors are independent single bits. But a whole DRAM chip can die at once — a stuck driver, a shattered package — flipping many bits in one word and defeating an ordinary ECC. Chipkill (IBM's name; Intel calls it SDDC) spreads each word's bits across many chips and uses a stronger code so that the complete loss of any single chip still corrects. It is RAID, but for memory chips.
Zoom out and the same idea — redundancy — is the master strategy of all dependable design: RAID mirrors disks, error-correcting codes duplicate information, triple-modular-redundancy runs three copies of a circuit and votes, and data centres replicate whole machines across continents. You cannot make a component that never fails; you make a system that survives its components failing.
Measurements put the soft-error rate of DRAM at very roughly one bit-flip per few gigabytes per few days at sea level — and it climbs sharply with altitude, because more of the cosmic-ray shower survives the thinner atmosphere. Aircraft and spacecraft avionics see errors far more often, which is why they use radiation-hardened parts and heavy ECC. Google, running fleets of millions of machines, published a famous 2009 field study finding that DRAM errors were orders of magnitude more common than lab estimates had predicted — vindicating every server that ships with ECC memory as standard. The particles are not exotic: mostly neutrons from ordinary cosmic-ray air showers, plus a trickle of alpha particles from trace radioactive impurities in the chip packaging itself.
A single parity bit tells you that something is wrong, never what. With no way to locate the bad bit it cannot repair anything, and — worse — if two bits flip, the parity check passes again and the corruption is invisible. Conversely, do not over-claim for SECDED: it corrects one error and detects two, but a triple error can alias onto a valid-looking single-error syndrome and be "corrected" to the wrong value — silent corruption. Every code has a distance budget; spend it knowingly. More protection always costs more redundant bits, and there is no free lunch.