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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: How many bytes are in a kilobyte?

5 点作者 daviddavis超过 3 年前
This topic came up recently at work and I had always considered a kilobyte to be 1,024 bytes. However, SI seems to differentiate between a kilobyte and kibibyte (the latter being 1,024 bytes):<p>https:&#x2F;&#x2F;physics.nist.gov&#x2F;cuu&#x2F;Units&#x2F;binary.html<p>I&#x27;m curious how other developers define kilobytes&#x2F;megabytes&#x2F;etc.

4 条评论

thesuperbigfrog超过 3 年前
<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Byte" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Byte</a> discusses the definitions recognized by different standards organizations and history of bytes and derived units.<p>I personally prefer the base-2 definitions despite the fact that they do not follow metric prefix naming.<p>The standard metric prefixes would make more sense if 10-bit bytes were used (one byte == one decabit == 10 bits).<p>That begs the question: Should we have metric bytes?
mytailorisrich超过 3 年前
&quot;Traditionally&quot;, memory&#x2F;storage uses kilo=1024, etc, and data transmission uses kilo=1000. So 32kB RAM means 32,768 bytes and 32 kbps means 32,000 bits per second.<p>Then at some point hard disk manufacturers decided to change and to use SI prefixes as well. Iirc that was when off-the-shelf HDDs reached GB scale.<p>This all lead to the creation of kibibytes, etc. which I think is clear and solves the confusion created by effectively using SI prefixes incorrectly.
评论 #29800097 未加载
mattl超过 3 年前
Kibibyte exists because some take kilobyte to mean 1000 not 1024.<p>I think hard disk makers have been using 1000 for some time.
taubek超过 3 年前
I&#x27;ve finished my high school in mid 90&#x27;s. For me kb=1024 bytes. At that time there was no kibi bytes anywhere in the literature.