Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • DSA
  • Practice Problems
  • C
  • C++
  • Java
  • Python
  • JavaScript
  • Data Science
  • Machine Learning
  • Courses
  • Linux
  • DevOps
  • SQL
  • Web Development
  • System Design
  • Aptitude
  • GfG Premium
Open In App
Next Article:
What is a Storage Device? Definition, Types, Examples
Next article icon

Computer Memory

Last Updated : 29 May, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Computer memory is just like the human brain. It is used to store data/information, and instructions. It is a data storage unit or a data storage device where data is to be processed, and instructions required for processing are stored. Both the input and output can be stored here.

  • It's faster than secondary memory (e.g., hard drives).
  • It is usually volatile, meaning it loses data when power is turned off.
  • A computer needs to run; a computer can't operate without primary memory.

Why is Memory Important?

Memory is the backbone of your computer’s performance. Here’s why it matters:

  • Stores what you’re working on: Memory holds the apps, games, or documents you’re using right now, like a web browser for research or a game like Minecraft.
  • Super fast compared to storage: It’s much faster than secondary storage (like hard drives or SSDs), so your computer can access data instantly.
  • Essential for running programs: Without memory, your computer couldn’t open apps, load games, or even start up. It’s like trying to do homework without a desk or books!

Think of memory as your computer’s short-term memory—it keeps everything handy for quick access, making your device fast and responsive for schoolwork, gaming, or chatting with friends.

How Does Computer Memory Work?

When you open a program, it is loaded from secondary memory into primary memory. Because there are various types of memory and storage, an example would be moving a program from a solid-state drive (SSD) to RAM. Because primary storage is accessed more quickly, the opened software can connect with the computer's processor more quickly. The primary memory is readily accessible from temporary memory slots or other storage sites.

Memory is volatile, which means that data is only kept temporarily in memory. Data saved in volatile memory is automatically destroyed when a computing device is turned off. When you save a file, it is sent to secondary memory for storage.

There are various kinds of memory accessible. Its operation will depend upon the type of primary memory used. But normally, semiconductor-based memory is more related to memory. Semiconductor memory is made up of IC (integrated circuits) with silicon-based metal-oxide-semiconductor (MOS) transistors.

Types of Computer Memory

In general, computer memory is divided into three types:

  • Primary memory
  • Secondary memory
  • Cache memory

Now we discuss each type of memory one by one in detail:

1. Primary Memory

It is also known as the main memory of the computer system. It is used to store data and programs, or instructions during computer operations. It uses semiconductor technology and hence is commonly called semiconductor memory. Primary memory is of two types:

  • RAM (Random Access Memory): It is a volatile memory. Volatile memory stores information based on the power supply. If the power supply fails/ interrupted/stopped, all the data and information on this memory will be lost. RAM is used for booting up or starting the computer. It temporarily stores programs/data which has to be executed by the processor. RAM is of two types:
    • S RAM (Static RAM): S RAM uses transistors and the circuits of this memory are capable of retaining their state as long as the power is applied. This memory consists of the number of flip flops with each flip flop storing 1 bit. It has less access time and hence, it is faster.
    • D RAM (Dynamic RAM): D RAM uses capacitors and transistors and stores the data as a charge on the capacitors. They contain thousands of memory cells. It needs refreshing of charge on capacitor after a few milliseconds. This memory is slower than S RAM.
  • ROM (Read Only Memory): It is a non-volatile memory. Non-volatile memory stores information even when there is a power supply failed/ interrupted/stopped. ROM is used to store information that is used to operate the system. As its name refers to read-only memory, we can only read the programs and data that are stored on it. It contains some electronic fuses that can be programmed for a piece of specific information. The information is stored in the ROM in binary format. It is also known as permanent memory. ROM is of four types:
    • MROM(Masked ROM): Hard-wired devices with a pre-programmed collection of data or instructions were the first ROMs. Masked ROMs are a type of low-cost ROM that works in this way.
    • PROM (Programmable Read Only Memory): This read-only memory is modifiable once by the user. The user purchases a blank PROM and uses a PROM program to put the required contents into the PROM. Its content can't be erased once written.
    • EPROM (Erasable Programmable Read Only Memory): EPROM is an extension to PROM where you can erase the content of ROM by exposing it to Ultraviolet rays for nearly 40 minutes.
    • EEPROM (Electrically Erasable Programmable Read Only Memory): Here the written contents can be erased electrically. You can delete and reprogram EEPROM up to 10,000 times. Erasing and programming take very little time, i.e., nearly  4 -10 ms(milliseconds). Any area in an EEPROM can be wiped and programmed selectively.

2. Secondary Memory

It is also known as auxiliary memory and backup memory. It is a non-volatile memory and used to store a large amount of data or information. The data or information stored in secondary memory is permanent, and it is slower than primary memory. A CPU cannot access secondary memory directly. The data/information from the auxiliary memory is first transferred to the main memory, and then the CPU can access it.

Characteristics of Secondary Memory

  • It is a slow memory but reusable.
  • It is a reliable and non-volatile memory.
  • It is cheaper than primary memory.
  • The storage capacity of secondary memory is large.
  • A computer system can run without secondary memory.
  • In secondary memory, data is stored permanently even when the power is off.

