Search anything:

Types of memory devices

Binary Tree book by OpenGenus

Open-Source Internship opportunity by OpenGenus for programmers. Apply now.

In this article, we have covered the different types of memory devices like CD-ROM, SD card and much more.

Table of contents:

  1. Introduction
  2. Primary memory
  3. Secondary memory


A memory device is a piece of hardware used to store data. Most electronic devices such as computers, mobile phones, tablets, etc all have a storage device that stores data and/or programs.

There are two basic types of memory:

  1. Primary/main memory
  2. External/secondary memory

The different types of memory devices are:

  • Primary Memory
    • Random Access Memory(RAM)
      • Static RAM (SRAM)
      • Dynamic RAM (DRAM)
    • Read-Only memory(ROM)
      • MROM
      • PROM
      • EPROM - Erasable programmable read-only memory
      • EEPROM - Electrically Erasable and Programmable ROM
  • Secondary Memory
    • Hard disk drives (HDD)
    • Solid-state drive (SSD)
    • Optical discs
      • CD-ROM - Compact Disc Read-Only Memory
      • CD-R - Compact Disc-Recordable
      • CD-RW - Compact Disk Re-Writable
    • USB Flash Drive
    • SD Card
    • Magnetic Tape
    • Floppy Disk

We will dive into each time in more depth.

Primary memory

Primary memory is the internal memory of the computer and can be directly accessed by the processor. The memory capacity of the primary memory is limited.

There are two types of primary memory:

  1. Random Access Memory(RAM)
  2. Read-Only memory(ROM)

1. Random-access memory (RAM)

Random-access memory is a read/write memory used to store data and currently running programs. It is volatile as the data stored in RAM is lost when the power is turned off.
RAM is stored on the motherboard in modules called DIMMs(Dual Inline Memory Module).
The speed and performance of a computer are directly related to the size of the RAM. A computer with more RAM can run more programs and has better performance.

There are two types of RAM:

  1. Static RAM(SRAM)
    SRAM was invented by Robert H. Norman at Fairchild Semiconductor in 1963.
    Uses sequential circuits i.e flip-flops to store data, therefore, it does not need to be periodically refreshed.

  2. Dynamic RAM(DRAM)
    DRAM was invented in 1968 by Robert Dennard.
    Uses capacitors and transistors to store the data. Due to the discharge of capacitors, they need to be periodically refreshed with electricity otherwise there will be data loss.

Use case: Temporarily stores data and programs that the processor requires during program execution, load applications, and read files.

Capacity: Most modern computers and phones have from 2GB up to 32GB of RAM. In laptops, it's common to have 4GB, 8GB, or 16GB.

Estimated cost: The price of 16GB RAM varies from $60-$80 depending on the brand.


  • Faster than secondary storage.
  • Consumes less power compared to disk drives thus increasing the battery life.
  • RAM can read and write any type of data.
  • RAM increases the computer speed.


  • RAM is expensive.
  • Has limited storage capacity.
  • Since it is volatile memory, data is lost when power is turned off.

2. Read-only memory (ROM)

ROM only allows read-only operations. ROM is non-volatile, therefore the data stored on it is not lost even when the power is switched off.
Data stored on ROM cannot be altered or changed.
ROM is useful for storing data such as BIOS that is used to perform start-up procedures when the computer is turned on.

There are four types of ROM:

  1. MROM
    Masked ROM is ROM that is hard-wired and pre-programmed. Once data has been written on it, it cannot be altered.
  2. PROM - Programmable read-only memory
    Programmable ROM can only be programmed once by the user. It is not erasable.
    PROM was invented in 1956 by Wen Tsing Chow.
  3. EPROM - Erasable programmable read-only memory
    Dov Frohman who worked at Intel invented erasable programmable read-only memory (EPROM) in 1971.
    EPROM is a memory device whose content can be erased by exposing it to UV light. It allows users to write new data on it after erasing.
  4. EEPROM - Electrically Erasable and Programmable ROM
    Eli Harari invented the Floating Gate EEPROM (Electrically Erasable Programmable Read-Only Memory) in 1977.
    The content on EEPROM can be programmed and erased electrically.

Use cases

  • ROM is used mostly to store software that is rarely changed during the life of the system. This is quite useful in embedded systems where the programming does not need to change.
  • ROM is used in electronic devices such as mobile phones to store media, files, and programs.

