More topics in Digital Logic Design and Digital Electronics Course

Memories in Digital Electronics – Classification and Characteristics

If you recall your school days, you could perhaps marvel at the sheer amount of things you had to learn and remember. All of us studied complex mathematical and scientific concepts. And crammed our brains with detailed accounts of historical facts and figures. And we even put out this knowledge on our answer sheets during the exams. The amount of information our brain can accept and store is amazing. Similarly, there is a concept of digital memories in the world of computers that helps them store data.

In computers, memory is the most essential component for the normal functioning of any system – to store data, to perform calculations, to do complex operations, etc. We know that almost all our information and data is stored in the Hard Disk within the CPU. The Hard Disk/Hard Drive/Hard Disk Drive has the most extensive memory in the computer system. But a lot of important data of a computing device is stored in what we will study in this article known as primary memory.

Ask yourself, is it sensible to access the hard disk for every small action? If we need to find a piece of simple information, is it worth to have the computer browse through Gigabytes of memory for just one minor information? Doesn’t this compromise the efficiency of the system? Shouldn’t there be separate memory systems that deal with the data critical for the computer’s operation?

These are all great questions and if these thoughts spring up in your mind, kudos to your thought process. We’ll address these questions in this post.

Primary and Secondary Computer Memory

Apart from the HDD, our computer has two other types of memory present. These memory types are used in storing small amounts of memory, or frequently used data which needs to be easily accessed.

This solves the problem of looking through the entire contents of the Hard Disk and also saves time and power. The computer memory is basically of two types –

  • Primary memory (RAM and ROM) and
  • Secondary memory (Hard Drive, CD, etc.).

The Primary Memory is also known as system memory. Whereas the Secondary Memory is called the Storage. The Secondary memory is physically located within a distinct storage devices, such as an HDD or a solid-state drive (SSD).

The secondary memory is connected to the computer either directly or over a network. As you can assume from their large sizes, the cost per GB of secondary memory is quite low. However, the speed of read/write operations is also considerably slower.

The Primary memory is located close to the Central Processing Unit on the motherboard. This enables the CPU to access information immediately. The processor thus gets an immediate response to any information needed, without much delay. These are expensive but very fast.

Memory Hierarchy
Memory Hierarchy

The Random Access Memory (RAM) is a primary-volatile memory, whereas the Read-Only Memory (ROM) is a primary-non-volatile memory.

Volatile? What is volatile memory and non-volatile memory?

Volatile memory is the memory that holds its data only when power is supplied to the system. Once the system loses power, all the data present in the memory is deleted. On the contrary, non-volatile memory is the memory that does not lose the contents of the memory in the absence of power. Thus, if you are working on something important, and it might be using a volatile memory like RAM, it would be recommended to save it repeatedly. In case you close the application by mistake, or the device shuts down unexpectedly due to a power cut, you will lose all progress you had been working on.

Under the Volatile Memory, there are two types of RAM –

  • SRAM (Static Random Access Memory) and
  • DRAM (Dynamic Random Access Memory).


The RAM (Random-Access Memory) is a type of volatile memory that aids in storing and retrieving information on a computer. Information on the RAM is accessed without any predetermined order, i.e. randomly; thus, the name Random Access Memory.

When we turn on the computer, the BIOS loads parts of the OS and drivers into memory. This allows the CPU to work on the instructions quicker and speeds up the booting process. After the OS has been booted, every program you run is loaded into the RAM memory first.

Since the RAM has such an important role to play, the amount of memory it holds has a lot of significance.

If a computer does not have much memory to boot the OS and handle the programs running on it, it will affect the performance and make the system slower. Hence, the larger the amount of memory a computer has, the more software and programs it can run and improve the efficiency of the PC.

A typical computer usually has about 8 GB of RAM. Newer systems can boast of having up to 64GBs. If you are using programs and software which take up a lot of space, such as Adobe, Photoshop, etc. you might need a more significant RAM Memory. But, even if you have sufficient memory but a lot of programs running at the same time, it might slow down the memory fetching operation of the RAM. We shall discuss the different types of RAM next.

Types of RAM

  • SRAM and
  • DRAM.


Static RAM is a random access memory type that retains information as long as power is provided to the SRAM. It does not have to be periodically refreshed.

But why termed as ‘Static’? This is because the data is held statically without any need of refreshing, i.e. the information in the memory is retained in the memory as long as power is supplied.

