Kyle: Oh my god! What the hell is that!?!?
Stan: Yeah, dude, it's a monkey with five asses!
Cartman: But what happened to Wendy?!
Fred: Oh no! This is not good. Get the malpractice
lawyers! Call the Atomic Energy of Canada Limited person here right
now! Something has gone seriously wrong.
Narrator: The Therac-25 had a very serious programming flaw in the
setup portion of the program. When the Setup function ran, certain
flags were set. When there are no errors encountered, the flags are
set to zero. If there is an error, the flags are incremented by
one. Unfortunately, the flags were stored in a single byte, so
that when the number of errors increased beyond 255, the flag wrapped around
and overflowed to zero. This meant the machine thought that the test
had passed, so the Therac-25 continued its operation despite that fact
that the filters in the machine weren't properly set. If the hardware
interlocks had remained in the machine, they would have detected that the
filters weren't in place and prevented the operation of the machine.