Published on

Computer Memory | Types of Memory | Computer Fundamental

Computer Memory

In this article, we studied how the different types of inpute devices are used to enter different types of data in the computer. But when the data and instructions are entered in the computer, Where they are stored. In fact, inside the computer, there are different storage areas where it keeps data or information parmanently or temporarily while working. This storage area is called memory.

What is the computer memory?

computer memory is any physical device capable of storing information temporarily or permanently, like RAM (Random Access Memory) or ROM (Read Only Memory).

Memory devices utilize integrated circuits and are used by operating systems, software and hardware components.

Types of computer memory

Computer memory is divided into two types: Volatile (RAM) and Non-Volatile (ROM). The secondary memory (Hard Disk) is reffered as storage not memory.

But if we categorize memory on befalf of space or location, it is of four types:

  • Register Memory
  • Cache Memory
  • Primary Memory
  • Secondary Memory

Register Memory

Register memory are the samllest fastest memory in a computer. It is not a part of main memory and is located in the Proccessor in the form of registers. These are memory locations that can be directly accessible by the processor. It holds small amount of data around 32-bits to 64-bits and may hold an instruction, a storage address or any kind of data such as a bit sequence or individual characters.

Types and functions of register memory

  • Data Register (DR) : It is a 16-bit register, which is used to store operands (variables) to be operated by the processor. It temporarily stores data, which is being transmitted to or received from main memory.

  • Address egister (AR) : It is a 12-bit register that stores the address of a memory location where instructions or data is stored in the memory.

  • Program Counter (PC) : It is a 12-bit register that holds the address of the next instruction to be executed.

  • Instructor Register (IR) : It is a 16-bit register. It stores the instruction which is fetched from the main memory. So, it is used to hold instruction codes, which are to be executed. The Control Unit takes instruction from Instructor Register, then decodes and executes it.

  • Accumulator Register (AC) : It is a 16-bit register, which is used to store the results produced by the system. For example, the results generated by CPU after the processing are stored in the AC register.

  • Temporary Register (TR) : It is a 16-bit register, which is used to store temporary results.

  • Input Register (INPR) : It is a 8-bit register, which is used to store the input characters.

  • Output Register (OUTPR) : It is a 8-bit register, which is used to store the output characters.

Cache Memory

Cache Memory is a special very high-speed memory. It is used to speed up and synchronizing with high-speed CPU. Cache memory is costlier than main memory or disk memory but economical than CPU registers. Cache memory is an extremely fast memory type that acts as a buffer between RAM and the CPU. It holds frequently requested data and instructions so that they are immediately available to the CPU when needed.

Types of Cache Memory

  • L1 Cache : Level 1 Cache a small amount of memory is present in the CPU. If a CPU has four core, then there are four L1 caches. It can work at the same speed as of the CPU. The size of this memory range from 2KB to 64KB.

  • L2 Cache : Level 2 Cache may be inside the CPU or outside the CPU. All the cores of a CPU can have their own separate L2 cache, or they can shere one L2 cache among themselves. In case it is outside the CPU, it is connected with the CPU with very high speed bus. The size of this memory range from 256KB to 512KB.

  • L3 Cache : Level 3 cache is not present in all the processors; some high-end processors have a L3 cache. This cache is used to enhance the performance of L1 and L2 cache. The size of this memory range from 1MB to 8MB. It is located outside the CPU and shared by all the cores of the CPU.

Primary Memory

Primary memory is also known as main memory or may also refer to "Internal Memory" and primary storage. All those types of memories that are directly accessible by the CPU using data bus are called primary memory.

Types of Primary Memory

RAM (Volatile Memory)

RAM, which stands for Random Access Memory, is a hardware device generally located on the motherboard of a computer and acts as an internal memory of the CPU. It allows CPU store data, program, and program results when you switch on the computer. It is the read and write memory of a computer, which means the information can be written to it as well as read from it.

RAM is a volatile memory, which means it does not store data or instructions permanently. When you switch on the computer the data and instructions from the hard disk are stored in the RAM, CPU utilizes this data to perform the required tasks. As soon as you shut down the computer, the RAM loses the data. So, the data remains in the RAM as long as the computer is on and lost when the computer is turned off. The benefit of loading data into RAM is that reading data from the RAM is much faster than reading from the hard drive.

Types of RAM:

  1. Static RAM (SRAM):

It stores the data in a static form which means that the data remains in the memory as long as the computer system is on. SRAM is faster and more expensive than DRAM. It uses of six transistors and no capacitors. As the transistors do not need the power to prevent leakage, hence there is no requirement to refresh SRAM again and again.

  1. Dynamic RAM (DRAM):

DRAM is widely used in computer systems. Previously, there was a single data rate (SDR) DRAM in computers. At present computer are using dual data rate (DDR) DRAM. DDR is also available in different versions such as DDR2, DDR3 and DDR4, which are more energy-efficient and are providing better performance.

DRAM is cheap, small and uses less power than other RAMs. DRAM is made up of transistors and a capacitor in each cell, Because of a capacitor, it has a leakage problem. Therefore, DRAM requires constant refreshing.

ROM (Non-Volatile Memory)

ROM, which stands for read only memory, is a memory device or storage medium that stores information permanently. It is also the primary memory unit of a computer along with the random access memory (RAM). It is called read only memory as we can only read the programs and data stored on it but cannot write on it. It is restricted to reading words that are permanently stored within the unit.

The manufacturer of ROM fills the programs into the ROM at the time of manufacturing the ROM. After this, the content of the ROM can't be altered, which means you can't reprogram, rewrite, or erase its content later. However, there are some types of ROM where you can modify the data.

