Skip to content

RAM vs ROM: What is the Difference?

Computer Memory or memory in general is of various types. We can divide the memory in multiple ways. However, a broad or abstract way to define memory is by their ability to store without power. So, we have permanent and temporary memories. RAM is the best example of the temporary memory. RAM is also called volatile because it loses the data when powered off. Whether it is SRAM in the CPU cache or the SDRAM as the primary memory on the motherboard, these are all temporary memory types. But, RAM has the advantage of a very high bandwidth and low latency. RAM has many types, and some of them are discussed in this article.

If we look at the permanent memory types (non-volatile memory), we have SSDs (Flash Memory), HDDs (Magnetic Storage), flash drives, Optical storage drives, and ROM. ROM is special because of its simple design, low price, high write endurance, and overall stability. It has major applications such as Read-Only memory for computer BIOS/UEFI, Microcontrollers, and embedded system firmware in devices like TVs, routers, microwaves, etc. The ROM generally stores the data that should be changed by the end user. However, there are different variations of the ROM whose data can be re-written through firmware or BIOS updates or by experts.

RAM vs ROM infographic

Let’s compare both of them and understand how they work.

What is RAM?

RAM stands for Random Access Memory. It is called “Random Access” because the data on it can be read or written on it in any order. It simply means the CPU can access any memory location. NAND flash memory can also be accessed randomly but only RAM is called RAM because of its historical context. When the RAM was found in the 1940s and 50s, the other storage mediums were sequential. The access pattern of the RAM was completely different from the magnetic tapes and hard drives. Now, RAM comes with the advantage of high throughput and low latency because of this random access pattern.

RAM doesn’t have only one type. There are around 10 types of RAMs in the market. The three most popular types of RAMs are DRAM, SRAM, and VRAM. The main memory in our computers is made up of a special type of DRAM called SDRAM. In mobile devices, there is generally the LPDDR RAM used as the primary memory. The CPU cache is made up of the SRAM while the GPUs use the VRAM or Video RAM.

There are many other types of RAM but most of them are volatile. All of them need a constant power supply in order to keep the data in its place. The DRAM (which is based on the capacitor memory) even needs constant refreshing of the memory cells so that they retain their states. RAM works closely with the CPU providing it a faster storage medium than the primary memory i.e. hard drive or SSDs.

SODIMM RAM sticks

How does RAM work?

The working of RAM depends on how it’s made and where is it employed. The SRAM for example has its biggest application as L1, L2, and L3 cache in the CPUs. It is highly expensive and hard to scale, but much faster than any other type of RAM. SRAM is a transistor-based memory. The DRAM, on the other hand, stores the data inside the 1T1C memory cells storing each bit of data in the form of charge in a capacitor. Millions and Billions of these cells may be combined to make a DRAM chip which can then be used by the CPU.

All the CPUs have their own register and cache memory which is really fast but is in very low storage capacity. RAM allows for scalability with a little compromise to the speed. Cache memory can be 30% to 500% faster than RAM depending on the type of CPU. However, the cache memory is around 6 to 10 times more expensive than the DRAM. So, both of them are RAMs but their prices, speed, scalability, and applications are different.

If we just look at the RAM as the main working memory in a computer or mobile system, its main role is to give enough space for the temporary data. The CPU can load the required data from the secondary storage and load it into the RAM. Then, it can load the most important data into the cache memory and then work on it. The RAM will be there to hold any big amount of data that won’t fit inside the cache. But, RAM isn’t just that. There are many types and different types of working. Let’s understand all the popular types of RAMs below.

Types of RAM

1. DRAM (Asynchronous-Dynamic Random Access Memory)

This was the early variant of the DRAM introduced between the late 1970s and early 1980s. This type of RAM has a clock that works independently of the CPU. For the incoming control signals, this RAM responded in real time as they arrived. ADRAM was simpler in design but slower for the newer upgrades in computer technology. Also, it was less efficient in handling multiple data requests, again because of its asynchronous nature.

ADRAM uses a pair of a capacitor and a transistor to store one bit of data (1 or 0). The presence of charge represents 0 and the absence represents 1. However, this charge leaks over time and it must be refreshed constantly. The access time of a DRAM is around 10 to 100 nanoseconds.

