数据存储转换器
将位数、字节、 KB、 MB、 GB、 TB 和 二进制单位之间的数字存储转换为 。
输入结果时更新 。
关于此计算器
A data storage converter changes a digital size between bits and bytes and their multiples, converting through the byte as a common base. It covers both the decimal SI units — kilobyte, megabyte, gigabyte, terabyte and petabyte, each a power of 1,000 — and the binary IEC units — kibibyte, mebibyte, gibibyte and so on, each a power of 1,024.
Keeping the two families apart is the whole point: 1 KB is 1,000 bytes but 1 KiB is 1,024 bytes, and the gap widens at each step, reaching about 10% by the terabyte. There are always 8 bits in a byte, whichever family you use.
Worked example: to convert 500 megabytes to gigabytes in SI units, divide by 1,000, giving 0.5 GB. To see why a "1 TB" drive shows as about 931 GiB, divide 1,000,000,000,000 bytes by 1,073,741,824, the number of bytes in a gibibyte. A results table lists the size in every unit at once, handy for sizing downloads, disks and bandwidth.
经常问到的问题
千字节1000还是1024字节?
它取决于单位。 SI 千字节( KB) 是一个1,000字节, 而二进制 Kibibyte (KB) 是一个1,024字节。 存储通常以小数单位出售, 并由二进制软件报告, 这就是为什么“ 1 TB” 驱动器显示为~ 931 GIB 。
字节里有多少位元?
字节中有8位元。 网络速度通常以每秒位数引用, 所以100 Mbps 链接最多传输大约每秒12.5 MB。
千兆字节里有多少兆字节?
以小数SI单位计,1GB=1,000 MB。在二进制单位,1GB=1,024 MiB。
为什么我的硬盘显示的空间比广告少?
Manufacturers sell drives in decimal units (a "1 TB" drive is 1,000,000,000,000 bytes), but many operating systems report size in binary units. Dividing by 1,073,741,824 turns that 1 TB into about 931 GiB, so no space is actually missing.
我如何将兆位转换为兆位?
将兆位除以 8, 因为字节为 8 位数 。 因此, 100 Mbps 连接最多每秒传输约 12 5兆位数, 而这个数据存储转换器处理比特和字节时的比例为 8比1 。
兆字节和兆字节有什么区别?
A megabyte (MB) is 1,000,000 bytes, while a mebibyte (MiB) is 1,048,576 bytes (1,024²). The binary mebibyte is about 4.9% larger.
API - 使用代码中的计算器
将此计算器称为自由 JSON 端点 。 不需要按键 。 将字段值发送到下面作为查询参数或 JSON 。 任何您省略的, 都会使用相同的默认值, 此页面预填的默认值是预填的; 未知参数是 400, 而不是静音零 。 读取 API 全部文件 →
终点
GET https://calculator.free/api/v1/data-storage/
curl
curl "https://calculator.free/api/v1/data-storage/?amount=1&from=mb&to=gb"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/data-storage/?" + new URLSearchParams({
"amount": "1",
"from": "mb",
"to": "gb"
}));
const data = await r.json();
console.log(data.results);
成果仅是一般指导的估计数,而不是财务、医疗或税务咨询。