A single byte caused Civilization II to crash after 6,000 years of peace
While the internet loves the myth of 'Nuclear Gandhi'—a bug that never existed—Sid Meier's Civilization II actually suffered from an overflow bug. In Civ II, a civilization's attitude was tracked with an 8-bit unsigned integer. When peace lasted long enough, positive diplomacy points accumulated past 255 and wrapped around to zero. The computer-controlled leader suddenly treated a longtime ally as a hated, bitter enemy, declaring nuclear war out of sheer arithmetic overflow.
The Anatomy of a Legendary Video Game Myth
In video game folklore, few tales are as famous or widely repeated as that of Nuclear Gandhi. According to internet lore, a programming flaw in the original 1991 strategy game Sid Meier's Civilization turned history's best-known apostle of nonviolence into a warmongering despot with an insatiable appetite for atomic weapons. The story went that each computer-controlled world leader was assigned an artificial intelligence aggressiveness rating on a numerical scale, with Mahatma Gandhi naturally receiving the lowest possible setting of one. When a player's civilization or Gandhi's own empire adopted democracy—a government type supposed to reduce a leader's hostility by two points—an arithmetic error occurred. Because the value was allegedly stored as an unsigned eight-bit integer, subtracting two from one caused the number to wrap around backward to 255, creating an apocalyptic conqueror.
The legend was celebrated for years across gaming forums, social networks, and popular culture websites as one of the most delightful software glitches in history. It offered a clean, intuitive explanation of binary mechanics: an integer underflow turning extreme pacifism into unrestrained aggression. The narrative fit perfectly with players' actual memories of playing the classic strategy title, where Gandhi did, on occasion, threaten opponents with nuclear warheads. For more than two decades, gamers and tech enthusiasts accepted the explanation as historical fact, treating it as a classic textbook case of edge-case programming gone wrong.