DRAM has many variations. SDRAM is the most popular these days. However, the types of DRAM are RDRAM (Rambus DRAM), FPM DRAM (Fast Page Mode DRAM), and EDO DRAM (Extended Data Out DRAM).

old dram chips image
1.1. SDRAM (Synchronous Dynamic Random Access Memory)

The SDRAM was developed in the mid-1990s as an advanced memory technology for improving computers. As the name says, it shared the same clock as the CPU and this resulted in much better processing and handling of multiple processes at a time. DDR (Double Data Rate) helped the SDRAM to enhance its applications and performance with much more efficient use of the data signals. Each generation of DDR SDRAM offers higher speeds, lower latency, and enhanced system performance.

Again, the same type of 1T1C memory cell is used to hold one bit of data. However, SDRAM sends the data in bursts because it is possible to queue up and process multiple data requests at once. Below is the table of the DDR variants and their effective data rate along with the bandwidth and basic clock speed.

DDR VersionClock Speed (MHz)Data Rate (MT/s)Bandwidth (GB/s per module)Voltage (V)
DDR (DDR1)100 – 200200 – 4001.6 – 3.22.5
DDR2200 – 533400 – 10663.2 – 8.51.8
DDR3400 – 1066800 – 21336.4 – 17.01.5
DDR4800 – 16001600 – 320012.8 – 25.61.2
DDR51600 – 32003200 – 640025.6 – 51.21.1

2. SRAM (Static Random Access Memory)

Single SRAM Cell

The term Static came as the opposite of the Dynamic in the DRAM. The SRAM doesn’t require constant refreshing of the capacitors to retain its data. Because 4-6 transistors are used to hold a bit of data inside a flip-flop in SRAM, it not only becomes static but also very fast. SRAM offers a very low latency and very high bandwidth. The access time of SRAM is generally between 1=3 nanoseconds which makes it most suitable for high-performance environments. But, because of its low density and high cost, it can’t be used as a primary memory in any device. This would increase the cost of the devices a lot. So, it is used smartly for cache purposes not only in computers but printers, smartphones, routers, networking devices, cameras, etc.

3. VRAM (Video Random Access Memory)

VRAM is used in graphics cards and integrated GPUs in the CPUs. It is optimized for handling high bandwidth and parallel processing demanded by the GPUs. This RAM is ideal for storing images, videos, games, and other types of 3D data.

VRAM TypeTypical Clock Speed (MHz)Data Rate (MT/s)Bandwidth (GB/s)Primary Usage
SGRAM100 – 200200 – 4001 – 3.2Basic graphics, entry-level GPUs
GDDR (GDDR3)700 – 10001400 – 200028 – 32Mid-range gaming, mainstream GPUs
GDDR51500 – 20003000 – 400064 – 80Gaming, high-performance GPUs
GDDR61750 – 200014000 – 16000336 – 448High-end gaming, AI, and VR
HBM (HBM2)1000 – 20002000 – 4000256 – 1024AI, data centers, high-performance computing
HBM32000 – 30006000 – 8000Up to 3072Cutting-edge AI, supercomputing
VRAM chips in Graphics card

VRAM is dual-ported, allowing simultaneous read and write operations and making it suitable for video and image data. The two main variations of the VRAM HMB and GDDR are designed for high-performance graphics and computing tasks. GDDR is based on a 2D layout while the HMB is based on 3D stacked technology. With a wide memory bus, the HMB offers a very high bandwidth compared to the GDDR. The HMB is mostly used in high-performance computing in specialized areas such as AI and data centers. The GDDR, on the other hand, is most popular in the consumer GPU market. The latest version GDDRX offers the best balance between price and performance making it the best for gaming graphics cards.

4. Other types of RAM

MRAM (Magnetoresistive RAM): This RAM uses magnetic tunnel junctions to store the data. The alignment of magnetic layers represents the bit values. These magnetic layers are separated by insulating layers and can be fixed or free to represent bits of data. The special thing about this RAM is that keeps the data even without the absence of input power. It is suitable for high-speed applications and is very durable. It is mostly utilized in industrial, automotive, and aerospace applications.

FRAM (Ferromagnetic RAM): The storage medium in this RAM is similar to a capacitor but it uses a ferromagnetic layer to store the data. The polarization of this magnetic material represents the bit value of the data. The electric field can be used to change this field and write the data. It also retains the data even when powered Off. It is mostly used in embedded systems and smart cards.