Capacity: Most smartphones nowadays have ROM ranging from 8GB to 256GB and more.


  • Non-volatile, data is retained when power is turned off.
  • Cheaper as compared to RAM.
  • Since ROM is static, it does not require refreshing.


  • Slower than RAM.

Secondary memory

It is also known as auxiliary memory. Secondary memory is not directly accessible by the processor.
It is a non-volatile memory so the data is retained even in the event of power failure. It can store large amounts of data when compared to main memory. It is slower than the main memory.
Secondary memory is also cheaper than primary memory.

Some common examples of secondary memory include:

1. Hard disk drives (HDD)

A hard disk is a magnetic storage device that uses mechanical platters and a moving read/write head to access data.
Hard disk drives were introduced in 1956 by IBM for secondary storage for general-purpose computers.

Use cases: Mainly used for storage of data like pictures, music, videos, text documents, and backing up of files and data.

Amount of data that can be stored: Hard disks have a variety of options for the storage capacity depending on the needs of the user. The capacity can be anywhere from 250GB to 20TB. The standard capacity for most users is 500GB.

Estimated cost: The price of a 500GB hard disk varies from $25-$45 depending on the brand.


  • Non-volatile thus offer persistent storage.
  • Cheaper as compared to an SSD of the same capacity.
  • They have a larger base storage capacity, especially for computers as compared to SSDs.


  • Consumes a lot of power when writing data since they rely on the rotation of the platter disks and the movement or read/write head.
  • They produce a lot of noise during operation due to the movement of the mechanical moving parts.
  • More vulnerable to mechanical failure since they contain moving parts.
  • Slower read and write speeds compared to SSDs.

2. Solid-state drive (SSD)

A solid-state drive is a non-volatile storage device used to store data. The first of SSDs were RAM-based and invented by StorageTek in 1978. Flash memory-based SSDs were introduced in 1989 by Western Digital.

SSDs are replacing hard disk drives as they offer better performance. They are better than hard disks since they do not contain any moving components thus they are faster, consume less power, and do not produce noise during operation.

Use cases: used by enterprise servers due to their fast read and write speeds, for gaming computers and businesses that work with huge amounts of data since access times are critical.

Storage capacity: SSDs for computers are available from 120GB up to 30.72TB capacities.

Estimated cost: The price of 512GB SSDs varies from $55-$70 depending on the brand.


  • Faster than hard drives thus offering shorter boot times for the computer and fast data transfer.
  • Since they don't require as much power as hard drives, this results in longer battery life for the computers.
  • Energy efficient as compared to hard disks as they don't contain any movable parts.
  • They are more durable even when dropped as they don't contain movable parts.


  • Have a shorter lifespan than hard drives as they decay with each write cycle.
  • More expensive than hard drives when comparing cost per GB of space.
  • Limited storage space.

3. Optical discs

An optical disc is an electronic data storage medium that uses optical storage techniques and technology to read and write data.

Optical discs are mainly used as portable and secondary storage devices.
The most commonly used forms of optical discs are: Compact discs(CDs), Digital Video Discs(DVDs), Blu-ray discs(BD).

  • CDs were co-created by Sony and Philips and were first manufactured in August 1982 can store up to 700MB of data.
  • DVDs were invented in 1995. The largest capacity of the DVD is 17.04GB.
  • Blu-ray discs can store up to 50GB of data.

Use cases: used to transfer data between computers, store large amounts of data, like videos, photos, music, etc.

Types of Compact Disc(CD)

  1. CD-ROM - Compact Disc Read-Only Memory
    It is an optical disc containing audio or data added by a manufacturer. It is read-only thus computers can only read but not write or alter the contents of a CD-ROM.
    A CD-ROM Drive is a device used to read CD-ROM.

  2. CD-R - Compact Disc-Recordable
    A CD-R is a Write Once Read Multiple(WORM) disc. It can record data once and then the data becomes permanent on the disc. After writing data to a CD-R, it becomes a CD-ROM and the disc cannot be recorded onto again.

  3. CD-RW - Compact Disk Re-Writable
    A CD-RW is an erasable disc that can be reused. The data on a CD-RW can be erased and recorded over again.

