How a Computer Stores Information
1. Quick Summary
At the bottom, a computer stores information as patterns of two possible states, usually represented as noughts and ones. Two states are used because they are physically robust: distinguishing clearly between two levels is far easier than distinguishing between ten when noise and manufacturing variation exist.
What makes the system practical is hierarchy. A computer keeps a tiny amount of very fast storage next to the processor, progressively larger and slower tiers behind it, and permanent storage at the bottom, moving data between them automatically.
2. What It Means
The unit is the bit, and bits are grouped into bytes of eight, a convention that became standard partly because eight bits is enough for a character and a convenient size for early hardware. Larger amounts are counted in powers of two in software contexts and powers of ten in marketing, which is where the familiar confusion about disk sizes comes from.
Working memory is fast and volatile. Random access memory holds the code and data the processor is actively using, and it loses everything when power is removed. That volatility is the trade-off for speed: the mechanism that makes it fast is also what makes it forget.
Permanent storage keeps data without power. Magnetic drives store bits as magnetised regions on spinning discs; solid state drives store them as electrical charge in memory cells. Both are far slower than working memory and far cheaper per unit of capacity.
3. Why It Happens
Caches exist because of the speed gap. A processor can perform an operation in a fraction of a nanosecond while fetching from main memory takes far longer, so a small amount of very fast memory sits between them holding recently used data.
Locality is what makes caching work. Programs tend to use the same data repeatedly and to use data near data they just used, so a small cache holding recent and nearby items satisfies a large share of requests without going to slower memory.
The tiers differ in physical mechanism, and that determines their properties. Fast memory uses circuits that hold a state as long as power is applied, magnetic storage encodes state in a material that persists, and flash stores charge in an insulated cell that persists but wears slightly with each write.
Persistence has a cost. Anything that must survive power loss has to be written to a slower medium, which is why saving a file takes measurable time while using data already in memory does not.
4. Real Examples
The capacity confusion is a good illustration of the accounting difference. A drive sold as one terabyte, counted in powers of ten, is reported by an operating system counting in powers of two as roughly 931 gigabytes, and both figures describe the same physical capacity.
Opening a large file shows the hierarchy in real time. The first access waits for data to come from storage into memory, and subsequent access to the same data is nearly instant because the copy in memory is being reused.
Compression and deduplication are storage saved by description. Rather than storing every pixel or every repeated block literally, the system stores a shorter description that can be expanded again, which is why the effective capacity of a drive depends heavily on what is being stored.
5. How It Affects Us
For users, the practical consequence is that the slowest component a task depends on determines how the task feels, which is why adding memory or moving to a faster drive is often more noticeable than a modest processor upgrade.
It also explains why backups are a separate activity. Storage that is fast and convenient is also the storage most exposed to accidental deletion and failure, so anything important needs a copy on a different medium in a different place.
And it sets the terms for data durability. Nothing digital is preserved for decades by default; formats, media and the software that reads them all have to be maintained actively for information to survive.
6. Key Takeaways
- Two states are used because they are physically reliable; eight bits make a byte by convention.
- Storage is a hierarchy: fast and small near the processor, slow and large further away.
- Caching works because programs reuse data and use data near what they used before.
- Drive capacity is marketed in powers of ten and reported in powers of two, which is why the numbers differ.