Why the Boeing 787 had to be restarted before 248 days
Because an internal counter, left powered without interruption, reached the end of its room after 248 days and started again from zero. At that moment the units that control the electrical generators went into fail-safe mode, and the aircraft could lose its power. The US authority required the aircraft to be powered off and on again at least every 120 days, and then the software to be corrected.
What is established
FactAirworthiness Directive AD 2015-09-07 of the US Federal Aviation Administration, effective 1 May 2015, says it: a 787 that has been powered continuously for 248 days can lose all alternating-current electrical power, because of a software counter internal to the generator control units that overflows after 248 days of continuous power.
FactIf the four main units were powered up at the same time, they switch together, whatever the phase of flight. The directive mentions a possible loss of control of the aircraft. It requires a power-down at least every 120 days.
FactA second directive, AD 2018-20-15, effective 20 November 2018, requires new software in the aircraft's six units.
The calculation, to redo yourself
A computer counter is like a car odometer: it has a fixed number of digits, and when it is full it rolls back to zero.
TheoremA counter of 31 binary digits can count up to 2³¹, that is 2,147,483,648. If it counts hundredths of a second, it is full after 21,474,836 seconds. A day lasts 86,400 seconds. So: 21,474,836 ÷ 86,400 = 248.55 days.
FactHonesty about this calculation: neither directive publishes the size of the counter or its unit. The 31-binary-digit counter in hundredths of a second is a deduction, made from the match with the 248 days. What the authority does write, in black and white, is the gesture: a counter that overflows.
The same gesture, elsewhere
FactTherac-25, 1987: in a radiotherapy machine, a one-byte counter rolled back to zero on its 256th pass. At zero, a check was skipped. A patient died of it.
FactGPS, 1999 and 2019: the week number is held on ten binary digits and rolls back to zero every 1,024 weeks, or 19.6 years. A receiver that takes this remainder for the date believes it is twenty years earlier.
Prediction2038: many systems count seconds since 1 January 1970 on 32 binary digits. The counter reaches its limit on 19 January 2038 at 03:14:07. Any uncorrected system that rolls back will then show 13 December 1901.
The ARC reading
ReadingEngineers have a name for the defect: "integer overflow". They have no name for the gesture underneath it. The corpus names it: taking the remainder for the number. The counter keeps the position in the turn and throws away the turn. It is modulo, wired into the machine.
Reading"In each case, the remedy was to keep more turns": longer counters, years on four digits, weeks on thirteen binary digits.
What this page does not claim
It does not say that a 787 crashed because of this counter: the directive is a precaution, and the corpus reports no accident of this aircraft linked to this defect.
It does not put everything down to the remainder. The Patriot missile of 1991 drifted by 0.34 seconds because of a truncated decimal: a different gesture, which the corpus treats separately.
Further reading
- The Remainder and the Turns (paper, in French)
- Modulo, part 5: the deaths and the failures, with sources (in French)
- Modulo (PDF, in French)
- The script that redoes the calculations