Advantages of optical discs

  • Optical discs can hold a lot of data, especially double-sided DVDs.
  • The cost of manufacturing is lower compared to other storage devices since they only require aluminum foils and plastics.
  • They are easy to use and operate.
  • Despite the discs being relatively large, they are still easily portable.
  • They are more stable than magnetic disks as they are not vulnerable to electromagnetic fields.

Disadvantages of optical discs

  • Prone to scratches that make the disc unreadable.
  • Compared to other modern storage devices such as HDDs and SSDs, they have a lower storage capacity.
  • They require special hardware such as the optical disk drive(ODD) to retrieve and/or store data on optical discs.

4. USB Flash Drive

It is a data storage device that includes a flash memory and an integrated Universal Serial Bus(USB) interface.
Most USB flash drives are removable, rewritable, and smaller than optical discs.

Use cases: It is used for storage of data, as a form of backup and transferring of computer files.

Storage capacity: USB flash drives have a capacity of up to 2TB.

Estimated cost: The price of 128GB USB flash drives varies from $20-$40 depending on the brand.


  • Small in size making them portable.
  • USB flash drives are affordable due to the low manufacturing cost.
  • Easy to use.
  • USB flash drives offer fast data transfer depending on factors such as USB version, USB controller device, and hardware bus.
  • Compatible with a wide variety of devices such as laptops, tablets, phones, etc.


  • It is easy to be corrupted by malware as it tends to be used in different computers.
  • Has a limited lifespan of up to 100000 cycles.
  • Easy to lose due to the small physical size.

5. SD Card

It is also known as Secure Digital Card. It is a small flash memory card designed to provide high capacity memory in a small size.
It was developed in August 1999 by SanDisk, Panasonic, and Toshiba.

Use cases: It is used in portable devices such as mobile phones, digital cameras, audio players, camcorders, etc.

Storage capacity: Most SD cards come in 8GB, 16GB, 32GB, 64GB and 128GB capacities.

Estimated cost: The price of 128GB SD cards varies from $17-$25 depending on the brand.


  • SD cards are more cost-effective as compared to other storage devices.
  • Since it is small in size, it is removable and portable.
  • Extends the storage space for smartphones.


  • Read/write speed is lower as compared to internal memory.
  • Has limited read/write cycles.

6. Magnetic Tape

A magnetic tape is a medium for magnetic storage made up of a thin, magnetizable coating on a long narrow strip of plastic film.
It was invented in 1928 in Germany.
It was widely used before CDs and DVDs were introduced.

Use cases: It is mostly used to record and store computer and video data.

Storage capacity: Maximum capacity of currently available magnetic tape is 10TB.

Estimated cost: It costs approximately $0.02 per GB.


  • Cheapest form of storage per megabyte of storage.
  • It can store large amounts of data up to 1TB per tape cartridge.
  • It can be recorded over and reused repeatedly.


  • Since it uses serial access to access data, it is slow to retrieve and access data.
  • It requires special equipment to record and read data on the tape.
  • Data may be corrupted if the tape is placed near a strong magnetic field.

7. Floppy Disk

It was invented by IBM in the year 1971. A floppy disk is a storage medium made of a thin and flexible magnetic storage medium in a square plastic enclosure lined with a fabric that removes dust particles from the spinning disk.
Floppy disks come in different sizes: 8 inches, 5.25 inches, and 3.5 inches. The most commonly used floppy disk is the 3.5-inch disk that can hold up to 1.44MB of data.
Nowadays, floppy disks are rarely used.

Use cases: It is used to move data and information between computers and other devices.

Storage capacity: Most common floppy disk can hold up to 1.44MB of data.

Estimated cost: The price of a 1.44MB floppy disk is approximately $1.5.


  • It is small and light-weighted making them portable.
  • Compatible with older systems especially computers made before the 2000s that do not have a CD/DVD drive.
  • It is relatively cheap although most manufacturers have discontinued production.
  • It has a small notch that offers write protection that prevents accidental modification of data.


  • It has slow data transfer rate.
  • Has limited storage capacity compared to most modern storage devices.
  • The heat and magnetic fields can cause file corruption.
  • Prone to physical damage due to the plastic casings used to make them.

With this article at OpenGenus, you must have a strong idea of the different types of memory devices.

Types of memory devices
Share this