Browsing Quora, I saw the following question with contradicting answers.

For the highest voted answer:

The bits are represented by certain orientations of magnetic fields which shouldn't have any effect on gravitational mass.

But, another answer contradicts that one:

Most importantly, higher information content correlates with a more energetic configuration and this is true regardless of the particular type of storage... Now, as per Einstein's most famous formula, energy is equivalent to mass.

Which answer is correct?

  • 2
    $\begingroup$ Poetic licence should be read as implied when interpreting the word "full". The disk doesn't know when it's "full", and it might be full of zeroes or full of random numbers - close to opposites when you're accounting for energy. $\endgroup$ – Bernd Jendrissek Jul 10 '12 at 1:35
  • $\begingroup$ Here's my own addition to the question: When magnetic domains are all aligned similarly -- all zeros or all ones in most (but not all) possible magnetic media coding schemes -- you begin to get a non-trivial external magnetic field. In effect, the disk becomes a weak permanent magnet. It takes energy to create such fields, and such external fields simply would not exist at any distance for random bits. So, has this external energy field been taken fully into account in the estimates of the energy states of a magnetic disc that has only one state -- that is, that encodes no data? $\endgroup$ – Terry Bollinger Jul 11 '12 at 3:31
  • 1
    $\begingroup$ Although neither a disk of all 1s or a disk of all 0s contains anything what we'd call useful information. $\endgroup$ – Shadur Mar 4 '13 at 15:05

I wrote a blog post about this some time ago. The answer is yes, but by a tiny amount that you would never be able to measure: something like $10^{-14}\text{ g}$ (roughly) for a typical ~1TB hard drive.

That value comes from the formula for the potential energy of a pair of magnetic dipoles,

$$E = \frac{\mu_0}{4\pi}\frac{\mu_1 \mu_2 \cos\theta}{r^3}$$

In my post, I estimate that a hard drive might contain $10^{23}$ electrons total, split into $10^{12}$ magnetic domains which are spaced around $0.1\ \mathrm{\mu m}$ apart. That means the magnetic moment of each of these domains is $10^{11}\mu_B$, with $\mu_B = \frac{e\hbar}{2m_e}$ being the Bohr magneton. If you plug this into the formula above, and multiply by 4 under the assumption that each magnetic domain interacts with 4 nearest neighbors, you wind up finding that the total energy is no more than $5\text{ J}$, depending on the value of $\cos\theta$. That corresponds, via $E = mc^2$, to an equivalent mass of around $10^{-14}\text{ g}$.

Admittedly all of these numbers are rough order-of-magnitude estimates, and there are various other effects that contribute little bits to the energy, but any corrections aren't going to shift this by more than a couple of orders of magnitude one way or another. Given that the equivalent mass of the energy stored in the magnets is a full 17 orders of magnitude less than the mass of the hard drive itself, it's safe to say that the difference is undetectable.

