RAM vs ROM
Introduction to Memory Types
Memory plays a vital role in saving and retrieving data. The performance of the computer system depends upon the capacity of the memory. Memory is an important element of a computer system. Let’s understand memory types in detail –
What is RAM?
Random Access Memory (RAM) is a type of computer memory that can be accessed randomly i.e. any byte of memory can be accessed without touching the previous bytes. RAM is can be found in computers and printers.
RAM is volatile memory, which means that the stored information is lost when there is no power. So RAM is used by the central processing unit (CPU) when a computer is running to store information that needs to be used immediately, however, doesn’t store any information permanently.
TYPES OF RAM-
RAM is of two types-
- Static RAM (SRAM)
- Dynamic RAM (DRAM)
- Static RAM (SRAM)
Static indicates that the memory retains its contents as long as power is available. It is volatile in nature and data is lost when the power goes off. Static RAM chip uses a matrix of 6-transistors and no capacitors. Transistors do not require power to prevent leakage, so Static RAM needs to be refreshed on a regular basis. Static RAM uses more chips than DRAM for the same amount of storage space, thus making the manufacturing costs higher. Static RAM is used as cache memory in system.
- Dynamic RAM (DRAM)
Dynamic RAM must be continually refreshed in order for it to maintain the data. It can rewrites the data several hundred times per second. Dynamic RAM is used because it is cheap and small. All Dynamic RAMs are made up of memory cells. It very basic form, DRAM can be built of one capacitor and one transistor.
Related- Memory vs Storage
What is ROM?
Read-only memory (ROM) is a type of storage that permanently stores data on personal computers (PCs) and other devices.
It contains the programming needed to start a PC or laptop, which is required for boot-up. ROM performs input/output tasks and holds programs and software instructions.
ROM is used to store the start-up instructions for a computer, also known as the firmware. Most modern computers use flash-based ROM.
It is part of the BIOS chip, which is located on the motherboard.
Types of ROM –
- MROM (Masked ROM)
First ROMs were hard-wired devices that contained a pre-programmed instructions. These were known as masked ROMs. It was inexpensive ROM.
- PROM (Programmable Read only Memory)
PROM is a read-only memory and can be modified only once by a user. In a blank PROM, user enters the desired contents using a PROM programmer. PROM chip contains small fuses which are burnt open during programming. Once programmed, it is not erasable.
- EPROM (Erasable and Programmable Read Only Memory)
EPROM can be erased by ultra-violet light for a duration of up to 40 minutes. During programming, an electrical charge is applied in an I/O gate. The charge is sustained for more than ten years because the charge has no leakage path. For erasing the memory ultra-violet light is used through a quartz crystal.
- EEPROM (Electrically Erasable and Programmable Read Only Memory)
EEPROM is programmed and erased electrically and reprogrammed many times. Both erasing and programming to chip takes 4 to 10 milliseconds. EEPROM can be erased one byte at a time instead of erasing the entire chip. Process of re-programming is slow.
RAM vs ROM –
- RAM is volatile in nature as it is automatically erased when computer shutsdown. ROM is non-volatile since it is never erased when there is any shutdown or restart of computer.
- RAM can be directly accessed by the processor. On the contrary, ROM cannot be directly accessed by the processor, therefore it is transferred into RAM where it is executed by the processor.
- RAM is used to store the temporary information for limited time. ROM is used to store permanent information that should not be deleted.
- RAM comes in form of chip whereas ROM comes in form of optical drivers made of magnetic tapes.
- RAM chip size is larger than ROM.
- Writing data to a RAM chip is a faster process. Writing data to a ROM is a slow process.
- A RAM chip can store multiple gigabytes (GB) of data, up to 16GB or more per chip. A ROM can store only several megabytes (MB) of data, up to 4 MB or more per chip.
- Examples of RAM are –
- Static and Dynamic RAM
- Examples of ROM are PROM, EPROM and EEPROM
Comparison Table : RAM vs ROM
|VOLATILITY||RAM is volatile in nature as it automatically erased when computer shutdowns.||ROM is non-volatile since it is never erased when there is any shutdown or restart of computer.
|ACCESSIBILITY||RAM can be directly accessed by the processor.||ROM can’t be directly accessed by the processor since it is transferred into RAM where it is executed by the processor.
|STORAGE||RAM is used to store the temporary information for limited time.||ROM is used to store permanent information which can’t be deleted.
|HARDWARE STRUCTURE||RAM is in form of chip .||ROM is generally optical drivers made of magnetic tapes.
|COST||Costlier than ROM.||Cheaper than RAM.
|SIZE||Chip size is larger than ROM.||Chip size is smaller than RAM.
|WRITING SPEED||Writing data to a RAM chip is a faster process.||Writing data to a ROM chip is a slow process.
|STORAGE LIMIT||A RAM chip can store multiple gigabytes(GB) of data, up to 16GB or more per chip.||A ROM chip typically stores only several megabytes(MB) of data, up to 4 MB or more per chip.
|EXAMPLES||Static and Dynamic RAM.||PROM, EPROM and EEPROM are types of ROM.
Download the ROM vs RAM difference table here.
Memory is an important element of a computer. Two types of memories are there –
- Random Access Memory (RAM) is volatile memory, which means that the stored information is lost when there is no power
- Read-only memory (ROM) permanently stores data on personal computers (PCs) and other devices. It does not depend upon voltage.
Hope you would have got the difference between RAM and ROM from above RAM vs ROM comparison table.
For more information on RAM vs ROM watch this Video –