NVRAM (Non-Volatile RAM): This memory uses either flash memory or SRAM with a battery for power backup. This again holds the data when the power is off. The battery-powered NVRAM uses that battery to keep the data in the SRAM. However, the flash memory-based NVRAM uses the floating gates for this job. This is generally used in firmware and BIOS chips.

LPDDR (Low-Power DDR SDRAM): If you ever go into the smartphone specifications, you might have heard this name. LPDDR and LPDDRX RAM are widely used in smartphones, tablets, and some laptops as well. It loses its data when the power is off. But, it has got the advantage of high speed and bandwidth thanks to its capacitor-based memory. LPDDR is also pretty power efficient because of low I/O voltages and mechanisms like array self-refresh.

What is ROM?

ROM or (Read Only Memory) has no direct comparison with the RAM but because the names are similar, people are generally confused. ROM is basically a memory that is made just to read the data. It isn’t supposed to be written by the end-user either because it stores critical data or because of its hard writing process. ROM has its biggest applications in the Firmware and BIOS/UEFI chips in computers, gaming consoles, embedded systems, electronic appliances, mobile phones, networking, etc.

ROM is non-volatile memory which makes it good for storing critical data. But, the most special thing about ROM is that it is used to store permanent or semi-permanent data. It means the data on ROM must not be erased and written frequently. ROM comes with limited write capacity and generally requires special writing mechanisms for the security and reliability of the data. With the firmware updates, the system writes the data on these ROM chips but we generally have no direct control over it.

The ROM chips used in our computers are the EEPROM chips. These chips can be rewritten through the system update utility which initializes and executes this update. In microcontroller programming, the ROM is used to define the operations of electronic devices. Your remote control, TVs, and washing machines would have the ROM chips with the inbuilt programs that run depending on your inputs and provide some kind of feedback. These ROM chips are generally not re-writeable and once damaged, need replacement.

How does ROM work?

ROM uses transistors and diodes to form memory cells to store the data. Each cell can hold one bit of data either 0 or 1.

In PROM, specific fusible links are blown to create permanent memory states. A blown fuse generally represents a bit value of 0 while an unblown fuse represents 1. In EPROM, data is stored by trapping electrons in floating-gate transistors. EEPROM and Flash memory allow for reprogramming by applying a voltage to remove trapped electrons.

The CPU demands the data from the ROM via the address signal through the address line. There is a decoder to select the appropriate row and column the read the specific cell.

Types of ROM

1. PROM (Programmable Read-Only Memory)

PROM Chip Image

This type of ROM can be programmed just once. Mostly, the manufacturers program them once they finish making this ROM. In simple words, whatever you want to write in it, you get one chance. Once written, the data can only be read from the PROM and can’t be erased or rewritten. The fusible links that make up the memory cells in the PROM can be burnt just once. It creates a permanent connection or no connection. Each cell, whether required to store 0 or 1 is written just once and that’s it.

2. EPROM (Erasable Programmable ROM)

EPROM Chip

This was the earliest variation of the PROM to make it programmable. For this, the manufacturers installed quartz windows on the chip that allowed the UV light to erase the trapped charge in the FGMOS. Once the existing data is erased, the chip can be reprogrammed as a new one with the electric signals. The writing process of the EPROM used the hot-carrier injection method. Although, the EPROM was widely accepted over the PROM in the past, but in these days, it is almost replaced by the EEPROM.

3. EEPROM (Electrically Erasable Programmable ROM)

EEPROM Chip Image

The working of the EEPROM is almost like the flash memory. The floating gate is utilized to store bits of data in the form of 0s and 1s. EEPROM is written or programmed using a high voltage at the gate of the transistor. This process stores the charge by tunneling it through the insulating layer and then keeping it inside the floating gate even with no power input.

Image of a floating gate transistor

In EEPROM, selective memory cells can be erased and rewritten which helps it become more versatile. To read the data, a lower voltage is applied to the control gate. Depending on the state of the floating gate (charged or discharged), the cell will either conduct (indicating a “1”) or not conduct (indicating a “0”).

Because of these benefits of the EEPROM, it is widely utilized in applications where frequent data re-programming is required. EEPROM is the most used ROM technology in computers, printers, embedded systems, smartphones, and many other places.

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments