Types of computer memory and difference between them

Once you start walking deep into the world of computers memories you will often come across two common terms, RAM and ROM. Even though they sound familiar, the only similarity is, both are primary memories for a computer or smartphone. But they work in completely different ways and are used in the world of computers and electronic gadgets for diverse purposes. If you are an electronics enthusiast, you might already know about what each of them does, but if you don’t know, I will talk about these two indispensable elements of computers here. 

Depending upon the specific applications, both RAM and ROM are classified into different types and several technologies are used, which I will also discuss here. We often come across the term RAM, when we go for purchasing a new computer, and even at the time of getting a new smartphone. The RAM seems to be a critical factor in purchasing modern electronic gadgets. RAM is important, as the performance of a computer or smartphone depends somewhat on the RAM. I will discuss the reasons here. Besides that, both RAM and ROM has also evolved a lot for the need of the generation, and they are far better than those that were available a few decades ago.

What is the difference between RAM and ROM (in points)

So without any further delay, let’s dive into what is the difference between RAM and ROM, and the different technologies used for making them.

Types of RAM and ROM

Computer memory primary difference RAM and ROM chart

ROM

ROM is an abbreviation of the term Read-Only Memory. This might be self-explanatory and it is so. ROM is a memory in computers and other electronic gadgets, which is supposed to be only read but is not supposed to be written. That, pretty much explains what a ROM is.

In most cases, a ROM is used to keep low-level programs, which can be used by a computer to boot up, and for keeping instructions to carry out other small system-level activities for the computer or the electronic gadget to run smoothly. 

In the case of computers, the BIOS is stored within the ROM. On the other hand, talking about other small and embedded electronic gadgets, ROM functions as the solitary memory, for example, small calculators, controllers for televisions and other electronic gadgets like air conditioners, washing machines, microwave ovens and many more gadgets that we all use every day.

Though ROMs are supposed to be only read, it doesn’t mean, they cannot be written or modified at all. Just like a book, which is supposed to be read, it is written by an author and is published by some publication before it is available for us to read. The same is applicable for a ROM. The ROM is also written by the manufacturer of the computer or the electronic gadget, in most cases and it can also be rewritten for specific purposes, like, to upgrade the BIOS, adding new machine level features to a computer, etc. However ROM chips aren’t that robust, and there is a certain limit, you can write to ROMs, after which, it will become unreliable.

Depending upon the way, a ROM is erasable or rewritable, there are two kinds of ROM chips available and they are EPROM and EEPROM. I will discuss, how they work, in short, here.


EPROM

EPROM is the abbreviation of Erasable Programmable ROM, which means the ROM can be erased and reprogrammed to accomplish a new set of tasks.

In order to erase and write new programs on to the ROM, it needs to be erased using ultraviolet light. There is a small fused quartz window, through which, light enters into the chip to erase the contents, and that’s the way you can recognize them.

After erasing the content of the ROM using ultraviolet light, it is again ready to be reprogrammed to intake a new set of instructions for a new set of tasks. That’s why EPROM chips are kept away from direct sunlight and sources of ultraviolet light, as the memory on the ROM will likely be erased, and the gadget will stop functioning at all.


EEPROM

EEROM is the abbreviation of Electrically Erasable programmable ROM. If it is clear to you, how an EPROM can be erased and reprogrammed, almost the same goes for EEPROM, with some minor differences. However, unlike ultraviolet light for EPROM, EEPROM can be erased using electrical signals, and then it can again be written using a different set of electrical signals.

EEPROM is mostly used nowadays to write programs into microcontrollers, update the BIOS on computers, and other modern electronic gadgets.

As EEPROM requires special electrical signals, special programmers are also available to erase and write programs on to EEPROM-based circuits like microcontrollers.

Both EPROM and EEPROM are erasable and programmable, however, EPROM is an old technology, and hardly in use nowadays. EPROMs are not power-efficient, as well, and it takes a while to erase them.

On the other hand, EEPROM is a new technology, and it has significant improvements over EPROM. As EEPROMs are electrically erasable and programmable, they can endure more write cycles than EPROMs, and are comparatively more power-efficient, as well.

As EEPROMs are electrically erasable, they don’t need to be removed from the gadget to erase and reprogram, which is necessary for EPROMs. For example Memory cards.


RAM

RAM is the abbreviation of Random Access Memory, and unlike ROM, the term RAM isn’t that much self-explanatory. It works in a completely different way, and the technology used here is also different. RAM is supposed to be read and written several times for a computer system or any other electronic gadget to work.

On RAM, data is stored temporarily and once the system goes out of power, the contents in the RAM are erased automatically and that’s why RAM is also called volatile memory.