The SRAM gives quicker access to data and is more expensive than the next type of RAM we will be discussing, the DRAM.

When we want to look for a piece of data in any memory, it takes a while for the information to be accessed from the memory and to return the status of its availability, and the data (if present). The time taken for this action is called Access Time. The SRAM has a small access time, lasting about 10 nanoseconds.


The internal structure of an SRAM consists of six transistors. Two transistors, i.e. transistor 5 & 6, are pass transistors which are connected to the bit lines. They are used during the read-write operations to manage the availability of a memory cell.  The remaining four transistors (i.e. Transistors 1, 2, 3  and 4) form two cross-coupled inverters. Thus, transistors 1 and 2 forms one CMOS inverter pair, and the remaining two transistors, 3 and 4, form the other CMOS inverter pair. Due to the complex architecture of the SRAM, it costs more for manufacturing this memory. We shall now see the simplified circuit.

Simplified SRAM Structure
Simplified SRAM Structure

Thus, the SRAM stores a memory bit of information on between these two cross-coupled inverters. The two stable states of the inverters characterize 0 and 1. If we give the input to any transistor as 1, its output is zero, thus acting as the input for the next inverter, whose output is 1, and this is how the system remains running as long as power is present.

We can also have another system configuration with only 4 transistors in the architecture.


The only difference in this circuit is that the PMOS is replaced with high impedance resistors. Thus, this reduces the number of transistors being used. The only drawback of this circuit is that there is continuous power dissipation across the resistors, which results in heating of the system, and thus might degrade the performance and reduce the life of the SRAM.

Due to the intricate architecture and the increased manufacturing cost, the RAM on most computer motherboards is the DRAM.

Applications of the SRAM

Due to the high speed of operation, SRAM is used for cache memory and as part of the digital-to-analog converter on video cards. It is also found in CDs, printers, routers, DVDs and digital cameras.


The Dynamic RAM, also called DRAM, is the most common type of RAM in the computer. It is termed as ‘Dynamic’ because the system needs to be activated frequently, or made ‘dynamic’ so that it doesn’t lose its information. But why would it lose information? Let us learn about it in the next section. DRAM chips have an access time ranging between 50 to 150 nanoseconds, which is a bit more when compared with the SRAM.

DRAM Structure
DRAM Structure

A DRAM memory cell consists of a transistor and a capacitor within an integrated system. A data bit is stored in the capacitor. As we use the DRAM cell, the transistor has a small amount of leakage. The capacitors thus slowly discharge over the course of time, and the information contained in it might drain out. Hence, DRAM has to be periodically refreshed to maintain the data it is holding. A DRAM integrated circuit chip consists of dozens to billions of DRAM memory cells.

Applications of a DRAM

The DRAM is the main memory in computers and graphics cards. It is also used in many portable devices and video game consoles.

Types of DRAM?

  • Synchronous DRAM (SDRAM) – The SDRAM “synchronizes” the speed of the memory along with the CPU clock speed. By doing so, the memory controller (which is a digital circuitry managing the flow of data from and to the main memory) is aware of the exact clock cycle by which the demanded data will be ready. Thus, the CPU’s efficiency is improved, and it can do many more instructions at a given time. A typical SDRAM works at speeds of up to 133 MHz.
  • Rambus DRAM (RDRAM) – The Rambus DRAM is named after the company that introduced it, Rambus. It was mainly used for video game devices and on-computer graphics cards, having transfer speeds running up to 1 GHz.
  • Double Data Rate SDRAM (DDR SDRAM) – This memory has nearly double the bandwidth of a single data rate (SDR) SDRAM. It works on the principle of “double pumping” – this permits data to be transferred on both the rising & falling edges of the clock. This type of memory has been succeeded by the DDR2, DDR3, DDR4 and most recently, the DDR5 SDRAM.


The ROM (Read-Only Memory) is a type of non-volatile memory that aids in storing and retrieving information on a computer. As the name goes, this type of memory allows memory to be read-only. Since it is non-volatile, it does not require a constant power supply to retain the data stored in it. ROM is read-only and cannot have the data altered easily; thus, it is mainly used for firmware purposes.

What is a firmware?

A firmware is a software program or instruction sets that are embedded into hardware. It has instructions on how a device works and cooperates with the other hardware components linked to the system. Since this information need not be continuously meddled with, the amount of memory a ROM holds is small.

