On this page
Three failures still studied by software engineering students: a rocket lost to one number conversion, a date format the world paid to fix, and a radiation machine that hurt patients when its operator typed quickly. Each is a bug you can learn to catch in your own code.
What went wrong with Ariane 5 in 1996?
On 4 June 1996, the first Ariane 5 rocket veered off its flight path, broke up and exploded about 40 seconds after its flight sequence began, at an altitude of about 3,700 m, according to ESA's summary of the inquiry board report.
The inquiry board's full report, chaired by Jacques-Louis Lions, traced the failure to the rocket's inertial reference system. Its software converted a 64-bit floating point number into a 16-bit signed integer, and the number was too big to fit. The conversion raised an "Operand Error" and the computer stopped. The backup unit had already stopped one 72-millisecond cycle earlier, for the same reason.
Three details from the report make this the classic overflow story:
The code was reused from Ariane 4, where it worked. Ariane 5 built up horizontal velocity five times more rapidly, so the value climbed past a limit that Ariane 4's trajectory never reached in those first 40 seconds.
The failing routine aligned the inertial platform before lift-off and served no purpose in flight, but it kept running for about 40 seconds after lift-off.
Engineers had found seven variables at risk of this error and protected four. The other three, including the one that failed, were left unprotected. The board was told not every conversion was protected because of an 80% maximum workload target for the computer.
A 16-bit signed integer holds whole numbers from −32,768 to 32,767, because 16 bits give 2^16 = 65,536 patterns, split between negative and non-negative values. Check anything bigger before you convert it. If binary feels shaky, try our guide to converting decimal to binary by hand.
What was the Y2K bug, and why did it happen?
The Y2K bug was a defect caused by storing years as two digits, so that "00" was read as 1900 instead of 2000. A 1999 report by the US Senate Special Committee on the Year 2000 Technology Problem explains that programmers saved memory by storing 1968 as 68, with the 19 implied.
In the IBM 7094 of the early 1960s, the report notes, memory cost around $1 per byte, so every digit had a price. According to the report, no one thought software written in the 1960s and 1970s would survive to 2000.
Its worked example is worth copying. The gap between 1 July 1998 and 1 July 2005 is exactly 7 years, but a program with the bug might answer 93 years or −7 years. Credit cards expiring in 2000 or later were treated as if they had expired almost a century earlier. On cost, the committee said there was no agreed answer, and called a Gartner Group estimate of $600 billion worldwide "a frequently cited number".
How did a race condition make Therac-25 dangerous?
A race condition is a bug where the result depends on the timing of two things happening at once. Between June 1985 and January 1987, six known accidents involved massive overdoses from the Therac-25 radiation therapy machine, with deaths and serious injuries, according to Nancy Leveson and Clark Turner's 1993 investigation in IEEE Computer (full text hosted by MIT).
At the East Texas Cancer Center in Tyler, an operator typed "x" for X-ray, saw it should be "e" for electron, and corrected it quickly. The console showed "Malfunction 54", which the sheet on the machine explained only as a "dose input 2" error. The cause: setting the magnets takes about 8 seconds, and an edit finished inside that window was never detected.
Speed was only the trigger. The earlier Therac-20 had mechanical interlocks, while the Therac-25 relied more on software for safety. Related bugs existed in the Therac-20's software, but its interlocks meant no one was injured.
What should students learn from famous software bugs?
Turn the three stories into a checklist for your next school project or Class 12 computer science practical:
Range check. Write down the largest value each number could ever hold and compare it with its type.
Boundaries. Test zero, negatives, the first and last item, and the change of year. Store dates in full.
Reused code. Before copying an old function, list what it assumed. Ariane 4's assumptions were true for Ariane 4.
Two things at once. If a user can change an input while your program is still acting on the old one, test it fast.
Useful errors. "Malfunction 54" told the operator nothing. Say what went wrong and what to do.
When a bug does turn up, our five-step debugging routine for beginners beats staring at the screen.
If number types and data storage are the gap, the Fermi Concept Library has every concept in physics, chemistry, biology, mathematics and computing, each with its own lesson, so you can revise how computers store numbers before your next practical.