In computers, RAM is used to keep important data for the computer to work in real-time, and it stores the data when some program execution is going on, and data is also read from, and written by the microprocessor onto the RAM.

RAM is all about reading and writing on to the memory multiple times when a computer is functioning. RAM is typically faster than that of ROMs and can be read and written several thousand times compared to that of a ROM, which can only be written a few times.

Basically there are two kinds of RAM, and they are static RAM and dynamic RAM. We use both static RAM and dynamic RAM in our computers, However, for the costs involved in making them, and for the technology used in them, they are used for separate purposes on a computer.


Static RAM or SRAM

On a static RAM, each bit of memory, or a single bit of data is stored using a digital logic circuit flip-flop, which is switched on and off to store 1 and 0 respectively.

In a static RAM, once the switching is done, the flip-flop will retain its state as long as there is power, or it is switched back to the opposite bit by the memory controller.


Dynamic RAM or DRAM

Talking about dynamic RAM it is a kind of RAM, where bits are stored within capacitors which are like small batteries, that can store charge for some time and can also be discharged whenever necessary. When a capacitor is fully charged, it is considered to hold 1, and when it is discharged it is considered to hold 0.

Besides that, each capacitor comes with a transistor, which acts as a switch to charge and discharge the capacitor so that it can hold 0 and 1 as per the instructions of the memory controller. The capacitors and transistors used in DRAM are very small and Ultra Large Scale Integration or ULSI is used to pack a billion such transistor and capacitor pairs to hold gigabytes of storage within a small area.

But the capacitor in dynamic RAMs cannot hold the charge forever. It needs to be refreshed dynamically at certain intervals and that is why it is called dynamic RAM.

When a capacitor is refreshed, the contents into a particular capacitor are read and the same is written back using the transistor and the complete task is accomplished by the memory controller. Capacitors with a dynamic RAM need to be refreshed from time to time, and thus, they are a little slower.

That is the reason why static RAM modules are faster than dynamic RAM modules, as a static RAM module does not need any kind of dynamic refreshments from time to time. That’s why you can find static RAM in those components of a computer, where speed plays the ultimate game.

Static RAM is especially found in the cache memory of the microprocessor. On the other hand, the RAM that we use in our computers is a dynamic RAM that needs to be refreshed from time to time. Static RAMs are significantly costlier compared to that of dynamic RAMs, as well.

Talking about dynamic RAM, there are two kinds of dynamic RAM modules available in the market right now. They are SDRAM and DDR RAM.


SDRAM

SDRAM or synchronous dynamic RAM isn’t that much available nowadays in the market and was popular till the last decade.

Unlike regular static RAM, where the content of the capacitors refreshes after a certain interval, in the synchronous dynamic RAM modules, the refreshing cycles are synchronized with the processor clock. It means the processor will not have to wait till the processor can send signals to the RAM for the purpose of storage. 


Difference between regular DRAMs and SDRAMs

In asynchronous dynamic RAM or regular DRAM modules, capacitors are refreshed without any kind of synchronization with the processor, which means the processor will have to wait until the turn comes when the RAM clock will synchronize with the processor clock. This eventually makes SDRAM modules much faster than that of asynchronous dynamic RAMs or regular dynamic RAMs.


DDR RAM

The next type of dynamic RAM is DDR RAM, where the same technology is used, but the data rate is doubled by carrying out operations during the rising and falling edge of the RAM’s clock cycle, which eventually doubles the data rate keeping the RAM frequency unchanged.


Difference between DDR and SDRAM

In synchronous dynamic RAMs or SDRAMs, only a single edge is used to transfer data whereas, in the case of DDR RAM models, both the edges are used, which eventually double the data rate and offers a smoother performance when the computer is working.

The first generation of DDR RAM was DDR1 or simply DDR RAM, however, it has improved a lot since then, and the improved version of DDR RAM is DDR2 RAM, that offered even better performance followed by DDR3 and DDR4 RAM models which came with neat improvements in the DDR standards to offer better performance. However, in almost all the DDR categories, the principal is just the same for the most part.

Today, in smartphones, and other embedded electronic gadgets both RAM and ROM are packed in a single circuit. That is the reason, why you cannot add additional RAM to your smartphone. However in the case of computers, the ROM is embedded in the motherboard itself in most cases, and the RAM is flexible, which PC builders know very well.

Computers do not need additional ROM as the ROM in a computer is mostly used for the BIOS. However, to save the BIOS settings a separate memory, some kind of RAM is used, which can be read and written multiple times. A battery is used to power the BIOS memory that stores the BIOS settings, even when the computer is powered off.

So, that was all you should know about RAMs and ROMs. Do you still have any questions? Feel free to comment on the same below.