TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How to Convert Bytes to Grams

52 点作者 thatxliner将近 2 年前

14 条评论

schiffern将近 2 年前
How fun!<p>The &quot;natural&quot; way to convert bits to grams (ie not based on any specific technology) would be to combine Landauer&#x27;s Principle and Mass-energy equivalence.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Landauer&#x27;s_principle" rel="nofollow noreferrer">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Landauer&#x27;s_principle</a><p>However even then, you still have to choose a temperature (eg STP) which is ultimately an arbitrary choice.
评论 #36766009 未加载
评论 #36766656 未加载
评论 #36770364 未加载
fragmede将近 2 年前
But printing out the characters onto the page, and calculating what those pages would weight isn&#x27;t the same thing as the change in weight for that ordering of bytes in memory vs a blank page. Where electrons have an infinitesimal but non-zero mass, memory (RAM or storage) thus weighs differently when full of ones vs. zeros. A gzipped copy of PrismJS thus weights somewhere between when the memory is empty vs when it is full. Which, for a 16 MB dimm, is roughly 1.46 x 10^-20 kg, or 14.6 yoctograms. Which is close too, but not literally nothing. For a gzipped copy of PrismJS weighing in at 2 kb, we get 1.87 x 10^-27 kg or 18.7 zeptograms.<p>Where a feather&#x27;s weight is measured in grams, a feather is 0.4 * 10^21 times the weight of PrismJS, or a feather weighs (a <i>lot</i>) more. So their claim is <i>true</i>.<p>Interestingly enough, the same applies to electric cars. Full car batteries weigh an infinitesimally larger amount than empty ones. For a 50 kWh Tesla, we&#x27;re looking at 1.8 nanograms. Which for a battery pack that weighs 324Kg (~750 lb) is less than a rounding error.<p><a href="https:&#x2F;&#x2F;physics.stackexchange.com&#x2F;questions&#x2F;34421&#x2F;does-the-mass-of-a-battery-change-when-charged-discharged#:~:text=Yes%2C%20the%20total%20mass%20of,light%2C%20is%20the%20conversion%20factor" rel="nofollow noreferrer">https:&#x2F;&#x2F;physics.stackexchange.com&#x2F;questions&#x2F;34421&#x2F;does-the-m...</a>.
评论 #36765692 未加载
评论 #36790590 未加载
dools将近 2 年前
It would be interesting to redo the calculation based on the weight change in electronic storage media when data is written versus being zeroed out:<p><a href="https:&#x2F;&#x2F;langa.com&#x2F;index.php&#x2F;2019&#x2F;08&#x2F;29&#x2F;yes-your-hdds-and-ssds-really-do-weigh-more-when-in-use&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;langa.com&#x2F;index.php&#x2F;2019&#x2F;08&#x2F;29&#x2F;yes-your-hdds-and-ssd...</a>
jaclaz将近 2 年前
Only as a side note, one of the good things of the (ISO 216) A format for similar calculations is that the largest one, A0, is defined as being 1 m2 (841x1,189 mm) and since smaller formats are obtained halving the size, the common A4 is the 4th halving, thus it is 1&#x2F;16th of the A0.<p>A sheet of A4 paper 80 gr&#x2F;m2 weights 5 grams, easier.<p>Back to the link, I lost the Author when he uses the &quot;i&quot; and Times New Roman, I would have found the experiment more meaningful if he used a fixed spaced font and thus could print something more than i&#x27;s, and then there is the issue about non-printable characters, if you really want to &quot;print&quot; a program you will need hex, which would at least double the weight of a byte.
评论 #36745264 未加载
necovek将近 2 年前
I kind of wanted to hear about the most &quot;dense&quot; storage mechanism in existence today and to have those compared ;)<p>Eg. a 1TB USB flash (casing removed as long it&#x27;s operational), vs a microSD card vs a NVMe SSD vs a SATA SSD vs a hard drive vs a CD&#x2F;DVD&#x2F;BlueRay vs RAM chips...
HDMI_Cable将近 2 年前
Instead of using MLA, it might have been better to base the amount of text able to fit on the page off of 80-column punch cards or GNU Enscript [1]. I think you would probably get a vastly different number, as that seems more information dense. Also, does the weight of the ink matter at all?<p>---<p>[1]: <a href="https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;enscript&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;enscript&#x2F;</a>
评论 #36765444 未加载
GolDDranks将近 2 年前
I think that filling the page with &quot;i&quot;&#x27;s where an &quot;i&quot; represents a whole byte of a data, is overcounting (as admitted in the article), so I tried with 3320 bytes of base64-encoded data. Two pages and 2&#x2F;3. (Replaced &quot;&#x2F;&quot; with &quot;_&quot; as &quot;&#x2F;&quot; made the lines to break too early.) Here, each letter represents 6 bits, so it&#x27;s clearly undercounting. However the widths of the characters are a bit more realistic, as the narrow &quot;i&quot; is definitely overcounting.
ineedasername将近 2 年前
&gt;Get the amount of data we can put on a agreed-on physical medium<p>I’d go further, figure out the theoretical maximum amount of information that can be stored in a gram of matter and use that. If we’re trying to make a lasting standard then let’s avoid specific storage mediums that may eventually be outdated.<p>Interestingly, this prior HN post nibbles at the question but doesn’t get into what the composition of the volume would need to be to achieve the density they talk about: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=6466430">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=6466430</a>
teddyh将近 2 年前
Technically, doesn’t information have entropy, and therefore mass?
评论 #36765325 未加载
xyzelement将近 2 年前
I feel dumb asking this but how does digital storage work. Is there more charge representing 1s than zeros? Would a drive full of byte 254 be heavier than a zerod out HD?
评论 #36767249 未加载
josefdlange将近 2 年前
I would love to see this conversion made into a webpack plugin that logs out the closest &quot;weight&quot; of your build, sort of like those apps that tell you how &quot;big&quot; your fetus is at certain points on the pregnancy timeline.
avmich将近 2 年前
Just couple of days ago had a discussion about measuring information in units of area. Perhaps spacetime has rest mass after all?
gweinberg将近 2 年前
A gram isn&#x27;t a unit of weight.
评论 #36766441 未加载
评论 #36770049 未加载
tingletech将近 2 年前
Why not use the weight of DNA?