Before understanding how computers store data, it is essential to know why computers need to store data. As you are aware, computers consist of both hardware and software components. Different components in the hardware, for example, are the CPU, RAM, and SSD.
The CPU does the calculations. It takes commands from users in the form of code and executes them by converting them into 0s and 1s. Everything, including the data and instructions, must be represented in 0s and 1s. Just to give you a little context on what we are talking about, try out this alphabet-to-binary converter and check what an alphabet means for a CPU.
CPU-Level Character to Binary Converter
CPU Processing Steps:
Character:
ASCII Code: (Decimal)
Stored in 8-bit register:
Actual memory representation:
CPUs store this as electrical voltages (high=1, low=0) in memory cells
Example memory location:
Each byte gets stored at a unique address in RAM
How CPUs Actually Process Characters:
- Characters are always stored as binary numbers in memory
- The CPU loads these bytes into registers for processing
- ALU operations work on the binary representation directly
- Even text output converts binary back to character glyphs
So, even smaller numbers and alphabets become pretty huge when we convert them into 0s and 1s. Now, to process them step by step, we need a space to hold the data that isn't immediately required.
You can call Windows or macOS big programs that run on the hardware. Games like Red Dead Redemption and GTA-V are also programs that need to be stored somewhere.
These programs instruct the CPU to perform specific tasks to achieve certain results, such as updating frames on the display in the case of games. This can also include opening a browser, playing music videos, loading software, and other similar activities.
However, because several processes are required to accomplish these tasks, the code becomes quite large. So, for storing that data, we need computer storage.

Process of data storage in computers
As we all know, computers are electronic devices, and their basic operation involves electrical switching between high and low voltages. We manipulate these current levels at our convenience to get the desired results. To instruct a computer to add numbers 1 and 2, we need to select a circuit and convert 1 and 2 into their respective symbol voltage levels. High/Low voltage levels are denoted by 0 and 1, respectively. We call these binary numbers.
In binary, "1" is represented as "0001", which means 3 lows and 1 high.
2 in binary is 0010, which means two lows, one high, and then one low.
When we add these, we get 3, which is 0011.
Decimal/Binary Adder
Now, if we need to store three values somewhere, we require some space where we can assign their binary numbers in the form of voltage values again.
Now comes the temporary memory. Here, we can store these values as long as the power is provided. Temporary memory locations in a computer are registers, cache, and random-access memory.
If we have to store a result permanently, we use devices whose voltage levels can be retained even after the input power is switched off. For this, we use either magnetic platter devices, such as hard drives, or flash-based storage, like SSDs.
Computer Memory vs Storage
These names may sound similar, but they have distinct meanings in the context of computers. Memory refers to temporary storage, whereas the term "storage" typically refers to permanent storage.
In simple terms, computer memory consists of RAM, Cache, and Registers, while permanent storage includes SSDs and HDDs. There are also external devices, but we are not discussing them here.
The memory will have a higher speed because it is part of the CPU's calculations. The CPU stores and retrieves data from memory, which is frequently used for calculations. The access time in the RAMÂ is significantly lower than that of secondary storage devices. Once the registers are filled, the CPU uses Cache memory. After the cache, RAM is there to serve its purpose.
When the RAM gets full and calculations are still ongoing, the computer will become slow, and it may even freeze. This is because the CPU can't use the secondary storage devices for its calculations in real-time unless virtual memory is enabled.
Permanent storage is a type of storage space designed to store large amounts of data, such as multimedia files, operating systems, and software data. This data is then loaded into RAM as required. Once its purpose is completed, it can be written back to the storage device or cleared from the RAM.
Data storage hierarchy in computers
Computer Storage Hierarchy
1. CPU Registers
~1ns accessFastest storage directly in the processor (measured in bytes)
2. Cache Memory
3. Main Memory (RAM)
~80-120ns access4GB-128GB typical in modern systems (volatile)
4. Solid State Drive (SSD)
~50-150μs access256GB-4TB typical (non-volatile, flash memory)
5. Hard Disk Drive (HDD)
~5-10ms access1TB-16TB typical (mechanical, non-volatile)
6. Cloud/Archive Storage
~50-500ms accessVirtually unlimited capacity (network-dependent)
Key Characteristics
Speed ↓
From nanoseconds (registers) to milliseconds (HDD)
Capacity ↑
From bytes (registers) to exabytes (cloud)
Cost per GB ↓
From very expensive (cache) to very cheap (cloud)
To perform its job, the CPU requires memory. Once it has completed the calculations, it needs space to store the results, allowing it to be free for upcoming tasks.
The first storage space for the CPU is the Register. It is used to store the results immediately before they are sent elsewhere.
Then, the CPU has cache memory, typically L1 and L2 cache. Cache has a higher storage capacity but lower speed than registers.
After the cache, we get our RAM (Random Access Memory). RAM has a higher storage space but less speed than the cache.
After the RAM, we get our secondary storage (SSD/HDD). Secondary storage has a higher storage space but less speed than RAM.
Permanent Storage in computers
I had planned this article solely for the permanent storage process, but providing you with an idea about memory was also important.
Now, let's get to the point.
The process of data storage primarily depends on the type of data storage device being used.
Hard Drives