Types of Secondary Memory

1. Magnetic Tapes: Magnetic tape is a long, narrow strip of plastic film with a thin, magnetic coating on it that is used for magnetic recording. Bits are recorded on tape as magnetic patches called RECORDS that run along many tracks. Typically, 7 or 9 bits are recorded concurrently. Each track has one read/write head, which allows data to be recorded and read as a sequence of characters. It can be stopped, started moving forward or backwards or rewound.

2. Magnetic Disks: A magnetic disk is a circular metal or a plastic plate and these plates are coated with magnetic material. The disc is used on both sides. Bits are stored in magnetized surfaces in locations called tracks that run in concentric rings. Sectors are typically used to break tracks into pieces.

Magnetic Disks

Hard discs are discs that are permanently attached and cannot be removed by a single user.

3. Optical Disks: It's a laser-based storage medium that can be written to and read. It is reasonably priced and has a long lifespan. The optical disc can be taken out of the computer by occasional users.

Types of Optical Disks

CD - ROM

  • It's called a compact disk. Only read from memory.
  • Information is written to the disc by using a controlled laser beam to burn pits on the disc surface.
  • It has a highly reflecting surface, which is usually aluminium.
  • The diameter of the disc is 5.25 inches.
  • 16000 tracks per inch is the track density.
  • The capacity of a CD-ROM is 600 MB, with each sector storing 2048 bytes of data.
  • The data transfer rate is about 4800KB/sec. & the new access time is around 80 milliseconds.

WORM-(WRITE ONCE READ MANY)

  • A user can only write data once.
  • The information is written on the disc using a laser beam.
  • It is possible to read the written data as many times as desired.
  • They keep lasting records of information but access time is high.
  • It is possible to rewrite updated or new data to another part of the disc.
  • Data that has already been written cannot be changed.
  • Usual size - 5.25 inch or 3.5 inch diameter.
  • The usual capacity of a 5.25-inch disk is 650 MB,5.2GB etc.

DVDs

  • The term "DVD" stands for "Digital Versatile/Video Disc," and there are two sorts of DVDs:
    • DVDR (writable)
    • DVDRW (Re-Writable)
  • DVD-ROMS (Digital Versatile Discs): These are read-only memory (ROM) discs that can be used in a variety of ways. When compared to CD-ROMs, they can store a lot more data. It has a thick polycarbonate plastic layer that serves as a foundation for the other layers. It's an optical memory that can read and write data.
  • DVD-R: DVD-R is a writable optical disc that can be used just once. It's a DVD that can be recorded. It's a lot like WORM. DVD-ROMs have capacities ranging from 4.7 to 17 GB. The capacity of 3.5 inch disk is 1.3 GB.

3. Cache Memory

It is a type of high-speed semiconductor memory that can help the CPU run faster. Between the CPU and the main memory, it serves as a buffer. It is used to store the data and programs that the CPU uses the most frequently.

Advantages of Cache Memory

  • It is faster than the main memory.
  • When compared to the main memory, it takes less time to access it.
  • It keeps the programs that can be run in a short amount of time.
  • It stores data for temporary use.

Disadvantages of Cache Memory

  • Because of the semiconductors used, it is very expensive.
  • The size of the cache (amount of data it can store) is usually small.

Next Article
What is a Storage Device? Definition, Types, Examples

S

sameekshakhandelwal1712
Improve
Article Tags :
  • Computer Science Fundamentals
  • School Learning
  • Class 6