These are essential instructions for a system, such as loading the OS into the RAM, running hardware diagnostics, etc. The ROM chips are also crucial for the basic input/output system (BIOS), reading-writing to peripheral devices, data management, etc. and are programmed before they are included in the computer system.

In the earlier days, the ROM had to be removed and changed physically to change the contents of the memory. But now, there are new types of ROM which allow limited rewriting of instructions. We shall discuss these special types of ROM.

What are the different types of ROM?

  • PROM


The Programmable Read-Only Memory (or the PROM) is a type of ROM that can be programmed only once after its manufacturing.

After the initial programming, no other information can be altered, and the information written on the PROM is permanent. This memory is also described as FPROM (Field Programmable read-only memory) or an OTP (One-Time Programmable) memory.

This memory is better suited to prototyping and to low-volume applications. The process of programming the PROM memory is known as burning. To burn information into a PROM, we need to provide a file containing the required contents to be entered into the PROM. A Gang Programmer/Gang Burner then configures each connection as presented in the file.

When a PROM is initially made, all the bits on the memory read as bit 1. We can also consider this as fused-connections. If any bit needs to be changed to a 0, it is either etched or burned into the IC, i.e. a large number of current needs to be passed where we do not require a connection and thus blow the fuse. While doing so, if any error occurs in the programming or if there needs to be an update in the information, nothing can be done about it. The entire chip is discarded, and instead a new PROM chip is fabricated, thus having the same data entered into it.

PROM Gang Programmer
PROM Gang Programmer


Another type of ROM that has often replaced the PROM is the EPROM or the Erasable Programmable Read-Only Memory. This system uses a MOSFET as its main programmable component in the circuitry. This MOSFET has a ‘floating gate’, which means that the gate has not been connected yet. When the chip needs to be programmed, electrons are injected into this floating gate using high voltage, causing the flowing electrons to ‘tunnel’ into the gate. Once the application of high voltage has been removed, these electrons can no longer escape, thus charging the gate and hence, programming is complete.

When we say ‘erasable’, we mean that the information can be rewritten (to some extent). To erase the data written into the EPROM, the electrons which have been trapped need to be excited to escape from the MOSFET’s gate. For this role, ultraviolet light is used for reprogramming.

The EPROM chip is placed under UV light for some time, ranging between 5 to 30 minutes, after which this memory can be rewritten. An EPROM comes with a small quartz circular window which allows the UV rays to reach the chip. For this reason, the EPROM is also called the ‘windowed ROM’. A programmed EPROM can hold the data programmed in it for a minimum of 10 – 20 years. The EPROM can be reprogrammed only for a limited number of erasures, as excessive erasing damages the SiO2 layer and makes the EPROM unreliable.

EPROM Chips and Programming Device
EPROM Chips and Programming Device


The Electrically Erasable Programmable Read-Only Memory, also recognized as the EEPROM or the E2PROM, is another type of ROM which is extensively used in computing systems. This type of ROM is not only programmed electronically but also erasures to the information in the memory are done electronically.

Unlike the PROM and the EPROM chips, the EEPROM memory chips need not be removed for programming, thus eliminating any possible delays of correcting or updating the data contained in the memory.

The only problem which arises is that the entire contents of the memory need to be rewritten, and not selective erasure. Like the EPROM, this memory can also be programmed only a limited number of times, about a few hundred times. Modern EEPROMs can be programmed around a few million times.

The EEPROMs are calibrated as arrays of floating-gate transistors. One type of EEPROM is the Flash Memory, where selective updating can be done for the information.

EEPROM is mainly used in digital potentiometers, digital temperature sensors, and real-time clocks.

Flash Memory

  • Flash memory is a non-volatile memory used for storage purposes and for transferring information between devices.
  • It is a developed version of the EEPROM memory, where data can be electronically programmed as well as erased.
  • In Flash memory, the data is block-erasable. Whereas in EEPROM the data is byte-erasable.
  • Additionally, in practice, flash memories are rewritten constantly. Whereas EEPROM memories are seldom rewritten.
  • Like the EEPROM, flash memory implements floating-gate transistors or floating-gate MOSFET (FGMOS) in the internal architecture too.
  • The Flash memory is similar to the standard MOSFET, except that the transistor has two gates and not one.
  • Flash memory is reasonable to purchase than conventional EEPROM memories and does not require batteries for solid-state storage.
  • It has high-speed access time.
  • It also has excellent resistance to kinetic shock.
  • These memory sticks are incredibly durable, with the ability to withstand intense pressure or extreme temperatures.
  • Flash memory is often found in USB drives, iPods, MP3 players, and many more portable electronics.

