Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
What is Memory in Computer?
3.
Types of Memory in Computer
4.
Primary Memory
4.1.
RAM(Random access memory)
4.1.1.
SRAM(Static Random Access Memory)
4.1.2.
DRAM(Dynamic Random Access Memory)
4.2.
ROM(Read Only Memory)
4.2.1.
MROM(Mask ROM)
4.2.2.
PROM(Programmable ROM)
4.2.3.
EPROM(Erasable Programmable ROM)
4.2.4.
EEPROM(Electrically Erasable Programmable ROM)
5.
Secondary Memory 
6.
Cache
7.
Registers 
8.
Frequently  Asked Questions
8.1.
What are the 3 types of computer memory?
8.2.
What is primary and secondary memory?
8.3.
What is ROM and RAM?
8.4.
What are the 4 types of ROM?
8.5.
What is RAM in computer?
9.
Conclusion
Last Updated: Apr 21, 2024
Easy

Types of Computer Memory

Author Jainish Patel
0 upvote

Introduction

Computer memory encompasses various data storage technologies used by computers. It comprises a combination of memory types within a computer system. 

 Types of Computer Memory

A computer system is made up of a combination of types of computer memory, i.e Primary memory, Secondary memory, Cache, and register in computer systems.

What is Memory in Computer?

The electronic storage area in a computer called memory is where information and instructions are kept either permanently or temporarily so that the CPU can process them. Secondary storage and primary memory are two types of memory in computers. Random Access Memory, or RAM, is a volatile memory that gives the CPU quick access to data while a program is running. It stores the data, applications, and operating systems that are now being used. Hard drives and solid-state drives (SSDs) are examples of non-volatile secondary memory that retain data permanently even after the power is switched off. It provides long-term file, document, and application storage. Primary and secondary memory work together to store both temporary and permanent data, which is necessary for a computer system to operate smoothly. 

Types of Memory in Computer

Let’s discuss the various types of memories in computers. Broadly, memory is divided into Primary memorySecondary memoryCache, and register.

  • Primary Memory
     
  • Secondary Memory
     
  • Cache
     
  • Register

Primary Memory

A key part of a computer's memory architecture is primary memory, sometimes known as RAM (Random Access Memory). It serves as a storage area for information and commands that the CPU is now using or processing. Primary memory is volatile, meaning that when the power is switched off, the contents are lost, in contrast to secondary memory, which is non-volatile. RAM gives the CPU instant access to data, enabling speedy information retrieval and manipulation while running programs. It allows for smooth multitasking and effective program execution by storing the operating system, open applications, and active data. Because it directly affects the speed and responsiveness of the system's activities, primary memory is essential to a computer system's overall performance.

RAM(Random access memory)

RAM is the CPU's internal memory in the form of a hardware device on the computer's motherboard. RAM is a volatile memory which means whenever the system shuts down the data stored in the RAM will get lost. As a precaution UPS(Uninterruptible Power System) is used so that if there is a sudden power cut user gets some time to save his/her work into the Hard Disk.

It is also known as the primary memory of the computer. RAM is pretty fast, but it is very limited and generally smaller than ROM. 

RAM is divided further into two types:

random access memory

SRAM(Static Random Access Memory)

SRAM is a type of semiconductor memory that stores each bit using bistable latching circuitry. This makes it highly fast. But with that, it consumes more power and also produces more heat. SRAM is faster than DRAM, but it is pretty expensive. It is also used as cache memory.

DRAM(Dynamic Random Access Memory)

DRAM is a different type of RAM, which stores each bit of data in its own capacitor within an integrated circuit. This means that each memory cell on a DRAM chip is made up of a transistor and a capacitor and holds one bit of data. The memory controller must read the data and then rewrite it in order to keep the data fresh. As a result, DRAM is slower and cheap compared to SRAM. DRAM consumes less power and also generates less heat. 

DRAM is used as the main memory. DRAM is usually fitted in laptops and computers. Generally available in 4GB, 8GB, 16GB, 32GB and many more.

ROM(Read Only Memory)

ROM refers to read-only memory. It's a type of non-volatile memory that keeps data even after the power is switched off. It's a computer's primary memory, just as RAM. Because the programs and data stored in it can be read but not written, it is referred to as read-only memory.

ROM(Read Only Memory)

ROM is divided further into four types:

types of ROM

MROM(Mask ROM)

Mask ROM is a type of read-only memory that is masked off during the manufacturing process. Mask ROM, like other varieties of ROM, does not allow the user to change the data stored in it. The process would be difficult or slow.

