Is a hard drive heavier when it is full? 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?
 A: 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.
A: 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: 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.
A: A hard drive should not change results in any measurements of mass.  
Background:
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.  
Reference:
http://www.rsc.org/chemistryworld/News/2007/October/09100703.asp
A: The bits are represented by certain orientations of magnetic fields which shouldn't have any effect on the mass.
A: 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.
 
A: 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
