Binary vs. Decimal Storage Units (GiB vs. GB) and Number Systems (Binary, Octal, Hex) Explained
Brian De Vivar
• Tech Contributor at BrainyToolsReviewed by Brian De Vivar — software developer & computer science educator with 20+ years of experience building software and teaching networking & systems engineering.

You buy a brand-new 1 TB NVMe SSD, plug it into Windows, format it, and File Explorer reports 931 GB of usable space. Did the manufacturer shortchange you by 69 gigabytes?
No—you just ran straight into the classic clash between SI decimal prefixes (powers of $1000$) and IEC binary prefixes (powers of $1024$). In this guide, we clarify the exact math behind GB vs. GiB, bits vs. bytes, and how Binary (base-2), Octal (base-8), Decimal (base-10), and Hexadecimal (base-16) fit together in everyday engineering. You can verify any value live with the Data Size Converter and Number Base Converter.
Why a "1 TB" Drive Shows 931 GiB
Storage manufacturers follow the International System of Units (SI), where each step multiplies by $1000 = 10^3$. Operating systems like Windows and memory tools historically measure storage in powers of two, where each step multiplies by $1024 = 2^{10}$ (standardized by the IEC as KiB, MiB, GiB, TiB):
| Unit (SI Decimal) | Exact Bytes | Unit (IEC Binary) | Exact Bytes | Difference |
|---|---|---|---|---|
| 1 KB (Kilobyte) | $10^3 = 1,000$ | 1 KiB (Kibibyte) | $2^{10} = 1,024$ | +2.4% |
| 1 MB (Megabyte) | $10^6 = 1,000,000$ | 1 MiB (Mebibyte) | $2^{20} = 1,048,576$ | +4.9% |
| 1 GB (Gigabyte) | $10^9 = 1,000,000,000$ | 1 GiB (Gibibyte) | $2^{30} = 1,073,741,824$ | +7.4% |
| 1 TB (Terabyte) | $10^{12} = 1,000,000,000,000$ | 1 TiB (Tebibyte) | $2^{40} = 1,099,511,627,776$ | +10.0% |
Now do the division for your 1 TB SSD:
$$\frac{1,000,000,000,000\text{ bytes}}{1,073,741,824\text{ bytes/GiB}} \approx \mathbf{931.32\text{ GiB}}$$
Every single byte is there—Windows simply labels GiB as GB, whereas macOS and Ubuntu switched to decimal GB for disk sizes so the number matches the drive box.
Don't Confuse Bits (b) with Bytes (B)
Network speeds are almost always quoted in bits per second (Mbps, Gbps), while file sizes are measured in bytes (MB, GB), where 1 byte = 8 bits. A 1 Gbps fiber connection has a theoretical maximum download rate of:
$$\frac{1000\text{ Mbps}}{8} = \mathbf{125\text{ MB/s}}$$
After TCP/IP and Ethernet framing overhead (~5%), real-world throughput tops out around 115–118 MB/s. Use the Data Size Converter to switch cleanly between bits, bytes, SI decimal units, and IEC binary units.
Number Systems Explained: Binary, Octal, Decimal & Hexadecimal
Computers store every instruction, IP address, color channel, and character as voltage states representing bits (0 and 1). Reading 32 or 64 raw bits is error-prone for humans, so engineers group bits into Octal (3 bits per digit) or Hexadecimal (4 bits per digit):
| Decimal (Base 10) | Binary (Base 2) | Octal (Base 8) | Hexadecimal (Base 16) |
|---|---|---|---|
0 |
0000 |
0 |
0 |
7 |
0111 |
7 |
7 |
8 |
1000 |
10 |
8 |
10 |
1010 |
12 |
A |
15 |
1111 |
17 |
F |
255 |
11111111 |
377 |
FF |
The 4-Bit Nibble Trick (Binary ↔ Hexadecimal)
Because $16 = 2^4$, one hexadecimal digit maps to exactly four binary bits (one nibble). You never need to convert through decimal first!
For example, to convert 1100 1010 1111 1110 to hexadecimal:
1100=12=C1010=10=A1111=15=F1110=14=E- Result:
0xCAFE
Where Each Base Shows Up in Real Engineering
- Binary (Base 2): IPv4 subnet masks, bitwise flags, CPU registers, and network ACL wildcards (try practicing with the IPv4 Subnet Calculator).
- Octal (Base 8): Unix/Linux file permissions (
chmod 755=111 101 101=rwxr-xr-x, where each octal digit encodes Read=4, Write=2, Execute=1). - Hexadecimal (Base 16): CSS colors (
#4F46E5), MAC addresses (00:1A:2B:3C:4D:5E), IPv6 addresses, SHA-256 digests, and memory addresses.
Worked Conversion Examples (Step by Step)
Example 1: Decimal to Binary Using Repeated Division by 2
Convert 192₁₀ (a classic Class C IPv4 first octet) to binary:
| Step | Division | Quotient | Remainder (Bit) |
|---|---|---|---|
| 1 | 192 ÷ 2 |
96 |
0 (LSB) |
| 2 | 96 ÷ 2 |
48 |
0 |
| 3 | 48 ÷ 2 |
24 |
0 |
| 4 | 24 ÷ 2 |
12 |
0 |
| 5 | 12 ÷ 2 |
6 |
0 |
| 6 | 6 ÷ 2 |
3 |
0 |
| 7 | 3 ÷ 2 |
1 |
1 |
| 8 | 1 ÷ 2 |
0 |
1 (MSB) |
Reading the remainders from bottom to top gives 11000000₂ ($128 + 64 = 192$).
Example 2: Hexadecimal to Decimal (CSS Color Channel)
Convert the indigo blue channel 0xE5 from #4F46E5 to decimal:
$$(\text{E} \times 16^1) + (5 \times 16^0) = (14 \times 16) + 5 = 224 + 5 = \mathbf{229_{10}}$$
Doing the same for 4F (79) and 46 (70) reveals that #4F46E5 is identically rgb(79, 70, 229). You can test hex-to-RGB color math directly in the Color Space Converter.
Example 3: Cloud Storage & Transfer Time Budget
Suppose your backup job archives 250 GiB of PostgreSQL snapshots over a sustained 500 Mbps private link:
- Convert 250 GiB to decimal bytes:
$$250 \times 1{,}073{,}741{,}824 = 268{,}435{,}456{,}000\text{ bytes} \approx 268.44\text{ GB}$$ - Convert 500 Mbps to bytes per second:
$$\frac{500 \times 10^6\text{ bits/s}}{8} = 62{,}500{,}000\text{ bytes/s} = 62.5\text{ MB/s}$$ - Divide total size by throughput:
$$\frac{268{,}435\text{ MB}}{62.5\text{ MB/s}} \approx 4{,}295\text{ seconds} \approx \mathbf{71.6\text{ minutes}}$$
Forgetting either the GiB → GB factor (+7.4%) or the bits → bytes factor (8×) is the #1 cause of blown cloud backup windows and missed SLA estimates.
Common Pitfalls in Cloud & Systems Engineering
- Mixing
MBandMiBin Kubernetes manifests: Kubernetes explicitly distinguishes decimalM(1000²bytes) from binaryMi(1024²bytes) inresources.limits.memory. Writing512Minstead of512Migives your container ~24 MB less RAM than expected—sometimes enough to trigger anOOMKilledexit. - Forgetting filesystem & over-provisioning overhead: Even after converting 1 TB to 931.32 GiB, formatting with NTFS, APFS, or ext4 reserves metadata tables (inodes, journals, reserved root blocks), leaving roughly 900–920 GiB of immediately writable space.
- Confusing
0xand0oprefixes in code: In JavaScript, Python, and C-family languages,0x10is hexadecimal (16),0o10is octal (8), and0b10is binary (2). A legacy leading zero like010can behave unpredictably in non-strict parsers—always use explicit prefixes.
Frequently Asked Questions (FAQ)
Why did the IEC invent KiB, MiB, and GiB?
Before 1998, "kilobyte" meant 1,000 bytes to hard-drive and telecom engineers, but 1,024 bytes to RAM and OS engineers. The International Electrotechnical Commission (IEC) introduced unambiguous binary prefixes (kibi-, mebi-, gibi-, tebi-) so specifications, cloud billing, and operating systems can state exact byte counts without confusion.
Is RAM measured in GB (1000) or GiB (1024)?
Physical RAM modules (DDR4/DDR5) are built on binary address buses, so a "16 GB" stick of RAM always contains $16 \times 2^{30} = 17{,}179{,}869{,}184$ bytes (16 GiB). Storage drives (SSDs, HDDs, SD cards) use decimal GB ($10^9$ bytes).
Why is hexadecimal preferred over binary for memory addresses and MAC addresses?
A 48-bit Ethernet MAC address takes 48 ones and zeros in binary, which is nearly impossible to read or dictate without errors. Grouping into 4-bit nibbles shrinks it to 12 crisp hexadecimal digits (e.g., 00:1A:2B:3C:4D:5E) while keeping bit-level conversion effortless.
Practice & Convert Instantly
Switch between Binary, Octal, Decimal, and Hexadecimal (including arbitrary large values) in the Number Base Converter, or calculate exact cloud storage and bandwidth budgets in the Data Size Converter.