5 ms·
I've wondered about the following: The firmware controlling a nuke has to have, at some point, a bit or control register it sets that causes the explosion to g
by kabdib 15y ago
I've wondered about the following:
The firmware controlling a nuke has to have, at some point, a bit or control register it sets that causes the explosion to go off:
*pKaboom = true;
or something like that. My question is: What is the line of code after that?
*pKaboom = true;
/*NOTREACHED*/
I suspect it's more complicated than that (there's an infinite loop of some kind that keeps retrying the command sequence). I also suspect I will never know, short of some very hush-hush software being open-sourced someday. :)
- deleted 15y ago[deleted]
- tdicola 15y agoI doubt the warhead has code to control its activation--more likely it's something like an altitude sensor that controls detonation.
- kabdib 15y agoThink cruise missile. Some code looks at a map, looks at GPS, looks at altitude and velocity, and decides "Yup, this is the spot." It's probably a lot more prosaic than I imagine.
- samfoo 15y agoI'm fairly certain that ICBM's use inertial guidance with predefined/computed coordinates (http://en.wikipedia.org/wiki/Inertial_guidance http://en.wikipedia.org/wiki/Inertial_guidance). There's no software involved, its all physical. Detonation is (probably) trigged by a combination of altimeter, accelerometer and other telemetry systems.
- InclinedPlane 15y agoYeah, GPS doesn't work so well through the plasma sheath around a reentry vehicle. And you don't have a whole lot of time to acquire GPS lock, or steer, when you're still traveling at hypersonic speeds and it takes maybe half a minute to hit the ground after first encountering the upper atmosphere.
- sp332 15y agoCruise missiles, on the other hand... Well, let's just say there are eye-witness accounts of one flying down the street and turning the corner at an intersection before detonating in a tiny radius. All the was left of the target was a single shoe, IIRC.
- oelewapperke 15y agoOn U.S. ICBM's the there is no single detonation circuit. US nuclear bombs are "hardware encrypted". So nuclear bombs go off if they have a certain physical layout that leads to supercriticality. What this means is not really relevant here, save that you have to have X pieces of "material" within a few mm of their "ideal" location, which is a big 3d puzzle that is very non-trivial to solve. The inside of a nuclear bomb contains about 30 "traditional" detonators. When you fire them a piece of the bomb material (either uranium or plutonium) gets shot out of a cannon, into a tube that is a few centimeters long, with the "detonation" position randomly selected within a certain range. These positions are what's inside the president's suitcase. You can launch a warhead with the wrong codes (right launch code, wrong arming code), in which case it'll basically be a small bathtub falling out of the sky. With useless fissile material inside, properly isolated (because melted into steal) and contained nuclear material inside. A non-detonated warhead is useless without enrichment facilities, and if you have those, chances are you have bombs anyway (there is 1 country in the world with enrichment facilities but no bomb, no it's not Iran). What you need to do to detonate the device is quite complex, and very finicky. And of course, the actual detonation system is redundant. So the warhead decides to detonate, and only when it decides it will detonate in the very near future (the "point of no return") it will send the arming codes to a set of processors sealed deep inside the actual bomb. These processors will then fire the charges catapulting nuclear material along their tubes, with the sequence and timing provided by the arming code. Either the codes are correct, and the bomb will detonate, or they're incorrect and the fissile material will melt into the casing. These processors don't have any idea which of the two will happen. Once launched, the bomb WILL send an arming code to the processors under certain circumstances it will send known wrong codes (it will not detonate outside of the target area). Once the umbilical is detached, a wrong set of arming codes are sent to the detonators and a timer is activated which will cause them to fluke-detonate. Anything touches the arming mechanism, they destroy the bomb. Anything happens to either processor, they destroy the bomb. Anything tries to unscrew the internal access, they destroy the bomb ... Accepting any arming code, right or wrong is done for 2 reasons. First, there is no-one in the US military except for 2 people that can detonate nuclear warheads (there are more which can launch them though). I believe that a third person holds the detonation codes, but has no access either directly or by giving commands to others, to the bombs. Second, if someone holds a gun to the president's wife head he can launch the missiles which will do nothing more than destroy the US nuclear capability without doing anything different from when he's actually ordering an attack.
- nobody31 15y agoICBM's use inertial and (in the case of Trident) star mappers. The reason they don't use GPS is that you would (hopefully) only start throwing ICBMs around if you are in "nucular combat toe to toe with the Rooskies" - and the way you know you are in a proper war is that all your GPS satellites have just been destroyed by the other side.
- sp332 15y ago... exit(EXIT_SUCCESS); // or maybe failure, if we reach this point? :)
- agmiklas 15y agoGCC has a noreturn pragma for this sort of thing. It lets you mark functions as never returning, which can in turn help the optimizer generate code leading up to that function's call sites.
- deleted 15y ago[deleted]
- deleted 15y ago[deleted]
- nraynaud 15y agoI guess there might be some code for mis-firing. Detonating this kind of stuff is tricky.
- amatus 15y agoSome missiles run a proprietary operating system for which one has to buy a license per missile. I always found it funny that those instances of the OS were going to destroy themselves.