Ages ago we humans started living in the community. We invented language. We started communicating with each other. As time passes, we started inventing other things and knowledge. Now the problem arises that how to preserve and pass this knowledge to others and to the next generation.
Then we invented writing and drawing. For this, we encoded information into characters and symbols. These encoded characters and symbols were marked into stone, leather, and woods. The invention of clothes and paper allowed us to write easily.
If we think about books. Books are like memory devices which store data. Though we can not change the data of the book once it has been printed. So we can call it read-only memory.
Similarly, we can take the example of notebooks, if we write our homework using pencil and we can use an eraser to remove the unwanted data, and again we can write the correct data.
The above analogy depicts the true purpose of the memory like reading, writing, delete and update the data.
The primary purpose of computer memory is to store digital data. Data is made up of bits. I have written stories about a bit. You can find these stories here A day in the life of a Bit and An Autobiography of a Bit.
Books store the data in a human-readable format. The problem with computer memory is that it cannot store data in a human-readable form. The computer understands only binary and for humans, binary is too complex. So the first thing is to convert data into binary and then store it in the memory.
Now if we need to access this data, then we instruct the CPU to read data from memory and display it for us. Then CPU asks memory for needed data. Then data travels from memory to CPU and the CPU instructs the output devices like display or printer how to show it in a human-readable format.
I will write a story on “How real-life data gets converted or represented into the binary and back to the human-readable format”.
For memory, we need a device that can store the binary data. As we know binary data is a string of 1s and 0s. Technically digital memory is a combination of very tiny components. Each of these components is capable of storing a single bit value by preserving the state of voltage either high/low or on/off or 1/0. A lot of these components when combined together forms the memory.
The size of memory is decided by the number of bits it can store or in other words number of voltage state, it can hold.
How these tiny electronic components got the superpower of storing the bit value by preserving the voltage value? for answering this question, I will tell one more story “The Power of FlipFlops” later.
The memory contains the arrays of these tiny components. Group of 8 becomes a byte and each byte location has a memory address like we humans have for our house. This memory address is used by the CPU to read and write the data from/to memory.
I have planned another story “How memory works”, this story will allow us to know more about memory devices.
Memories are the very integral part of any computing system. Without memory, no computing system can work. Memories come in different form factors and used for various purposes. Temporary data like intermediate results are stored in registers(One kind of memory) present in the CPU. Instructions and data for currently running applications are stored in RAM(Random Access Memory). Memory like hard disks is used for permanent data storage. I will write a detailed story about “Types of Memory” to cover everything.