system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5:How do engineers "replace" the code from Voyager's current source code?

I just watched the "The Farthest" movie which is a documentary of Voyager 1 & 2. There's a part there where the Voyager's code needs to be updated to be able to capture a darker environment/image or some sort (you get the idea). I was just wondering what/how do the engineers do it, with just a push of a button, it will rewrite/replace/update the code? Thanks!
gpt
Usually they have an identical binary image on the ground used in a "hot-bench." This is usually a combination of real engineering model hardware, software, and simulation. They make code changes on the ground, test it using the hot-bench, and once it works as expected, they diff the original binary image with the changed image. Each byte difference has a value and an address. The software/hardware supports commands you can send to the vehicle in which you can poke the new values into the known addresses. This is called patching. Of course there is more detail to it than that, but that's the basic gist. 

The "push of a button" is misleading. This button causes the ground software to perform well scripted (and heavily reviewed) sequence of events to perform the patch. The sequence includes such things as sending the commands, receiving telemetry to verify the commands executed as expected, and monitoring other sensors and instruments to make sure everything is still nominal during the whole process.