On June 4, 1996, the European Space Agency launched Ariane 5 Flight 501 carrying four vital scientific satellites worth $500,000,000. Just 37 seconds into flight, the rocket swerved 90 degrees off trajectory, ripped itself apart under supersonic aerodynamic drag, and automatically self-destructed. The culprit? A single 64-bit to 16-bit integer conversion.
The Ariane 5 was Europe's proudest engineering feat — a heavy-lift launcher designed to replace the wildly successful Ariane 4. At T+00:00, the main cryogenic Vulcain engine ignited, followed seven seconds later by two giant solid rocket boosters (EAP).
For the first 36 seconds, the rocket climbed flawlessly into the French Guiana sky. Then, in under 2.5 seconds, total disaster struck:
Inside the rocket's navigation package — known as the Inertial Reference System (SRI) — a calculation measured the vehicle's horizontal drift velocity (referred to in telemetry documents as BH, Horizontal Bias).
In high-level Ada code, this quantity was calculated in full 64-bit IEEE double-precision floating point. However, to save memory and bus bandwidth, it had to be converted into a 16-bit signed integer before being dispatched:
In the older Ariane 4, horizontal acceleration was modest; mathematicians calculated that the physical trajectory would never allow the value to exceed 28,000. So, to conserve precious CPU cycles on the 16 MHz processor, engineers left the conversion unprotected by an exception handler:
-- 7 critical sensor variables were converted here. -- 4 were wrapped with exception protection; 3 were left bare to meet an 80% CPU limit! declare L_M_BV_32 : Short_Integer; -- 16-bit signed integer [-32,768 .. +32,767] begin -- AT T+36.7s, V_M_BV_32 reached 36,895.0. -- The hardware threw an unhandled "Operand Error" exception! L_M_BV_32 := Short_Integer(T_Booster_Bag.V_M_BV_32); end;
Because Ariane 5 was a completely different, more aggressive rocket, its early horizontal trajectory was five times higher than Ariane 4. The value rapidly smashed through 32,767, causing the CPU to throw a fatal hardware interrupt.
A natural question is: "Didn't Ariane 5 have a backup navigation computer?"
Yes. The rocket had two identical units: SRI 1 (Active) and SRI 2 (Hot Standby). However, true redundancy requires diversity. Both computers were running the exact same software on the exact same sensor inputs.
Here is the most painful lesson: the SRI routine that crashed was completely useless in flight. It was designed to align the gyroscopes on the launchpad *before* liftoff. Engineers kept it running for 40 seconds after launch purely for convenience — in case of an aborted countdown, the rocket could reset quickly without waiting 15 minutes for realignments. At T+37s, the code served zero flight purpose, yet it doomed the entire mission.
In digital ASIC and FPGA design (Verilog / SystemVerilog), bit-width mismatches and overflows are daily hazards. When hardware datapaths truncate without protection, numbers either wrap around (causing positive velocities to turn negative) or throw processor exceptions.
Modern silicon architectures avoid catastrophic wraps by enforcing Saturation Logic:
// ❌ DANGEROUS: Naive truncation (Standard Verilog behavior) // When 'in_32' exceeds 32767, it wraps into a negative number! wire signed [31:0] in_32 = 32'd35000; wire signed [15:0] out_16_naive = in_32[15:0]; // = -30536! (Reversed thrust!) // ✅ SAFE: Saturated Hardware Clamp (Silicon Best Practice) wire signed [15:0] out_16_safe = (in_32 > 32'sd32767) ? 16'sd32767 : // Clamp to MAX positive (in_32 < -32'sd32768) ? -16'sd32768 : // Clamp to MIN negative in_32[15:0]; // Pass through safely
In mission-critical tapeouts, verification engineers write SVA assertions so testbenches immediately catch any out-of-range value during pre-silicon RTL simulation:
// Assert that horizontal velocity never exceeds 16-bit signed range property p_horiz_bias_bounds; @(posedge clk) disable iff (!rst_n) (velocity_valid) |-> (vel_horizontal >= -32768 && vel_horizontal <= 32767); endproperty a_horiz_bias_check: assert property(p_horiz_bias_bounds) else $fatal(1, "FATAL RTL FAULT: Horizontal Bias overflow detected! Exceeded 16 bits.");
A: Truncation drops least-significant or most-significant bits to fit a smaller bit-width, losing precision or dynamic range. Overflow occurs when an arithmetic operation results in a value that cannot physically fit within the designated number of bits, causing high bits to spill or flip the sign bit in two's complement.
A: The testing facility simulated the guidance software using the Ariane 4 flight profile trajectory rather than the true Ariane 5 aerodynamic profile. Because the older profile never reached high horizontal acceleration, the overflow code branch was never stimulated in pre-launch hardware-in-the-loop (HIL) tests.
A: In standard modular arithmetic, `32767 + 1` wraps around to `-32768`. In saturation arithmetic, the result clamps at the maximum allowable bound `32767`. It is widely used in Digital Signal Processors (DSPs), audio mixing (preventing deafening pop noise), flight control systems, and graphics accelerators.