system
Given the following post, respond as if you're commenting on Reddit:
human
ELi5: Why is overwriting computer memory with all 0s or all 1s not enough to render the data entirely irretrievable?

 I heard on another post something about 0-ing out computer memory not being enough to stop a digital forensics expert with enough time and dedication from recovering the data. They said you needed to overwrite the data randomly at least 7 times to render it completely irretrievable. This seems completely unnecessary to me, unless computer memory has some sort of physical “residual memory” where you could identify the last change made to that bit. And even if that is the case, why wouldn’t overwriting every bit to 0, then 1, then back to 0 work just as well?
gpt
When you write data the ones are magnetic in one direction and the zeros magnetic in the other. When you over write data, the length of the magnetic data block may not be the same size, resulting in residual original data on the edges. In addition, When you write a one on top of a one, the magnetic field is slightly stronger than if you write a zero on top of a one. With an extremely sensitive meter you can find these differences, The seven passes of all ones alternating with passes of all zeros ensure the residual magnetic differences and edge variations are removed.