Data Converter
Data Converter
Bits, bytes, and the two definitions of a megabyte
Digital storage has two incompatible conventions, and both are in daily use. The binary convention treats each step as a factor of 1,024, because computers address memory in powers of two. The decimal convention treats each step as a factor of 1,000, like every other metric prefix. They agree at the byte and diverge from there: by 2.4% at the kilobyte, and by 10% at the terabyte.
This converter uses the binary convention: 1 KB is 1,024 bytes, 1 MB is 1,024 KB, and so on. That is what operating systems report and what the JEDEC memory standards specify. Drive manufacturers use the decimal convention, which is the whole reason a new "1 TB" drive shows up as 931 GB.
Formulas
Worked examples
| From | To | Result |
|---|---|---|
| 1 byte | bit | 8 bit |
| 1 MB | byte | 1,048,576 byte |
| 1 GB | MB | 1,024 MB |
| 1,500 MB | GB | 1.46484 GB |
| 1 TB | GB | 1,024 GB |
Results are computed with the same factors the converter above uses, rounded to six significant figures.
Binary steps
| byte | KB | MB |
|---|---|---|
| 1,024 | 1 | 0.000976563 |
| 10,240 | 10 | 0.00976563 |
| 1,048,576 | 1,024 | 1 |
| 5,242,880 | 5,120 | 5 |
| 104,857,600 | 102,400 | 100 |
Every row is an exact power-of-two figure, which is why the byte counts look arbitrary and the results are round.
Worth knowing
- The IEC introduced unambiguous binary prefixes in 1998: kibibyte (KiB), mebibyte (MiB), gibibyte (GiB), tebibyte (TiB). They are exact and never ambiguous, but adoption outside Linux has been poor.
- A decimal "1 TB" drive holds 1,000,000,000,000 bytes, which is 931.32 GiB. Windows reports that as "931 GB" because it labels binary units with decimal names.
- macOS switched to decimal reporting in 10.6, so the same drive reads as 1 TB there and 931 GB on Windows. Neither is lying; they are using different definitions of the same abbreviation.
- Network speeds are quoted in bits per second, not bytes. A 100 Mbps connection transfers about 12.5 MB per second at best. The lowercase b is doing a lot of work.
Frequently asked questions
- Why does my 1 TB drive show as 931 GB?
- The manufacturer sold you 1,000,000,000,000 bytes, using the decimal definition where a terabyte is a trillion bytes. Windows divides by 1,024 three times and calls the result GB, giving 931.32. No space is missing: the two are the same number of bytes described under different conventions.
- What is the difference between KB and KiB?
- A kibibyte (KiB) is exactly 1,024 bytes and is never ambiguous. A kilobyte (KB) means 1,024 bytes in memory contexts and 1,000 bytes in storage and networking contexts. The IEC created the KiB/MiB/GiB names in 1998 precisely to remove that ambiguity.
- Is a byte always 8 bits?
- In any system you are likely to meet, yes. Historically it was not: machines with 6, 7 and 9 bit bytes all shipped, which is why standards documents use "octet" when they need to be unambiguous about exactly 8 bits.
- Why is my 100 Mbps connection only downloading at 12 MB/s?
- Because it is doing exactly what it says. Network rates are in megabits per second and file transfers are shown in megabytes per second, and there are 8 bits in a byte. 100 Mbps is 12.5 MB/s before protocol overhead, so 12 MB/s is close to the theoretical maximum.