Similar Reads

    Computer Fundamental Tutorial
    This Computer Fundamentals Tutorial covers everything from basic to advanced concepts, including computer hardware, software, operating systems, peripherals, etc. Whether you're a beginner or an experienced professional, this tutorial will enhance your computer skills and take them to the next level
    5 min read

    Fundamental

    Computer Hardware
    Computer hardware refers to the physical components of a computer that you can see and touch. These components work together to process input and deliver output based on user instructions. In this article, we’ll explore the different types of computer hardware, their functions, and how they interact
    10 min read
    What is a Computer Software?
    Computer Software serves as the backbone of all digital devices and systems. It is an integral part of modern technology. Unlike hardware which comprises physical components, software is intangible and exists as a code written in programming language. This article focuses on discussing computer soft
    8 min read
    Central Processing Unit (CPU)
    The Central Processing Unit (CPU) is like the brain of a computer. It’s the part that does most of the thinking, calculating, and decision-making to make your computer work. Whether you’re playing a game, typing a school assignment, or watching a video, the CPU is busy handling all the instructions
    7 min read
    Input Devices
    Input devices are important parts of a computer that help us communicate with the system. These devices let us send data or commands to the computer, allowing it to process information and perform tasks. Simply put, an input device is any tool we use to give the computer instructions, whether it's t
    11 min read
    What are Different Output Devices?
    Output devices are hardware that display or produce the results of a computer's processing. They convert digital data into formats we can see, hear, or touch. Examples include monitors, printers, and speakers. These devices are essential for helping us interact with and understand the information th
    11 min read

    Memory

    Computer Memory
    Computer memory is just like the human brain. It is used to store data/information, and instructions. It is a data storage unit or a data storage device where data is to be processed, and instructions required for processing are stored. Both the input and output can be stored here.It's faster than s
    9 min read
    What is a Storage Device? Definition, Types, Examples
    The storage unit is a part of the computer system which is employed to store the information and instructions to be processed. A storage device is an integral part of the computer hardware which stores information/data to process the result of any computational work. Without a storage device, a comp
    11 min read
    Primary Memory
    Primary storage or memory is also known as the main memory, which is the part of the computer that stores current data, programs, and instructions. Primary storage is stored in the motherboard which results in the data from and to primary storage can be read and written at a very good pace. What is
    4 min read
    Secondary Memory
    Secondary memory, also known as secondary storage, refers to the storage devices and systems used to store data persistently, even when the computer is powered off. Unlike primary memory (RAM), which is fast and temporary, secondary memory is slower but offers much larger storage capacities. Some Ex
    7 min read
    Hard Disk Drive (HDD) Secondary Memory
    Primary memory, like RAM, is limited and volatile, losing data when power is off. Secondary memory solves this by providing large, permanent storage for data and programs.A hard disk drive (HDD) is a fixed storage device inside a computer that is used for long-term data storage. Unlike RAM, HDDs ret
    11 min read

    Application Software

    MS Word Tutorial - Learn How to Use Microsoft Word (2025 Updated)
    Microsoft Word remains one of the most powerful and widely used tools for creating professional documents, reports, and presentations. Whether you're a student working on academic assignments, a professional preparing business reports, or someone looking to enhance their document formatting skills,
    12 min read
    MS Excel Tutorial - Learn Excel Online Free
    Excel, one of the powerful spreadsheet programs for managing large datasets, performing calculations, and creating visualizations for data analysis. Developed and introduced by Microsoft in 1985, Excel is mostly used in analysis, data entry, accounting, and many more data-driven tasks.Now, if you ar
    11 min read
    What is a Web Browser and How does it Work?
    The web browser is an application software used to explore the World Wide Web (WWW). It acts as a platform that allows users to access information from the Internet by serving as an interface between the client (user) and the server. The browser sends requests to servers for web documents and servic
    4 min read
    What is a Excel Spreadsheet
    If you search only about Spreadsheet then you will find it is a computer applicaion that save, display, and manipulate data in rows and columns. In the year 1978 first spreadsheet program is developed by Daniel Bricklin and Bob Frankston named as VisiCalc. Now, in the recent year Microsoft Excel is
    12 min read

    System Software

    What is an Operating System?
    An Operating System is a System software that manages all the resources of the computing device. Acts as an interface between the software and different parts of the computer or the computer hardware. Manages the overall resources and operations of the computer. Controls and monitors the execution o
    9 min read
    Windows 10 Tutorial
    Explore our Free Windows 10 Tutorial to learn how to use Microsoft Operating System-Windows 10 remains one of the most widely used operating systems, offering a balance of performance, security, and user-friendly features. Whether you're a new user setting up your PC for the first time or someone lo
    15+ min read
    Linux/Unix Tutorial
    Linux is one of the most widely used open-source operating systems. It's fast, secure, stable, and powers everything from smartphones and servers to cloud platforms and IoT devices. Linux is especially popular among developers, system administrators, and DevOps professionals.Linux is:A Unix-like OS
    10 min read
    Top 10 iOS App Development Tools That You Can Consider
    Businesses know the importance of being in close proximity to their customers. And the closest thing to the customers today is their smartphones. Smartphones are also the means for businesses to get as close to customers as they possibly can. Mobile applications are the fastest way for businesses to
    7 min read
    What is macOS?
    macOS is built on a Unix based architecture and provides users with a reliable and user friendly experience. In this article, we will understand macOS in detail. What is macOS?macOS operating system that Apple Inc. developed especially for its Macintosh computer series. It is the replacement for the
    4 min read

    Programming Languages

    C Programming Language Tutorial
    C is a general-purpose mid-level programming language developed by Dennis M. Ritchie at Bell Laboratories in 1972. It was initially used for the development of UNIX operating system, but it later became popular for a wide range of applications. Today, C remains one of the top three most widely used
    5 min read
    Python Tutorial | Learn Python Programming Language
    Python Tutorial – Python is one of the most popular programming languages. It’s simple to use, packed with features and supported by a wide range of libraries and frameworks. Its clean syntax makes it beginner-friendly.Python is:A high-level language, used in web development, data science, automatio
    10 min read
    Java Tutorial
    Java is a high-level, object-oriented programming language used to build web apps, mobile applications, and enterprise software systems. It is known for its Write Once, Run Anywhere capability, which means code written in Java can run on any device that supports the Java Virtual Machine (JVM).Java s
    10 min read
    JavaScript Tutorial
    JavaScript is a programming language used to create dynamic content for websites. It is a lightweight, cross-platform, and single-threaded programming language. It's an interpreted language that executes code line by line, providing more flexibility.JavaScript on Client Side: On the client side, Jav
    11 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences