Data Conversions
Data
Digital data is stored and transmitted in binary units, with the bit (b) — representing a single binary digit, either 0 or 1 — as the fundamental unit of information. Eight bits constitute one byte (B), a grouping that emerged from the practical need to encode 256 distinct characters (2⁸ = 256) to cover the ASCII character set. The byte remains the foundational unit for measuring file sizes, memory capacity, and data transfer rates.
Above the byte, two parallel systems of naming exist and are frequently confused. The SI decimal system uses prefixes based on powers of ten: 1 kilobyte (KB) = 1,000 bytes, 1 megabyte (MB) = 1,000,000 bytes, and so on. The binary system, preferred in computer architecture, uses powers of two: 1 kibibyte (KiB) = 1,024 bytes, 1 mebibyte (MiB) = 1,048,576 bytes. Hard drive manufacturers typically use decimal prefixes, while operating systems historically used binary values while applying SI labels — the source of the persistent discrepancy between advertised and reported storage capacities.
Data transfer speeds are measured in bits per second (bps), not bytes, which explains why a 100 Mbps internet connection downloads a 100 MB file in approximately 8 seconds rather than one. Understanding the relationship between bits and bytes, and between decimal and binary prefixes, is essential knowledge in computer science, networking, and digital systems engineering.
Popular Comparisons
| KB | MB | GB | TB | |
|---|---|---|---|---|
| Plain text email | 5 | 0.005 | 0.000005 | — |
| MP3 song | 4,096 | 4 | 0.004 | — |
| HD photo | 5,120 | 5 | 0.005 | — |
| HD movie (2h) | 5,242,880 | 5,120 | 5 | 0.005 |
| iPhone storage | 131,072,000 | 128,000 | 128 | 0.128 |
Frequently Asked Questions (FAQ)
How many megabytes are in a gigabyte?
In the decimal system (used by hard drive manufacturers and storage marketing), 1 GB equals exactly 1,000 MB. In the binary system used by operating systems, 1 GiB (gibibyte) equals 1,024 MiB (mebibytes). This discrepancy is why a "1 TB" hard drive appears as roughly 931 GB in Windows or macOS — the drive uses decimal, the OS reports in binary.
What is the difference between a kilobyte (KB) and a kibibyte (KiB)?
A kilobyte (KB) in the SI decimal system equals exactly 1,000 bytes. A kibibyte (KiB) in the IEC binary system equals 1,024 bytes. The IEC introduced the binary prefixes (KiB, MiB, GiB) in 1998 to end the confusion, but the industry still uses KB and MB loosely to mean either value. When precision matters — such as in networking or operating system specifications — always check whether decimal or binary is intended.