Types of Flash memories?

  • NOR flash memory
  • NAND flash memory

The NOR flash connects individual memory cells parallelly, allowing data to be accessed randomly. The NAND flash instead has fewer but lines with the FGMOS stringed together to increase the storage density of the memory cell. Thus, NAND is better suited for random accessing of data in a serial fashion.

Flash memories based on the NOR architecture are really good in reading data quickly, but slower on writing and erasing functions when compared to the NAND flash. The NOR flash memory programs data byte-by-byte, whereas the NAND memory programs data in pages, where each page might be having a memory of 4KB. Since NOR deals with a small amount of memory, it consumes more power than the NAND flash memory for writing data. Sometimes devices such as digital cameras incorporate both the NAND and NOR flash memories.

What is the difference between RAM and ROM?

Factors RAM ROM
Nature of working Volatile memory – needs power supply Non-volatile memory – doesn’t need power
Speed Fast Not as fast as RAM
Storage Capacity High Capacity, ranging from 1 to 256 GB Low Capacity of about 4-8MB
Space it occupies RAM data takes a lot of space RAM takes up less space
Cost More expensive Affordable
Data Can be altered anytime Cannot be modified/limited changes permitted but not done easily
Application Used to store program codes which CPU needs immediately Used to store booting instructions or firmware coding

What is the difference between SRAM and DRAM?

Number of transistors 6 Transistors 1 Transistor
Charge Leakage Not evident A lot of discharge happens, thus there is a refresh circuitry
Speed Quite fast Comparatively slower
Power Consumption Low High
Space it occupies Less space More space
Cost Expensive Cheap
Density Less dense Denser
Application Cache Memory Main memory

What is the difference between EPROM and EEPROM?

The medium of erasure of data UV Light is used to erase data An electrical signal is used to delete data
Updating is done by Need to eject the EPROM chip to update the data No ejection is required for reading or erasing the data
Timeline of technology This is an older technology. This is a newer technology.
Design on the case Has a transparent quartz crystal window on the top The memory is entirely enclosed in an opaque case.
Preceded by EPROM is the updated version of the PROM. EEPROM is the updated version of the EPROM.
Time for erasing Erasing the contents takes about 15-20 minutes. Erasing the contents takes about 5ms only.
Programming Technique A hot electron injection technique is used for reprogramming the EPROM. The tunnel effect is used for programming the EEPROM.

Cache Memory

The Cache memory, also known as the CPU Memory, is a fast-operating static RAM (SRAM) that can be more easily accessed by the processing unit as compared to regular RAMs. Since it is designed using the SRAM, it is more expensive. It is also faster than other memories.

The cache memory usually appears together on the same chip as the computers’ microprocessors, with the chip area being too small. Thus, the cache size is just a fraction of the main memory, being comparatively small. The cache access time is as less as one clock cycle, whereas the main memory access requires several clock cycles.

What is a cache hit and a cache miss?

When the main memory address needs to be accessed by the processor for reading/write operations, we first go to the cache memory and search for a copy of the location. If we find it, it is a cache hit, and the processor can continue with the operations immediately.  However, if the copy is absent, it is referred to as a cache miss, and we must first read this address (with some neighboring ones too, in case of future referencing) into the cache memory.

Here’s an example scenario to understand.

Let us say you want to get a book from your local library. You meet the librarian and ask where you can get the book. Now, two things are possible. First- the librarian immediately lets you know where the book is. This is somewhat a cache hit. Second- the librarian goes to their system, checks the department/shelf where you can find it, and inform you of the location of this shelf, probably mentioning the neighboring departments as well. This can be viewed as a cache miss.

What are the different types of cache memories?

  • Primary Cache – Most of the cache is located together close to the CPU processor itself on the same die. This is called the Primary Cache.
  • Secondary Cache – This can be considered as an extension of the cache memory located on a separate chip on the computer motherboard, but close to the CPU.

About The Writer


Leave a Reply

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