PROM(Programmable ROM)

PROM stands for "Programmable read-only memory," which means that the data can only be overwritten once. It is distinguished from conventional ROM by the fact that it is a blank memory chip, whereas ROM is pre-programmed. 

EPROM(Erasable Programmable ROM)

Using ordinary ROMs and PROMs, despite their low cost, could be inefficient because they cannot be overwritten and reused. It can be reprogrammed. To erase data from it, expose it to ultraviolet light for up to 40 minutes.

EEPROM(Electrically Erasable Programmable ROM)

EEPROM works the same as the EPROM, the only difference is that in EPROM, the data get erased by ultraviolet light, whereas in EEPROM, data can to erased using an electric field.

Secondary Memory 

Secondary memory is non-volatile, persistent computer memory that is not directly accessed by a computer or processor, and it processes data at a slower rate. It allows a user to store data that can be accessed, transmitted, and used by applications and services in real time. Secondary memory is less crucial than primary memory because it is essentially more storage for more data. The secondary memory is also termed auxiliary memory or external memory. 

One of the reasons we have secondary memory is, it is essential to have another form of memory that has a high storage capacity and from which data and programs are not lost when the computer turns off. 

There are generally two types of secondary memory: 

  • Fixed Storage
     
  • Removable Storage

Cache

There are many contents of the main memory that we frequently access, so those contents and data are saved in the cache memory to make the access time as low as possible.

So that whenever the CPU wants to access those contents, it directly searches in cache memory, and if it doesn’t find them there, it moves to the main memory. In short, Cache memory is a very high-speed memory.

It can be costlier than main memory or other memories but is very economical to the CPU. We can also say that it acts as a buffer between the CPU and the RAM. IT reduces the average access time and stores the copy of the data and contents of the frequently used locations. 

There are mainly two types of Cache:

  1. Primary Cache: It is the type of Cache always located on the processor chip. Its access time is significantly less than the processor register and is very small in size.
     
  2. Secondary Cache: It is placed between the rest of the memory and the cache memory. It is also known as Level 2 cache, and it is also placed on the processor.

Registers 

A Register is a group of flip-flops. Its basic functionality is to hold data within any digital system to make it available to the logic units for the computing process. However, it may also have additional capabilities.

The flip-flops in a register contain the binary data, whereas the logical gates control the data flow, i.e., how and when the data are transferred into the register.

In general, we have two major types of Registers:

  • Parallel Load Registers
     
  • Shift Registers

You can also read about layered structure of operating system.

Frequently  Asked Questions

What are the 3 types of computer memory?

The three types of computer memory are: Primary Memory (RAM), Secondary Memory (Storage Devices), and Cache Memory. 

What is primary and secondary memory?

A key part of a computer's memory architecture is primary memory, sometimes known as RAM (Random Access Memory).Secondary memory is non-volatile, persistent computer memory that is not directly accessed by a computer or processor, and it processes data at a slower rate. 

What is ROM and RAM?

ROM refers to read-only memory. It's a type of non-volatile memory that keeps data even after the power is switched off. RAM is the CPU's internal memory in the form of a hardware device on the computer's motherboard. RAM is a volatile memory which means whenever the system shuts down the data stored in the RAM will get lost.

What are the 4 types of ROM?

The four types of ROM (Read-Only Memory) are: Mask ROM, Programmable ROM (PROM), Erasable Programmable ROM (EPROM), and Electrically Erasable Programmable ROM (EEPROM). 

What is RAM in computer?

RAM is the CPU's internal memory in the form of a hardware device on the computer's motherboard. RAM is a volatile memory which means whenever the system shuts down the data stored in the RAM will get lost. As a precaution UPS(Uninterruptible Power System) is used so that if there is a sudden power cut user gets some time to save his/her work into the Hard Disk.

Conclusion

In this blog, we thoroughly discussed types of computer memory. We started with the introduction to computer memory and later understood each types of computer memory. We further learned about RAM, DRAM, SRAM, ROM, PROM, and many more. 

Recommended Reading: 

Do check out The Interview guide for Product Based Companies as well as some of the Popular Interview Problems from Top companies like Amazon, Adobe, Google, Uber, Microsoft, etc. on Coding Ninjas Studio.

Also check out some of the Guided Paths on topics such as Data Structure and Algorithms, Competitive Programming, Operating Systems, Computer Networks, DBMS, System Design, etc. as well as some Contests, Test Series, Interview Bundles, and some Interview Experiences curated by top Industry Experts only on Coding Ninjas Studio.

Live masterclass