Hard Drives have become older storage devices, but the technology that powers them is fascinating. On the magnetic disk inside the hard drive, the bits are stored in the form of a magnetic field. On the disk, there is a layer of cobalt-chromium-tantalum alloy, which is further divided into separate regions. The size of each split sector is in nanometers.

With the help of a spindle, we use electric current to magnetize these regions. When magnetized, all the atoms can have their magnetic north/south poles pointing in one direction.


The direction of one sector doesn't indicate the stored bit. But, it is the field emitted by two opposite regions because it is much stronger.
There is a separate controller on the hard drive, along with the DRAM buffer, to work with the CPU and remember the locations.
Solid State Drives

Inside the Solid State Drives, you'll find millions and billions of floating gate transistors or charge trap flash cells. These transistors can hold the electric charge in their gate area. We use these charged and discharged states to store data bit by bit.



The electric field is passed through these gates during the writing process. This allows the transistors to hold the data. The region where the data is stored is insulated by the dielectric material that enables the charge to be trapped even when there is no power.
During the reading process, the location of this data is determined and the charge is checked.
SSDs are of different types. SLC SSDs use one of these transistors as one cell to store one bit of information hence called Single Level Cell.


MLC SSDs utilize a single cell at different voltage levels to store 2 bits, hence the name multi-level cells.


TLC SSDs utilize a single cell with more voltage levels to store 3 bits, hence called a triple-level cell.


QLC SSDs do the same and use a single cell to store 4 bits, hence called a quad-level cell.


As the single cell is being utilized for more than one-bit storage, reliability is lost, but the storage capacity of the overall drive increases. However, as the number of cells used per bit increases, the price also increases, making SLC the most expensive drives available.
Why do computers need to store data?
Computers are pretty fast at performing their tasks. From calculating the position of the mouse pointer on the display and sending click information to the CPU, to taking input from the keys pressed on the keyboard, a lot is happening beneath the surface.
But, there is an issue. There isn't a lot of space to store this data altogether. Yes, some of the storage space is available in the registers and cache memory inside the CPU, but that's not enough when we talk about the gigabytes of data from our OS, software, and games.
To provide the CPU with extra space to store and retrieve the required data, we offer it additional storage space. Now, it can utilize that space for either long-term storage or short-term storage as needed.
The capacitor-based memory, known as RAM or DRAM, has a quicker response time and higher read/write speed. The reason is that it picks random data locations by charging the capacitors.
When discussing long-term storage, we need to store data in order to make our computers function effectively in real-world usage. Without permanent storage, we can't store the OS files anywhere. So, the computer won't do anything after the system boots up. Also, the software and games are installed in the permanent storage.
How do computers store data?
According to the program in hand, the CPU stores the data in RAM or the storage drive. If it is used frequently, it will remain in the RAM. Otherwise, it will go to long-term storage.
When editing a video with Premiere Pro, the essential files for both the video data and the software are stored in RAM, provided the system has sufficient memory. If the RAM is low, the data may be fetched from the secondary storage (SSD or HDD) and then pushed into the RAM. If I have to save the file, the CPU will send everything to the secondary storage but keep the files in the RAM until the software is closed.
In terms of the operating system, the BIOS loads the required file first to initiate the hardware and then performs tasks such as loading settings and displaying the welcome menu.
After the BIOS, the OS is the first layer of software on our computer. It provides us with a platform to run programs and games.
Now, take the example of running video editing software on our Windows computers.
When we download Premiere Pro on our computer, it gets stored in our SSD from the official website in the form of a setup file.
Then, when we start the installation, the operating system adds it to its environment so that it can also use the resources required for the editing tasks.
Once the software is installed, we fire it up, and the CPU is instructed to load the required file from storage to RAM, Cache, and registers as needed. Once it's fully loaded and we have given no further commands, it may seem that nothing is happening, but there are still many processes ongoing. For instance, a loop may be running to check for new software updates over the internet.
But, just imagine, we load up a video file. Now, a portion of the video file, including metadata and thumbnail, will be loaded into the RAM for quicker access. As you start to edit things up, the RAM will be utilized to store the immediately required data and then store it back on the drive. Various techniques, such as caching and dynamic loading, are used to optimize RAM usage.
During the rendering process, the CPU processes the geometry of the scenes and applies transformations such as rotations and scaling. Because the sequence you edited in the editor wasn't the edited sequence, the harder part starts when you click 'Export'.
During rendering, the CPU and GPU are not only performing all the pixel processing, rasterization, depth testing, etc., but they are also writing the data to your drive. That is why rendering takes time.
Conclusion
At a fundamental or hardware level, data is stored either in the form of magnetic orientation of nanoscopic sectors on hard drives or in the form of electric charge in NAND flash cells in SSDs. However, for us, these are bits (0s and 1s) combined to make texts, images, videos, and everything that we see on our computer screens. Therefore, computers store data in these dedicated drives, which have their internal mechanisms. However, all these things work together in a very complex way, which is the software part of the computer.