Menu

Earn Premium with Referrals

Invite your friends and earn Premium rewards through our referral program.

See how it works and start inviting friends.

Bytes, KB, MB, GB, TB
HLD

Bytes, KB, MB, GB, TB

The unit system every estimate runs on — decimal vs binary prefixes, power-of-two anchors, and record-size intuition.

Two Systems, One Confusion

 DECIMAL (SI) — storage marketing & networking   BINARY (IEC) — memory & OS
 1 KB = 10³  B = 1,000                           1 KiB = 2¹⁰ B = 1,024
 1 MB = 10⁶  B                                   1 MiB = 2²⁰ B ≈ 1.05 MB
 1 GB = 10⁹  B                                   1 GiB = 2³⁰ B ≈ 1.07 GB
 1 TB = 10¹² B                                   1 TiB = 2⁴⁰ B ≈ 1.10 TB

 practical rule for estimation: treat them equal (±7–10% is noise at
 design precision) — but know which one a "1 TB drive" advertises

Cloud storage bills in decimal; RAM sizing lives in binary; the difference never changes an architectural verdict.

Power-of-Two Anchors

Binary fluency speeds every estimate:

PowerValueAnchor
2¹⁰~10³1K
2²⁰~10⁶1M
2³⁰~10⁹1G
2³²~4.3×10⁹32-bit address space / IPv4 count
2⁶⁴~1.8×10¹⁹64-bit space; “never runs out” territory

The 2³² anchor explains real history: IPv4 exhaustion (~4.3B addresses) and the 2038 epoch problem — powers of two are not trivia, they are capacity walls.

Record-Size Intuition

Storage estimates die on bad per-record guesses. Calibrate with typical payloads:

Record typeRealistic size
Session token row~200–500 B
User profile row~1–2 KB
Trip/order record with overhead~1 KB
Chat message~200 B–1 KB
Product catalog entry + metadata~5–20 KB
1080p video minute~50–100 MB
App page HTML~100–500 KB

Rule of thumb for relational rows: count the fields, assume ~50–100 bytes each with overhead, round up. Being within 2x is fine — replication and index multipliers dominate anyway.

Quick Conversions Worth Memorizing

 1 day          = 86,400 s        ≈ 10⁵ s
 1 hour         = 3,600 s         ≈ 4×10³ s
 1 GB/day       ≈ 11.6 µB/s sustained flow... rather:
 1 MB/s sustained × 1 day       ≈ 86 GB/day
 1 Gbps link    = 125 MB/s       ← divide by EIGHT, always
 1 TB           = 1,000,000 MB   = 16 days of 1 MB/s streaming
 
 growth check: X GB/day × 365 ≈ X/1.6 TB/year (mental shortcut)
   e.g., 20 GB/day → ~12.5 TB/year ✓ (matches RideShare math)

Interview Framing

Unit slips destroy credibility faster than wrong conclusions: saying “1 Gbps = 1000 MB/s” ends conversations. Strong candidates convert aloud once (“payloads in bytes, links in bits — dividing by eight”) and then move on. The tested skill isn’t reciting prefixes; it’s producing defensible record sizes and converting them into yearly totals without a calculator.

My Private Notes

Notes are auto-saved locally to this device.