Topic 3: Primary Memory or Main Memory

In a computer, primary memory is used to store data and instructions that are currently in use. It is a combination of numerous small cells that can store one single bit each. A bit is a memory unit that is either 0 or 1. Actually, the computer could not understand the data or instructions written in English or any other language. It converts it into binary to store or process.

A computer has two types of memory – Primary memory and Secondary memory. Throughout the processing, the primary memory is used to hold the current data, instructions, and intermediate results. The processor or CPU directly accesses it through the system bus. So that data can be read from and written to primary memory instantly. It provides the processor fast access to the data and instructions. These memories are limited in size and made of integrated circuits (IC).

Primary Memory is a type of computer memory that can be directly accessed by the CPU. It holds the current data, instructions, and intermediate results during processing.

Primary memories are classified as below:

DigitalG1 Classification of Primary Memory
Classification of Primary Memory

Difference between volatile and non-volatile memory

There are two types of primary memory – Non-Volatile and Volatile Memory. Non-volatile memory keeps its contents even when the computer is unpowered. Whereas volatile memory lost all its content when there is no power.

RAM (Random Access Memory)

Although RAM, ROM, Cache Memory, and CPU Registers all fall under the category of primary memory, yet in most cases, primary memory refers to RAM. RAM is an acronym for Random Access Memory. Its name originated from the fact that the data stored in it can be accessed in random order. It also means that each memory location of RAM has the same access time.
DigitalG1 Computer Memory or Primary Memory or Main Memory
RAM (Random Access Memory)
RAM is used to store the frequent data used by the CPU. It is a kind of read-write memory that is volatile in nature. Because of its high-speed, its per-gigabyte cost is higher than any secondary memory. That’s why most computer systems use secondary memory along with primary memory. At the time of processing, computer programs and other necessary data are loaded from secondary memory to RAM. So that it can be quickly fed to the CPU for processing. This data is frequently replaced with the next chunk of data that is about to be used. There are two types of RAM:

DRAM (Dynamic Random Access Memory)

DRAM is made of transistors and capacitors. Each pair of capacitor and transistor is responsible for a single bit. A capacitor stores binary information in the form of electric charges. They take a significant amount of time to charge and tend to discharge with time. So DRAM needs to refresh frequently to prevent data loss. Also, these are comparatively slower than SRAM.

DRAM is more popular because of its tiny size and low power consumption. A single DRAM can have billions of memory cells.

SRAM (Static Random Access Memory)

SRAM uses latching circuits (flip-flops) that can store binary information. As compared to DRAM, SRAM uses more transistors. They use 6 transistors to store a single bit. It can hold the stored information till the power is on. However, they don’t need to be refreshed and work much faster, yet they are more expensive.

ROM (Read Only Memory)

ROM is an acronym for read-only memory. It is a kind of non-volatile memory that can only be read by the processor. The information stored in it is written at the time of manufacturing and not supposed to alter in the future, such as BIOS, firmware, etc.

However, ROM is not written very often, yet technologies are available to write or program them –

    • PROM: Programmable Read Only Memory
    • EPROM: Erasable Programmable Read Only Memory
    • EEPROM: Electronically Erasable Programmable Read Only Memory
    • UV EPROM: Ultra-Violet Erasable Programmable Read Only Memory

Cache Memory

Cache memory is a small piece of high-speed memory often attached to the CPU. Cache memory serves as an extension for RAM and increases the CPU performance or throughput. Being made of SRAM and directly connected to the CPU, it is significantly much faster than RAM. It fetches the data and instructions from RAM that is to be used by the CPU in advance and makes it available when needed. Modern CPUs have more than one level of cache memory called L1, L2, and L3 cache.

CPU Registers

CPU registers are small capacity memory units inside the CPU. These memory units operate at very high speed and are used for specific purposes. It accumulates the necessary and expected data during processing, such as the memory address of current and next instructions, operands of the current instruction, and so on. Each CPU has various CPU registers as per the requirement. Following is a list of commonly used CPU registers:

    1. Accumulator (AC),
    2. Memory Address Register (MAR),
    3. General Purpose Registers,
    4. Program Counter (PC),
    5. Memory Data Register (MDR),
    6. Index Register (IR),
    7. Memory Buffer Register (MBR), etc.

Author – Aditya Saini

Please Share:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
Scroll to Top