Asked by: Richard O’Neill, Glasgow
Data is stored as 1s and 0s in the memory. The presence of a 1 or 0 is represented by an accumulation or absence of electrons. Charged particles have mass, but it is merely the distribution of electrons that varies rather than their quantity.
Another way of thinking about it is that the atoms in the memory have magnetic-like properties. Groups of atoms align in one direction or the other according to whether they are storing a 1 or a 0 and will possess differing amounts of energy according to how they are aligned. As energy is equivalent to mass, we could argue that adding data to a device makes it a few millionths of a millionth of a gram heavier.
Subscribe to BBC Focus magazine for fascinating new Q&As every month and follow @sciencefocusQA on Twitter for your daily dose of fun science facts.