system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: With the advent of the new SanDisk 128GB Memory Card, I was wondering how memory is actually stored on such devices.

I understand the basic concepts like CD's, Vinyl Records, Cassette Tapes and the such, but is it the same process on microchips and such?
gpt
No, it's very different. Weirdly, your standard internal hard drive is somewhat similar to a CD or record (or even a cassette), but "flash" memory is very different.

Flash memory uses devices called "floating gate transistors." The physics is incredibly complicated, but all you really need to know is that a transistor is like an electrically-controlled switch. There's a section of the transistor called the "gate," and if you apply a voltage at the gate, the transistor switches to "ON" and will conduct. Take away the voltage, and the transistor is "OFF" and will not conduct.

A floating-gate transistor is similar, but the difference is that there's a little insulated "box" at the gate that can hold electric charge. If you force some charge into the box, the transistor will conduct (switch is "on"). However, since the box is insulated, it will *stay* on, even when you power down the system. The charge can't go anywhere.

So, a device like an SSD or USB stick uses floating-gate transistors to store their data, since they can "remember" what the data was even when they're unpowered. Roughly, a transistor in the "ON" state is a 1, and a transistor in an "OFF" state is a 0.

Wire a couple hundred billion of those together, and you've got a 128 GB memory card.

edit: about the internal part in case you're curious: an internal hard drive is a spinning platter with a read head like a CD or record player, but it uses magnetization to store data like a cassette.