Incidentally, I also tried out the equivalent calculation for flash memory in another blog post.

  • 1
    $\begingroup$ Good answer, but this doesn't yet address how you expect the dipole configuration and its associated energy content to change based on the amount of information stored in the drive (+1 anyway). $\endgroup$ – kleingordon Jul 5 '12 at 0:45
  • $\begingroup$ Yeah, I intentionally didn't address that in detail. It could vary somewhere between $+5\text{ J}$ (for an anti-aligned grid) and $-5\text{ J}$ (for completely uniform magnetism). The main point I want to make is that no matter what assumptions you make, the weight difference is too small to measure. $\endgroup$ – David Z Jul 5 '12 at 0:52
  • 3
    $\begingroup$ @DavidZaslavsky: The issue is that the randomly aligned dipoles have less magnetic field than aligned dipoles, so that the sign of the correction might go the other way--- a full hard drive would way less from the reduced dipole interaction strength. Writing 0101010101 would be energetically optimal then. But this argument is confounded by the domain surface energy, which goes the other way. $\endgroup$ – Ron Maimon Jul 5 '12 at 2:22
  • $\begingroup$ @DavidZaslavsky: Please fix two things: 1. it is technically valid to use E=mc^2 in this way, the mass of the hard drive is the equal energy in the hard drive (the hard drive isn't moving, so there isn't even an ambiguity regarding relativistic mass, so it's just true). 2. The calculation you did is wrong--- the dipole dipole interaction gives a different sign from what OP suggested, and domain energy (which is comparable when the hard drive domains are the same as the natural domain structure in the equilibrated drive) goes the way OP says. $\endgroup$ – Ron Maimon Jul 5 '12 at 14:44
  • 1
    $\begingroup$ The interesting question is if it is heavier or it is lighter... need to look up how the data is encoded for storage to answer this one. With some encodings one may have expected energy that will be identical for the hard drive storing a file of zeroes and the one storing a file of ones or 010101s. The coding is rather complicated. edit: see en.wikipedia.org/wiki/Modified_Frequency_Modulation for more information. $\endgroup$ – Dmytry Jul 10 '12 at 22:12

A very similar question is to how much energy (or mass) is required to store some quantity of information, regardless of the format. Whether you store your information with a voltage over a capictor of magnetic domain, to avoid corruption/read errors, the energy to store one bit should be $$E>> kT$$

In general, a good minimum is $E=6kT$. That's $10^{-20}\;\mathrm{J/bit}$ at room temperature, or $10^{-9}\;\mathrm{J} = 10^{-26}\;\mathrm{kg}$ for a 1 TB drive.

Note that this is a much lower number than David Zaslavsky's post. In general, electronic storage and processing uses more energy or power than the thermodynamic limit by many orders of magnitude.

  • 1
    $\begingroup$ All you need are energy barriers to flipping a bit, there doesn't have to be any energy difference between the two states, so the energy change between full and empty can be zero even if the two states don't thermodynamically mix. For example, for an abacus, there's no energy change for sliding the beads, just an enormous barrier to moving them a macroscopic distance thermodynamically. $\endgroup$ – Ron Maimon Jul 10 '12 at 20:00
  • 1
    $\begingroup$ Ron, I believe you're correct, and so my answer might be misleading. I do wonder whether information entropy can be thought of as a source of mass: to order bits, we must do work by removing entropy. Such an explanation would have an order of magnitude similar to my answer. $\endgroup$ – emarti Dec 18 '12 at 8:40
  • $\begingroup$ the problem is that both empty and full have the same information entropy, if you know what bits are written on the drive in both cases. It's not the value, but the randomness, that tells you the entropy. So I can't make sense of any answer except "no, they weigh the same". $\endgroup$ – Ron Maimon Jan 4 '13 at 2:51
  • $\begingroup$ Lay question: what is the ">>" operator? I know two ways to read it ("much greater than" and "right shift bits") but I don't think either of those makes sense. Can you link to a layman-understandable explanation of either the operator or (even better) the equation? $\endgroup$ – Larry OBrien Feb 7 '13 at 19:13
  • $\begingroup$ @OBrien, I mean "much greater than". The energy (or energy barrier) needs to be much greater than the thermal energy to prevent temperature-induced changes in the bits. Since we're thinking in terms of an exponential process, we can satisfy $E>>kT$ with $6 >>1$. $\endgroup$ – emarti Feb 10 '13 at 21:09

Whether your hard drive is "filled" or not, it is formatted. This is how your computer is able to tell how big the drive is, for example. So to answer the question properly requires us to figure out the statistics of the number of digital domains in a freshly formatted drive and compare that with the statistics of the domains in one with (presumably random) data written to it.

A freshly formatted hard disk drive from the factory has zeroes stored in its sectors. See the interesting wikipedia article on formatting, especially this entry. If you wish to erase data on a hard drive it is not enough to "delete" it. One must also write zeroes over it so all those digital domains get stuck back to their newly formatted situation. Those zeroes do not mean that there is no magnetic domain changes. Instead, it means that the domain changes are in a particular pattern that encodes "0" as opposed to "1".

The encoding for hard disks is typically a "run length limited (RLL)" scheme. By "run length" they mean the number of consecutive domains that are oriented in the same direction. The limitation is to prevent this number from being too large as this would allow the hard disk reader to get out of sync with the data. Wikipedia claims that some media are also DC balanced with "some types of recording media", that is, there are just as many domains oriented one way as the other. I haven't seen this in recorded media but this is common to stuff like fast ethernet (PHY chips use it) or digital video standards such as HDMI which uses TMDS.

So the accepted post by David Zaslavsky is incorrect. However, the physics of it is correct and so I voted +1 for it. But this answer gives the "rest of the story"; life is not as simple as it looks sometimes.


A hard drive should not change results in any measurements of mass.

In Fert and Grünberg's original systems, a layer of non-magnetic chromium was sandwiched by layers of ferromagnetic iron. If the atomic spins in successive iron layers were oriented in the same direction, making the overall magnetisation of both layers parallel, electrons could also align their spins and pass through the material with little resistance. But electrical resistance shot up when the second iron layer had itsmagnetisation aligned antiparallel to the first. That's because the electrons which had oriented their spins with one set of iron atoms were then scattered on encountering the next layer. Fert's team used a series of iron layers with alternating magnetisation, which strengthened the effect on electron flow.



The bits are represented by certain orientations of magnetic fields which shouldn't have any effect on the mass.

  • $\begingroup$ They add energy, so they add mass. $\endgroup$ – Ron Maimon Jul 5 '12 at 2:22
  • $\begingroup$ In an "empty" hard drive the magnetic moments are oriended in a way that there is no logical information on the hard drive. If we write something to the hard drive the orientation of the magnetic moments is changed in a way that the computer "understands" it. Changing the orientation of the magnetic moments should not change the mass. $\endgroup$ – L. Hazel Jul 5 '12 at 10:58
  • 2
    $\begingroup$ This is incorrect. Changing the orientation of the magnetic moments changes the energy and therefore changes the mass by a tiny amount. Whether it goes up or down depends on the details $\endgroup$ – Ron Maimon Jul 5 '12 at 14:45
  • $\begingroup$ yes, as magnetic fields have no energy $\endgroup$ – DOS4004 Mar 19 '15 at 18:01
  • $\begingroup$ @RonMaimon, energy does not have mass. $\endgroup$ – fixer1234 Aug 12 '18 at 1:27

The entropy of an ordered drive is necessarily lower than one containing random bits. When one stores information on the drive that order can be observed as localized. Were one to be able to store data without transferring energy to the magnetic bits then the mass would not change. If the drive is in a previously ordered state as it will be if it has already been written to ( including if it was erased) then the information you write may actually create a net loss of order over the prior state. You lose that prior order as net energy to the environment. However, in the absence of a free lunch it would seem to follow that any order of the bits that can be retrieved requires  a higher potential energy state than the absence of that localized information and this has a greater total mass energy.


  • $\begingroup$ There are system for which the maximum of entropy comes before the maximum of energy. Such system necessarily display negative temperatures. $\endgroup$ – dmckee --- ex-moderator kitten Jul 10 '12 at 0:59

the 1s and 0s are not filled up and removed based on removal or deletion of files, this is done in the FAT, no-one who answers you knows what type of charge is a 1 or a 0 in the "hard drive" as we have not specified which hard drive.

so even after the science nerds have come up with some convoluted reason it must be heavier (because electrons have mass), this will be based on the big assumption that there are more electrons in a full hard drive xD

There could very well be more electrons in an empty hard drive, actually though I recon it'll balance out, you see anywhere there is lots of one charge, it tends to repel the charge from the surroundings, the parts we would not measure that are all the many millions of redundant particles between the spaces that we have not yet utilized to store information yet

  • 1
    $\begingroup$ -1: It has nothing to do with extra electrons. The mass is the mass of the extra energy in the drive. This is theoretically interesting--- how much energy difference do you need to store a given amount of data semi-stably? There is a minimum energy required to change data, but barriers to spontaneous erasure can be large, so there is no energy difference which depends on the type of information you store. As far as your reckoning--- if you aren't a science nerd, why would anyone listen to you? $\endgroup$ – Ron Maimon Jul 5 '12 at 14:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.