Storage Units: Bits, Bytes and Prefixes

Every file, photo and app on a device takes up space measured in storage units. You meet them when you compare phone plans, check whether a game fits on a drive, or estimate how long a download will take. This lesson builds the ladder of units from a single bit up to terabytes and shows how to convert between them without mixing up the two prefix systems.

Bits and bytes

A bit is the smallest unit of data: a single binary digit that holds either 0 or 1. One bit can only tell two states apart, so computers group bits together. Four bits make a nibble, and eight bits make a byte, the basic unit used to measure file sizes and memory. One byte has 28 = 256 possible patterns, enough to store a whole number from 0 to 255.


bits=8×bytesbytes=bits8\text{bits} = 8 \times \text{bytes} \qquad \text{bytes} = \frac{\text{bits}}{8}


Example: A 12-byte message holds 12 × 8 = 96 bits, and a stream of 40 bits fills 40 ÷ 8 = 5 bytes.



Decimal and binary prefixes

Large quantities need prefixes, and two systems are in use. The SI prefixes kilo, mega, giga and tera are powers of 1000, just as in kilometre or megawatt. Because memory is addressed in binary, computers also count in powers of 2, and the IEC binary prefixes kibi, mebi, gibi and tebi are powers of 1024 = 210.


Decimal unit

Size in bytes

Binary unit

Size in bytes

kilobyte (kB)

103=100010^3 = 1000

kibibyte (KiB)

210=10242^{10} = 1024

megabyte (MB)

106=1 000 00010^6 = 1\,000\,000

mebibyte (MiB)

220=1 048 5762^{20} = 1\,048\,576

gigabyte (GB)

10910^9

gibibyte (GiB)

230=1 073 741 8242^{30} = 1\,073\,741\,824

terabyte (TB)

101210^{12}

tebibyte (TiB)

240≈1.10×10122^{40} \approx 1.10 \times 10^{12}


The two systems start close together and drift apart: a kibibyte is 2.4% larger than a kilobyte, a gibibyte is 7.4% larger than a gigabyte, and a tebibyte is about 10% larger than a terabyte. That gap is why a drive sold as 1 TB shows up as roughly 931 GiB on a computer that counts in binary units. No storage is missing; the same bytes are divided by a larger unit.



Converting between units

Every conversion is a multiplication or a division by a known factor.

  • Moving to a smaller unit (GB to MB, bytes to bits): multiply, because you need more of the smaller units.
  • Moving to a larger unit (MB to GB, bits to bytes): divide.
  • Switching systems (GB to GiB): convert to bytes first, then divide by the size of the new unit in bytes.

Example: A 2 GB file holds 2 × 109 = 2,000,000,000 bytes. In gibibytes that is 2,000,000,000 ÷ 1,073,741,824 ≈ 1.86 GiB.


Going through bytes keeps each step to one factor, so you never multiply by 1000 at one level and by 1024 at another. The same habit handles download times. Network speeds are quoted in bits per second, so convert the file size to bits before dividing:


t=file size in bitstransfer rate in bits per secondt = \frac{\text{file size in bits}}{\text{transfer rate in bits per second}}


Example: Ignoring network overhead, a 250 MB file is 250 × 106 × 8 = 2 × 109 bits. At 25 Mbps, or 25 × 106 bits per second, it downloads in 2 × 109 ÷ (25 × 106) = 80 s.

What to remember

  • A bit is one binary digit; 4 bits make a nibble and 8 bits make a byte.
  • Lowercase b is bits, uppercase B is bytes; multiply bytes by 8 to get bits.
  • kB, MB, GB and TB step by 1000; KiB, MiB, GiB and TiB step by 1024.
  • To switch between systems, convert to bytes first, then divide by the new unit.
  • Download time is file size in bits divided by rate in bits per second.

Example: Filling a New Phone

A phone is advertised with 128 GB of storage. Its owner wants to know what the phone will display and how quickly it can be filled. Use decimal prefixes for GB and MB, binary prefixes for GiB, treat Mbps as megabits per second, and ignore network overhead.


a) How many bytes does the advertised 128 GB represent?


Giga is the decimal prefix for 109, so 1 GB is ________.


128 GB=128×109 bytes=128 000 000 000 bytes128\ \text{GB} = 128 \times 10^9\ \text{bytes} = 128\,000\,000\,000\ \text{bytes}


The phone holds 128,000,000,000 bytes, or 1.28 × 1011 bytes.


b) The phone's settings screen counts in gibibytes. What capacity does it show, to one decimal place?


One gibibyte is 230 bytes, which is ________. Divide the byte count from part a) by this unit:


128 000 000 000 bytes1 073 741 824 bytes/GiB=119.209…≈119.2 GiB\frac{128\,000\,000\,000\ \text{bytes}}{1\,073\,741\,824\ \text{bytes/GiB}} = 119.209\ldots \approx 119.2\ \text{GiB}


The screen shows about 119.2 GiB. The bytes are the same; the gibibyte is about 7.4% larger than the gigabyte, so the number is smaller.


c) The owner downloads a 2.4 GB movie over a connection that delivers a steady 80 Mbps. How long does the download take?


The rate is in bits per second, so convert the file size to bits. The file holds 2.4 × 109 bytes, which is ________ after multiplying by 8. The rate of 80 Mbps is ________.


t=19 200 000 000 bits80 000 000 bits/s=240 st = \frac{19\,200\,000\,000\ \text{bits}}{80\,000\,000\ \text{bits/s}} = 240\ \text{s}


The download takes 240 s, which is 4 minutes. Forgetting the factor of 8 would give 30 s, eight times too fast.


d) After installing apps and the movie, 30 GB remain free. How many 4.5 MB photos can still be stored?


Express both sizes in bytes: 30 GB is 30,000,000,000 bytes and one photo is ________. Dividing gives about ________ photos.


30 000 000 000 bytes4 500 000 bytes per photo=6666.6‾\frac{30\,000\,000\,000\ \text{bytes}}{4\,500\,000\ \text{bytes per photo}} = 6666.\overline{6}


A fraction of a photo cannot be stored, so round down: the phone holds 6666 more photos. Rounding up to 6667 would need 30,001,500,000 bytes, more than is free.

Match each storage unit with its description. Each description applies to exactly one unit, and both a decimal prefix and a binary prefix appear in the list.

Match each term
A.

Exactly 1024 bytes, using the binary IEC prefix

B.

A group of 4 binary digits, half the size of a byte

C.

A group of 8 binary digits, the basic unit for file sizes

D.

A single binary digit that stores either 0 or 1

E.

Exactly 1000 bytes, using the decimal SI prefix

Nibble

Kilobyte (kB)

Byte

Bit

Kibibyte (KiB)

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Complete the conversion table. Use 1 byte = 8 bits, treat kB, MB and GB as powers of 1000, and treat KiB as a power of 1024. Enter each converted value as a whole number with no unit.

Given quantityTarget unitConverted value
6 bytesbits
72 bitsbytes
3 kBbytes
3 KiBbytes
7 MBkB
0.25 GBMB
2 KiBbits

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A weather station stores each temperature reading as a fixed 12-bit pattern and records 2000 readings per day. Write each answer as a whole number without commas or units, using 1 kB = 1000 bytes.


Each reading can take one of distinct values. One day's readings occupy bits, which is bytes, or kB.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Extra Practice