Skip to main content
Numverto logo NUMVERTO
Published: 5 min read By
binary computer science memory storage

Bits, Bytes, KB, MB, GB — Computer Memory Units Explained

Understand computer memory units from bits to terabytes. Learn binary vs decimal prefixes, conversion formulas, and real-world storage examples.

Introduction

Every file on your computer, every photo on your phone, and every web page you load is stored as a sequence of binary digits. Understanding memory units — from the tiny bit to the massive terabyte — is fundamental knowledge for any computer science student or IT professional.

This guide explains the hierarchy of memory units, clears up the confusing difference between binary and decimal prefixes, and gives real-world context for each size.

The Bit — Smallest Unit

A bit (binary digit) is a single 0 or 1. It represents one yes/no, on/off, true/false decision. All digital data is built from bits.

A byte = 8 bits. One byte can represent 256 different values (2⁸ = 256), enough for one ASCII character.

Memory Unit Hierarchy

Binary Prefixes (Powers of 1024)

UnitAbbreviationSizeExact Value
ByteB8 bits8 bits
KilobyteKB1,024 bytes2¹⁰ bytes
MegabyteMB1,024 KB2²⁰ bytes
GigabyteGB1,024 MB2³⁰ bytes
TerabyteTB1,024 GB2⁴⁰ bytes

Decimal Prefixes (Powers of 1000)

Hard drive manufacturers and network speeds use decimal (SI) prefixes:

UnitSize (decimal)Difference from binary
1 KB (SI)1,000 bytes2.4% less than binary KB
1 MB (SI)1,000,000 bytes4.9% less
1 GB (SI)1,000,000,000 bytes7.4% less
1 TB (SI)1,000,000,000,000 bytes9.9% less

This is why a “500 GB” hard drive shows ~465 GB in your operating system — the drive uses decimal measurement, but your OS uses binary.

Binary vs Decimal: Why the Confusion?

Historically, computer scientists used KB/MB/GB with binary meanings (1024-based). Storage manufacturers used the same abbreviations with decimal meanings (1000-based). To resolve this, IEC introduced distinct binary prefixes:

Binary (IEC)SymbolDecimal (SI)Symbol
KibibyteKiBKilobyteKB
MebibyteMiBMegabyteMB
GibibyteGiBGigabyteGB
TebibyteTiBTerabyteTB

In practice, most people still say “GB” for both. Context determines which meaning applies.

Conversion Formulas

Bits to Bytes: divide by 8 Bytes to KB: divide by 1024 (binary) or 1000 (decimal) KB to MB: divide by 1024 MB to GB: divide by 1024

Example: How many bytes in 4 GB?

4 GB (binary) = 4 × 1024 × 1024 × 1024 = 4,294,967,296 bytes 4 GB (decimal) = 4 × 1000 × 1000 × 1000 = 4,000,000,000 bytes

Real-World Examples

ItemApproximate Size
One character (ASCII)1 byte
One page of text~2 KB
MP3 song (4 min)~4 MB
Smartphone photo~3–5 MB
HD movie (2 hrs)~4–5 GB
Windows 11 install~64 GB
Modern SSD256 GB – 2 TB

Network Speeds: Bits vs Bytes

Internet speeds are measured in bits per second (bps, Mbps, Gbps), NOT bytes:

  • 100 Mbps connection = 100 megabits/second = ~12.5 MB/second
  • To convert: divide Mbps by 8 to get MB/s

This is why downloading a 100 MB file on a “100 Mbps” connection takes about 8 seconds, not 1 second.

Common Mistakes

  1. Confusing bits and bytes — 1 byte = 8 bits, not the same thing
  2. Using 1000 when you mean 1024 — OS uses binary (1024), drives use decimal (1000)
  3. Mixing network bits with storage bytes — Download speed in Mbps ÷ 8 = MB/s actual transfer
  4. Assuming “free” storage matches label — OS, system files, and formatting overhead reduce usable space

Frequently Asked Questions

Why is 1 KB equal to 1024 bytes and not 1000?

Because computers use binary (base 2). 2¹⁰ = 1024, which is the closest power of 2 to 1000. Computer memory is naturally organized in powers of 2.

How many bytes in 1 GB?

In binary: 1 GB = 1,073,741,824 bytes (1024³). In decimal: 1 GB = 1,000,000,000 bytes (1000³). Your OS typically uses binary.

Why does my 1 TB drive show only 931 GB?

The manufacturer measures in decimal (1 TB = 1,000,000,000,000 bytes), but your OS displays in binary (÷ 1024³ = 931.3 GiB). No storage is “missing.”

What is the difference between RAM and storage?

RAM (volatile) loses data when powered off and is faster. Storage (SSD/HDD, non-volatile) keeps data permanently but is slower. Both are measured in bytes.

How much storage does one WhatsApp message use?

A text message uses about 1–2 KB. A photo message uses 100–500 KB (compressed). A voice note uses about 5–15 KB per second.

Advertisement

Share this article

Learn Faster with Numverto

Explore free number system converters, binary tools, EMI calculators, GST calculators, and educational guides.

About Numverto

Numverto logo

Numverto Editorial Team

Numverto publishes educational content about number systems, computer science concepts, binary arithmetic, financial calculations, EMI formulas, GST calculations, and practical learning resources for students and professionals.

About | Contact | Editorial Policy

Article Metadata

Tags: binary, computer science, memory, storage

Last Updated: June 2026

Related Calculators

Advertisement

Related Articles

Popular Tools

View all 13 free tools → · Read tutorials · Number system guide