1.4.1 How Computers Measure Storage
A wildlife research team collects sensor readings, short audio recordings and thousands of photographs. The files do not all require the same amount of storage, so describing every quantity using only bits or bytes would quickly produce inconveniently large numbers.
Storage units provide a clearer way to express these quantities. Small values may be measured in bits or bytes, while larger collections may be measured in kibibytes, mebibytes, gibibytes or even larger units.
By the end of this section, you should be able to:
- define the main units used to measure digital storage;
- distinguish a bit, nibble and byte;
- state the relationship between consecutive binary storage units;
- use KiB, MiB, GiB, TiB, PiB and EiB correctly;
- convert storage quantities into a larger or smaller unit;
- select the correct operation when moving through the storage-unit hierarchy;
- compare storage quantities by first expressing them in the same unit;
- give a final answer in the unit requested.
Why storage needs different units
All digitally stored information is ultimately represented using bits. However, describing a large file by writing its total number of bits can make the quantity difficult to read and compare.
Storage units group smaller quantities together. This is similar to using metres instead of millimetres for a long distance: the underlying quantity does not change, but the chosen unit makes it easier to communicate.
Storage unit 存储单位: a named quantity used to measure an amount of digital data.
| Stored item or capacity | Possible useful unit | Reason |
|---|---|---|
| One binary state | bit | The quantity contains one binary digit |
| A short code or tiny data field | byte | The value is small enough to describe using a few bytes |
| A small document | KiB | Writing every byte would be unnecessarily long |
| A photograph or audio clip | MiB | The file may contain millions of bytes |
| A device’s storage capacity | GiB or TiB | The capacity contains billions or trillions of bytes |
| A very large archive | PiB or EiB | A larger unit keeps the value manageable |
Common mistake
A larger unit does not mean that more data have appeared. It is simply a different way to describe the same quantity.
Bits, nibbles and bytes
The smallest units in the storage hierarchy are built directly from binary digits.
Nibble 半字节: a group of four bits.
Byte 字节: a group of eight bits.
| Unit | Relationship | Example pattern |
|---|---|---|
| Bit | One binary digit | 0 |
| Nibble | 4 bits | 1101 |
| Byte | 8 bits or 2 nibbles | 11010110 |
Common mistake
A nibble is four bits, not four bytes. Two nibbles make one byte.
The difference between b and B
Unit symbols are case-sensitive. A lowercase b usually represents bits, while an uppercase B represents bytes.
| Symbol | Meaning | Example |
|---|---|---|
| b | bit | 64 b means 64 bits |
| B | byte | 64 B means 64 bytes |
Since one byte contains eight bits:
64 B = 64 × 8 = 512 b
Write unit symbols carefully
A lowercase and uppercase letter can change the quantity by a factor of eight. Include the correct unit in every stage of a calculation.
Larger binary storage units
Bytes are grouped into progressively larger binary units. From the byte upwards, each unit in this course contains 1024 of the previous unit.
Mebibyte 兆二进制字节(MiB): 1024 KiB.
Gibibyte 吉二进制字节(GiB): 1024 MiB.
Tebibyte 太二进制字节(TiB): 1024 GiB.
Pebibyte 拍二进制字节(PiB): 1024 TiB.
Exbibyte 艾二进制字节(EiB): 1024 PiB.
Required calculation rule
For these course questions, use 1024 between consecutive units from bytes to EiB. Do not replace it with 1000.
The complete storage hierarchy
| Unit | Symbol | Relationship to previous unit | Equivalent number of bytes |
|---|---|---|---|
| Bit | b | One binary digit | One eighth of a byte |
| Nibble | — | 4 bits | Half a byte |
| Byte | B | 8 bits | 1 byte |
| Kibibyte | KiB | 1024 bytes | 1024 bytes |
| Mebibyte | MiB | 1024 KiB | 1 048 576 bytes |
| Gibibyte | GiB | 1024 MiB | 1 073 741 824 bytes |
| Tebibyte | TiB | 1024 GiB | 1 099 511 627 776 bytes |
| Pebibyte | PiB | 1024 TiB | 1 125 899 906 842 624 bytes |
| Exbibyte | EiB | 1024 PiB | 1 152 921 504 606 846 976 bytes |
Memorising every expanded byte value is not normally necessary. The more useful skill is knowing the order of the units and applying a factor of 1024 for every step.
Learn the order
Practise writing: B → KiB → MiB → GiB → TiB → PiB → EiB. Once the order is secure, you can count how many factors of 1024 are required.
Why the factor is 1024
Binary storage units are based on powers of two. The value 1024 is 210.
| Unit | Power-of-two form | Bytes |
|---|---|---|
| 1 KiB | 210 bytes | 1024 |
| 1 MiB | 220 bytes | 1 048 576 |
| 1 GiB | 230 bytes | 1 073 741 824 |
| 1 TiB | 240 bytes | 1 099 511 627 776 |
Each movement to the next larger unit adds another factor of 210.
1 MiB = 1024 × 1024 bytes = 220 bytes
Should you multiply or divide?
The operation depends on the direction of travel through the hierarchy.
A larger unit contains many smaller units, so the numerical value increases.
The same data are grouped into larger units, so the numerical value decreases.
| Conversion | Direction | Operation |
|---|---|---|
| MiB to KiB | Towards a smaller unit | Multiply by 1024 |
| KiB to MiB | Towards a larger unit | Divide by 1024 |
| GiB to bytes | Several steps towards smaller units | Multiply by 1024 for every step |
| Bytes to GiB | Several steps towards larger units | Divide by 1024 for every step |
Useful sense check
When converting to a smaller unit, the numerical answer should normally become larger. When converting to a larger unit, the numerical answer should normally become smaller.
Converting between bits and bytes
The first conversion relationship is different from the rest of the hierarchy:
1 byte = 8 bits
Worked example 1: bytes to bits
A small sensor record uses 156 bytes. Convert this value into bits.
Moving from bytes to bits means moving to a smaller unit, so multiply by 8.
156 × 8 = 1248 bits
Worked example 2: bits to bytes
A data block contains 24 576 bits. Convert this value into bytes.
Moving from bits to bytes means moving to a larger unit, so divide by 8.
24 576 ÷ 8 = 3072 bytes
Common mistake
Use 8 between bits and bytes. The factor 1024 begins only when converting between bytes and KiB or between consecutive larger binary units.
Worked example: moving to a larger unit
A set of status logs occupies 86 016 bytes. Convert this quantity into KiB.
Step 1: identify the relationship
1 KiB = 1024 bytes
Step 2: choose the operation
KiB is a larger unit than bytes, so divide by 1024.
Step 3: calculate
86 016 ÷ 1024 = 84 KiB
Step 4: check the direction
The numerical value has changed from 86 016 to 84 because the same quantity is now grouped into larger units.
Show the conversion factor
Write the relationship 1 KiB = 1024 bytes before performing the calculation. This makes the method easy to follow.
Worked example: moving to a smaller unit
A mapping application reserves 11 MiB of storage. Convert this quantity into bytes.
Step 1: count the conversion steps
MiB to bytes requires two steps:
MiB → KiB → bytes
Step 2: multiply by 1024 for each step
11 × 1024 × 1024
Step 3: calculate
11 MiB = 11 534 336 bytes
The numerical answer becomes much larger because bytes are smaller than MiB.
Converting across several units
For a multi-step conversion, count the number of movements through the hierarchy. Apply one factor of 1024 for each movement.
Example: GiB to KiB
Convert 3.5 GiB into KiB.
GiB → MiB → KiB
This is two steps towards smaller units, so multiply by 1024 twice.
3.5 × 1024 × 1024 = 3 670 016 KiB
Reverse check
Divide the result by 1024 twice:
3 670 016 ÷ 1024 ÷ 1024 = 3.5 GiB
Write the unit pathway
A short pathway such as GiB → MiB → KiB helps you count the required factors and reduces the chance of missing a step.
A quicker method for repeated conversions
Repeated multiplication or division can also be expressed using powers.
| Number of steps | Repeated calculation | Power form |
|---|---|---|
| 1 | × 1024 | × 10241 |
| 2 | × 1024 × 1024 | × 10242 |
| 3 | × 1024 × 1024 × 1024 | × 10243 |
For example, there are three steps from TiB to MiB:
TiB → GiB → MiB
More precisely, this path contains two conversion steps:
1 TiB = 1 × 10242 MiB = 1 048 576 MiB
Count links, not unit names
From TiB to MiB, the units shown are TiB, GiB and MiB, but there are only two movements. Therefore, use two factors of 1024.
Choosing a suitable unit
A sensible unit keeps the numerical value readable without hiding the scale of the quantity.
| Quantity | Less helpful description | Clearer description |
|---|---|---|
| Small control record | 0.01171875 KiB | 12 bytes |
| Small document | 348 160 bytes | 340 KiB |
| Application package | 2 516 582 400 bytes | 2400 MiB |
| Device capacity | 524 288 MiB | 512 GiB |
| Large research archive | 3 145 728 GiB | 3 PiB |
Follow the requested unit
Even when another unit appears more convenient, give the final answer in the unit specified by the question.
Comparing quantities fairly
Two storage quantities should be converted to a common unit before they are compared, added or used in a division.
A backup device has 2 GiB free. A collection of files requires 1800 MiB. Is there enough available space?
Step 1: convert the capacity to MiB
2 GiB = 2 × 1024 = 2048 MiB
Step 2: compare like with like
2048 MiB > 1800 MiB
The files fit, with:
2048 − 1800 = 248 MiB remaining
Common mistake
Do not directly compare the numbers 2 and 1800. They use different units and therefore describe different scales.
Worked problem: how many files will fit?
A field station has 9 GiB available for wildlife-camera files. Each processed file occupies 12 MiB. How many complete files can be stored?
Step 1: convert the available storage to MiB
9 GiB = 9 × 1024 = 9216 MiB
Step 2: divide by the size of one file
9216 ÷ 12 = 768
Step 3: state the result
The field station can store 768 complete files.
Convert before dividing
The available capacity and the size of one file must use the same unit before calculating how many files will fit.
Common mistakes and misconceptions
- Confusing a bit with a byte.
- Writing that one nibble contains eight bits instead of four.
- Using 1024 between bits and bytes instead of using 8.
- Using 1000 instead of 1024 in these course calculations.
- Multiplying when moving to a larger unit.
- Dividing when moving to a smaller unit.
- Missing one or more conversion steps.
- Counting unit names instead of counting movements between units.
- Comparing two values that are expressed in different units.
- Omitting the unit from the final answer.
- Giving an answer in a convenient unit instead of the unit requested.
Interactive: Storage Unit Ladder Laboratory
Enter a storage quantity, choose its current unit and select a target unit. The laboratory traces each movement through the hierarchy and shows whether to multiply or divide.
Use the ladder as working
Write the starting and target units, mark every movement between them and apply the factor shown on each link.
Practice
Core questions
- Define the term bit.
-
State how many bits are contained in:
- one nibble;
- one byte.
- State how many nibbles make one byte.
- Explain the difference between the symbols b and B.
- Write the following units in order from smallest to largest: GiB, byte, EiB, MiB, KiB, TiB, PiB.
-
State how many:
- bytes are in one KiB;
- KiB are in one MiB;
- MiB are in one GiB;
- GiB are in one TiB;
- TiB are in one PiB;
- PiB are in one EiB.
- Convert 340 bytes into bits.
- Convert 32 768 bits into bytes.
- Convert 73 728 bytes into KiB.
- Convert 15 KiB into bytes.
- Convert 6 MiB into KiB.
- Convert 12 288 KiB into MiB.
- Convert 4 GiB into MiB.
- Convert 7168 MiB into GiB.
- Convert 2 TiB into GiB.
- Convert 3 PiB into TiB.
- Convert 5 EiB into PiB.
- Explain why moving from MiB to bytes requires multiplication rather than division.
- Explain why two storage quantities should use the same unit before they are compared.
- Explain why the unit must be included in the final answer.
Applied questions
- A storage card has 3 GiB available. A collection of files occupies 2900 MiB. Determine whether the files will fit and calculate the remaining capacity in MiB.
- A monitoring system has 7 GiB available. Each data package occupies 16 MiB. Calculate how many complete packages can be stored.
-
A backup contains 1.5 TiB of data. Convert the quantity into:
- GiB;
- MiB.
- One archive is 8192 MiB. Another archive is 6 GiB. Calculate the difference between their sizes in MiB.
- A student converts 4 GiB to MiB by calculating 4 ÷ 1024. Explain the error and give the correct result.
- A student says that 1 KiB contains 1000 bytes. Explain why this value should not be used for the calculations in this course.
Extension questions
- Calculate how many bits are contained in 3 KiB.
- Convert 2.25 GiB into bytes.
- Convert 1 610 612 736 bytes into GiB.
- A data centre stores 2 PiB of information. Each storage unit has a capacity of 8 TiB. Calculate the minimum number of complete storage units required.
- Explain how a reverse conversion can be used to check a calculated answer.
- Create a storage conversion that requires three factors of 1024 and solve it.
Check selected answers
- One nibble contains 4 bits. One byte contains 8 bits. Two nibbles make one byte.
- The order is: byte → KiB → MiB → GiB → TiB → PiB → EiB .
- Each consecutive unit from byte to EiB contains 1024 of the previous unit.
- 340 bytes = 340 × 8 = 2720 bits.
- 32 768 bits = 32 768 ÷ 8 = 4096 bytes.
- 73 728 bytes = 73 728 ÷ 1024 = 72 KiB.
- 15 KiB = 15 × 1024 = 15 360 bytes.
- 6 MiB = 6 × 1024 = 6144 KiB.
- 12 288 KiB = 12 288 ÷ 1024 = 12 MiB.
- 4 GiB = 4 × 1024 = 4096 MiB.
- 7168 MiB = 7168 ÷ 1024 = 7 GiB.
- 2 TiB = 2 × 1024 = 2048 GiB.
- 3 PiB = 3 × 1024 = 3072 TiB.
- 5 EiB = 5 × 1024 = 5120 PiB.
- 3 GiB = 3072 MiB. The 2900 MiB collection fits, leaving 172 MiB.
- 7 GiB = 7168 MiB. Therefore, 7168 ÷ 16 = 448 packages.
- 1.5 TiB = 1536 GiB = 1 572 864 MiB.
- 6 GiB = 6144 MiB. The difference between 8192 MiB and 6144 MiB is 2048 MiB.
- 3 KiB = 3 × 1024 × 8 = 24 576 bits.
- 2.25 GiB = 2.25 × 1024 × 1024 × 1024 = 2 415 919 104 bytes.
- 1 610 612 736 bytes ÷ 1024 ÷ 1024 ÷ 1024 = 1.5 GiB.
- 2 PiB = 2048 TiB. Therefore, 2048 ÷ 8 = 256 storage units.
Review
Key ideas
- A bit is one binary digit.
- A nibble contains four bits.
- A byte contains eight bits or two nibbles.
- A lowercase b represents bits, while an uppercase B represents bytes.
- One KiB contains 1024 bytes.
- Each consecutive unit from KiB to EiB contains 1024 of the previous unit.
- The hierarchy is B, KiB, MiB, GiB, TiB, PiB and EiB.
- Moving to a smaller unit requires multiplication.
- Moving to a larger unit requires division.
- Each movement between consecutive larger units uses a factor of 1024.
- Bits and bytes use a factor of eight.
- Quantities must use a common unit before they can be compared.
- The final answer must be expressed in the requested unit.
Quick self-check
- Can I define every required storage unit?
- Can I distinguish bits, nibbles and bytes?
- Can I write the storage-unit hierarchy in order?
- Can I decide whether to multiply or divide?
- Can I count the number of conversion steps?
- Can I convert across several units?
- Can I compare two storage quantities using a common unit?
- Can I give an answer in the unit requested?
One-minute exit task
Convert 2.75 GiB into:
- MiB;
- KiB.
Show the unit pathway and every factor of 1024.