For example, when you start your computer, the screen does not appear instantly. It takes time to appear as there are startup instructions stored in ROM which are required to start the computer during the booting process. The work of the booting process is to start the computer. It loads the operating system into the main memory (RAM) installed on your computer. The BIOS program, which is also present in the computer memory (ROM) is used by the microprocessor of the computer to start the computer during the booting process. It allows you to open the computer and connects the computer with the operating system.

ROM is also used to store Firmware, which is a software program which remains attached to the hardware or programmed on a hardware device like a keyboard, hard drive, video cards, etc. It is stored in the flash ROM of a hardware device. It provides instructions to the device to communicate and interact with other devices.

Types of ROM:

  1. Masked Read Only Memory (MROM):

It is the oldest type of read only memory (ROM). It has become obsolete so it is not used anywhere in today's world. It is a hardware memory device in which programs and instructions are stored at the time of manufacturing by the manufacturer. So it is programmed during the manufacturing process and can't be modified, reprogrammed, or erased later.

  1. Programmable Read Only Memory (PROM):

PROM is a blank version of ROM. It is manufactured as blank memory and programmed after manufacturing. We can say that it is kept blank at the time of manufacturing. You can purchase and then program it once using a special tool called a programmer.

To write data onto a PROM chip; a device called PROM programmer or PROM burner is used. The process or programming a PROM is known as burning the PROM. Once it is programmed, the data cannot be modified later, so it is also called as one-time programmable device.

  1. Erasable and Programmable Read Only Memory (EPROM):

EPROM is a type of ROM that can be reprogramed and erased many times. The method to erase the data is very different; it comes with a quartz window through which a specific frequency of ultraviolet light is passed for around 40 minutes to erase the data. So, it retains its content until it is exposed to the ultraviolet light. You need a special device called a PROM programmer or PROM burner to reprogram the EPROM.

  1. Electrically Erasable and Programmable Read Only Memory (EEPROM):

ROM is a type of read only memory that can be erased and reprogrammed repeatedly, up to 10000 times. It is also known as Flash EEPROM as it is similar to flash memory. It is erased and reprogrammed electrically without using ultraviolet light. Access time is between 45 and 200 nanoseconds.

The data in this memory is written or erased one byte at a time; byte per byte, whereas, in flash memory data is written and erased in blocks. So, it is faster than EEPROM. It is used for storing a small amount of data in computer and electronic systems and devices such as circuit boards.

  1. FLASH ROM:

It is an advanced version of EEPROM. It stores information in an arrangement or array of memory cells made from floating-gate transistors. The advantage of using this memory is that you can delete or write blocks of data around 512 bytes at a particular time. Whereas, in EEPROM, you can delete or write only 1 byte of data at a time. So, this memory is faster than EEPROM.

It can be reprogrammed without removing it from the computer. Its access time is very high, around 45 to 90 nanoseconds. It is also highly durable as it can bear high temperature and intense pressure.

Secondary Memory

The secondary storage devices which are built into the computer or connected to the computer are known as a secondary memory of the computer. It is also known as external memory or auxiliary storage.

The secondary memory is accessed indirectly via input/output operations. It is non-volatile, so permanently stores the data even when the computer is turned off or until this data is overwritten or deleted. The CPU can't directly access the secondary memory. First, the secondary memory data is transferred to primary memory then the CPU can access it.

Types of Secondary Memory:

  1. Hard Disk Drive (HDD):

The hard disk is also known as a hard drive. It is a rigid magnetic disc that stores data permanently, as it is a non-volatile storage device. The hard disk is located within a drive unit on the computer's motherboard and comprises one or more platters packed in an air-sealed casing. The data is written on the platters by moving a magnetic head over the platters as they spin. The data stored on a computer's hard drive generally includes the operating system, installed software, and the user's files and programs, including pictures, music, videos, text documents, etc.

  1. Solid State Drive (SSD):

SSD (Solid State Drive) is also a non-volatile storage medium that is used to hold and access data. Unlike a hard drive, it does not have moving components, so it offers many advantages over SSD, such as faster access time, noiseless operation, less power consumption, and more.

As the cost of SSD has come down, it has become an ideal replacement for a standard hard drive in desktop and laptop computers. It is also suitable for notebooks, and tablets that don't require lots of storage.

  1. Compact Disk (CD):

Compact Disk is a portable secondary storage device in the shape of a round medium disk. It is made of polycarbonate plastic. The concept of CD was co-developed by Philips and Sony in 1982. The first CD was created on 17 August 1982 at the workshop of Philips in Germany.

In the beginning, it was used for storing and playing sound recordings, later it was used for various purposes such as for storing documents, audio files, videos, and other data like software programs in a CD.

  1. Pen drive:

Pen drive is a compact secondary storage device. It is also known as a USB flash drive, thumb drive or a jump drive. It connects to a computer via a USB port. It is commonly used to store and transfer data between computers. For example, you can write a report using a computer and then copy or transfer it in the pen drive. Later, you can connect this pen drive to a computer to see or edit your report. You can also store your important documents and pictures, music, videos in the pen drive and keep it at a safe place.

  1. SD Card:

SD Card stands for Secure Digital Card. It is most often used in portable and mobile devices such as smartphones and digital cameras. You can remove it from your device and see the things stored in it using a computer with a card reader.

There are many memory chips inside the SD card that store the data; it does not have moving parts. SD cards are not created equal, so they may differ from each other in terms of speed, physical sizes, and capacity. For example, standard SD cards, mini SD cards, and micro SD cards.