Understanding Computer Memory (RAM)
Switch on your computer and you will see that the RAM whirs to life. One of the most crucial parts of the computer (apart from the CPU, of course) is the RAM (Random Access Memory). The RAM obtains, fetches and retains a part or whole of the calculations, instructions and data to be stored temporarily in the memory.
While there are other kinds of memory too, for now, we’ll focus only on the RAM to keep matters simple. When we talk about RAM within your computer, we refer to RAM Modules (Hardware pieces you might get to see if you thrash open your computer). These modules store and transfer commands to and from the various other parts of the computer -- like the peripherals, input/output devices, graphic and sound cards, speakers, etc -- these modules are also referred to as the main memory or system memory.
Each of these modules installed within your computer consists of RAM circuits each of which holds millions of memory cells. Each of these cells is made of a capacitor and a transistor which represents one data bit (the capacitor stores an electric charge, while the transistor can control the flow of that charge). The Control Unit determines whether the charge on the capacitor should change or should stay put. The charge state of this capacitor would then determine the value of the bit that would be assigned to the memory cell (like on or off, 1 or 0, Positive or negative).
The system is now built such that the above mentioned data bits are arranged on each memory chip following an address system which enables the CPU to retrieve data quickly and efficiently and from any address (that’s where “Random" comes from in Random Access Memory). The bits are arranged in rectangular rows and columns and each of these bits is identified by a specific address. The first part of the address identifies the row and the second part of the address specifies the column from which the bit has to be retrieved for the CPU.
If you remember, the bits are on or off (0 or 1) depending on the charge which in turn is powered by the capacitor. However, to preserve the memory’s state, the charge needs to be refreshed by the memory controller. Now when this charge happens many times per second, it is said to be Dynamic, which gets us to DRAM (Dynamic Random Access Memory). Alternatively, some circuits have more transistors than that of DRAM such that the charge is set once for all and does not need to be refreshed. Such a RAM is said to be static and leads us to SRAM (Static Random Access Memory). SRAM is faster than the DRAM and the computer’s L1 and L2 Cache memory use SRAM because of the fact that the memory has to be quick and agile in this case.