GB 和 GiB 的区别
GB 和 GiB 的区别
Gibibyte (GiB) is one of the standard units used in the field of data processing and data transmission (along with mebibyte (MiB), kibibyte (KiB), etc.). Gibibyte, mebibyte, and kibibyte are defined as powers of 2.
1 GiB equals 230 bytes or 1,073,741,824 bytes. Gibibyte is closely related to gigabyte (GB), which can be a synonym of gibibyte or can refer to 109 bytes or 1,000,000,000 bytes in accordance with International System of Units (SI).
Gigabyte (GB) can have different meanings in different contexts. When referring to computer memory, gigabyte is allways a “power of two” - 1,073,741,824 bytes, but when measuring hard drive capacity it is often defined as 1,000,000,000 bytes. Generally, operating systems calculate disk and file sizes using binary numbers, so a new 500 GB drive you've just purchased would be reported by the OS as "465.66 GB" (meaning 465.66 GiB).
=============== TB GB MB KB =================
1 TB = 1012 bytes = 1000 x 1000 x 1000 x 1000 bytes
1 GB = 109 bytes = 1000 x 1000 x 1000 bytes
1 MB = 106 bytes = 1000 x 1000 bytes
1 KB = 103 bytes = 1000 bytes
============================================
=============== TiB GiB MiB KiB ===============
1 TiB = 240 bytes = 1024 x 1024 x 1024 x 1024 bytes
1 GiB = 230 bytes = 1024 x 1024 x 1024 bytes
1 MiB = 220 bytes = 1024 x 1024 bytes
1 KiB = 210 bytes = 1024 bytes
============================================
1 GiB = 1.073741824 GB
465.66 GiB ≈ 500 GB
总结
GB 是 十进制 的,GiB 才是 二进制 的。
但是现在经常在写法上,习惯用 GB 代替 GiB,导致有些应用场景下,会产生概念上的混淆。
就会导致一个商业误导,商家宣称一个 500 GB 的硬盘,其实只有 465 GB(其实这里的单位应该是GiB) 左右。
有兴趣深入了解的,可以参考如下资料:
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)