Skip to main content

Bit, Byte & Unit Conversions

Bit & Byte Basics

UnitSymbolIn BitsIn Bytes
Bitb10.125
ByteB81

Further Info: Network speeds use bits/s (Mb/s, Gb/s), storage uses bytes (MB, GB)


Decimal Units (Base 10)

UnitSymbolPowerFactorIn Bytes
KilobytekB10³1,000¹1,000
MegabyteMB10⁶1,000²1,000,000
GigabyteGB10⁹1,000³1,000,000,000
TerabyteTB10¹²1,000⁴1,000,000,000,000
PetabytePB10¹⁵1,000⁵1,000,000,000,000,000

Step: One step is worth '³'
Used by: Hard drive manufacturers, marketing, networking


Binary Units (Base 2)

UnitSymbolPowerFactorIn Bytes
KibibyteKiB2¹⁰1,024¹1,024
MebibyteMiB2²⁰1,024²1,048,576
GibibyteGiB2³⁰1,024³1,073,741,824
TebibyteTiB2⁴⁰1,024⁴1,099,511,627,776
PebibytePiB2⁵⁰1,024⁵1,125,899,906,842,624

Step: One step is worth '¹⁰'
Used by: Operating systems, RAM, actual storage calculations


Conversion Methods

1. Bit ↔ Byte

Bit → Byte

Formula: bits ÷ 8 = bytes

Example: 64 bits → bytes
64 ÷ 8 = 8 bytes

Byte → Bit

Formula: bytes × 8 = bits

Example: 100 bytes → bits
100 × 8 = 800 bits

2. Decimal Units (Using 1,000)

Upward (Smaller → Larger)

Steps: kB → MB → GB → TB → PB
Formula: value ÷ 10^steps

Example: 5,000,000 kB → GB
Steps: kB → MB → GB = 2 steps
5,000,000 kB ÷ 10⁶ = 5 GB

Downward (Larger → Smaller)

Steps: PB → TB → GB → MB → kB
Formula: value × 10^steps

Example: 2 TB → MB
Steps: TB → GB → MB = 2 steps
2 TB × 10⁶ = 2,000,000 MB

3. Binary Units (Using 1,024)

Upward (Smaller → Larger)

Steps: KiB → MiB → GiB → TiB → PiB
Formula: value ÷ 2^steps

Example: 6,800,000 KiB → GiB
Steps: KiB → MiB → GiB = 2 steps
6,800,000 KiB ÷ 2²⁰ = 6.485 GiB

Downward (Larger → Smaller)

Steps: PiB → TiB → GiB → MiB → KiB
Formula: value × 2^steps

Example: 3 GiB → KiB
Steps: GiB → MiB → KiB = 2 steps
3 GiB × 2²⁰ = 3,145,728 KiB

4. Decimal ↔ Binary Conversion

Decimal → Binary (e.g., MB → MiB)

Formula: (decimal value) ÷ 1.024^steps ≈ binary value

Example: 1,000 MB → MiB
Steps: Both are "Mega" level = same position, but different base
1,000 MB ÷ 1.024 ≈ 976.56 MiB

Alternative (precise):
1,000 MB * 10⁶ = 1,000,000,000 bytes
1,000,000,000 bytes ÷ 2¹⁰ = 953.67 MiB

Binary → Decimal (e.g., GiB → GB)

Formula: (binary value) × 1.024^steps ≈ decimal value

Example: 500 GiB → GB
Steps: Both are "Giga" level = same position, but different base
500 × 1.024 ≈ 512 GB

Alternative (precise):
500 GiB * 2³⁰ = 536,870,912,000 bytes
536,870,912,000 bytes ÷ 10⁹ = 536,87

Quick Reference

Conversion TypeFormulaExample
Bit → Byte÷ 81,000 b → 125 B
Byte → Bit× 8125 B → 1,000 b
Decimal Up÷ 10^steps5,000 MB → 5 GB
Decimal Down× 10^steps2 TB → 2,000,000 MB
Binary Up÷ 2^steps2,048 KiB → 2 MiB
Binary Down× 2^steps3 GiB → 3,145,728 KiB
MB → MiB÷ 1.0241,000 MB ≈ 976.56 MiB
GiB → GB× 1.024500 GiB ≈ 512 GB

Common Pitfalls

  • Don't mix units: 1 GB ≠ 1 GiB (1 GB = 0.931 GiB)
  • Marketing trick: A "500 GB" hard drive is actually ~465.66 GiB
  • Network speeds: 100 Mb/s ≠ 100 MB/s (100 Mb/s = 12.5 MB/s)