Computer Memory

30 minutes Intermediate 58 Questions
Topic Overview

6. Computer Memory RAM, ROM, Cache Memory, Virtual Memory, Secondary Storage Devices,

Complete Topic Overview

6. Computer Memory


Introduction to Computer Memory


Computer memory refers to the storage space inside a computer where data, instructions, and programs are stored so that the processor can access them when needed.

Memory plays a critical role in the functioning of a computer because the CPU can only process data that is available in memory. When a program is executed, it is first loaded into memory, and then the CPU performs operations on that data.

Computer memory is generally divided into two main categories:

  • Primary Memory (Main Memory)
  • Secondary Memory (Secondary Storage)

Primary memory is directly accessed by the CPU, while secondary storage is used for long-term data storage.


RAM (Random Access Memory)


Definition

Random Access Memory (RAM) is a type of primary memory used to store data and programs that are currently being used by the computer.

It is called random access because any memory location can be accessed directly without going through other memory locations.


Characteristics of RAM

Volatile Memory

RAM is volatile, which means the data stored in RAM is lost when the computer is turned off.

Fast Access Speed

RAM provides very fast access to data compared to secondary storage devices such as hard drives.

Temporary Storage

It stores data temporarily while programs are running.

Direct CPU Access

The CPU directly reads from and writes to RAM during processing.


Types of RAM

Dynamic RAM (DRAM)

DRAM stores each bit of data in a capacitor and needs to be refreshed constantly to maintain the stored information.

Characteristics:

  • Slower than SRAM
  • Cheaper
  • Used as main system memory

Static RAM (SRAM)

SRAM stores data using flip-flop circuits, which means it does not need constant refreshing.

Characteristics:

  • Faster than DRAM
  • More expensive
  • Used mainly in cache memory

Importance of RAM

RAM significantly affects a computer’s performance because:

  • It determines how many programs can run simultaneously.
  • It affects the speed of program execution.
  • Larger RAM allows smoother multitasking.

ROM (Read Only Memory)


Definition

Read Only Memory (ROM) is a type of non-volatile memory used to store permanent instructions required for starting and operating the computer.

Unlike RAM, data in ROM remains stored even when the computer is powered off.

ROM typically stores firmware, which is software permanently embedded in hardware devices.


Characteristics of ROM

Non-Volatile Memory

Data is not lost when power is turned off.

Permanent Storage

Information is written once and rarely changed.

Used for Booting

ROM contains instructions required to start the computer system.


Types of ROM

PROM (Programmable Read Only Memory)

PROM is a type of ROM that can be programmed once after manufacturing.

Once programmed, the data cannot be changed.

EPROM (Erasable Programmable ROM)

EPROM can be erased using ultraviolet light and then reprogrammed again.

EEPROM (Electrically Erasable Programmable ROM)

EEPROM can be erased and rewritten using electrical signals without removing it from the computer.

Modern computers commonly use EEPROM or Flash memory.


Cache Memory


Definition

Cache memory is a very small but extremely fast memory located close to or inside the CPU.

It is used to store frequently accessed data and instructions so that the CPU can retrieve them quickly.


Purpose of Cache Memory

Cache memory improves system performance by reducing the time needed for the CPU to access data from the main memory.

Instead of repeatedly accessing RAM, the CPU first checks whether the required data is available in the cache.

If the data is found in cache memory, it can be accessed much faster.


Characteristics of Cache Memory

Very High Speed

Cache memory is faster than both RAM and secondary storage.

Small Size

Cache memory is much smaller compared to main memory.

Expensive

Because of its speed, cache memory is more expensive to manufacture.


Levels of Cache Memory

L1 Cache

  • Located inside the CPU
  • Smallest but fastest cache

L2 Cache

  • Larger than L1
  • Slightly slower

L3 Cache

  • Shared between CPU cores
  • Larger but slower than L1 and L2

Virtual Memory


Definition

Virtual memory is a memory management technique that allows a computer to use part of the secondary storage as if it were RAM.

It enables the system to run programs that require more memory than the physically available RAM.


How Virtual Memory Works

When RAM becomes full, the operating system temporarily transfers some data from RAM to a section of the hard disk called the paging file or swap space.

When that data is needed again, it is moved back into RAM.

This process is known as paging.


Advantages of Virtual Memory

Allows Running Large Programs

Programs larger than the available RAM can still run.

Improves Multitasking

Multiple programs can run simultaneously.

Efficient Memory Management

The operating system can manage memory resources more effectively.


Disadvantages of Virtual Memory

Slower Performance

Since hard drives are much slower than RAM, accessing data from virtual memory reduces system speed.

Increased Disk Usage

Frequent swapping between RAM and disk may affect performance.


Secondary Storage Devices


Definition

Secondary storage devices are used to store data permanently in a computer system.

Unlike RAM, data stored in secondary storage remains even when the computer is turned off.

These devices are used for storing:

  • Operating systems
  • Software applications
  • Documents
  • Multimedia files

Characteristics of Secondary Storage

Non-Volatile

Data is preserved without power.

Large Storage Capacity

Secondary storage can store large amounts of data.

Slower than Primary Memory

Access speed is slower compared to RAM.


Types of Secondary Storage Devices

Hard Disk Drive (HDD)

A Hard Disk Drive stores data on magnetic disks called platters.

Characteristics:

  • Large storage capacity
  • Mechanical moving parts
  • Slower than SSD

Solid State Drive (SSD)

A Solid State Drive stores data using flash memory chips instead of moving parts.

Characteristics:

  • Faster than HDD
  • More durable
  • Lower power consumption

Optical Storage Devices

Optical devices store data using laser technology.

Examples include:

  • CD (Compact Disc)
  • DVD (Digital Versatile Disc)
  • Blu-ray Disc

These devices are commonly used for media distribution and data backup.

USB Flash Drive

A USB flash drive is a portable storage device that uses flash memory and connects to a computer via a USB port.

Characteristics:

  • Small and portable
  • Rewritable
  • Commonly used for data transfer

Memory Cards

Memory cards are small storage devices commonly used in:

  • Smartphones
  • Digital cameras
  • Tablets

Examples include:

  • SD cards
  • MicroSD cards

Computer memory is a crucial component of a computer system because it enables the storage and retrieval of data required for processing. Different types of memory such as RAM, ROM, cache memory, virtual memory, and secondary storage devices work together to ensure that the computer system operates efficiently and can store both temporary and permanent information.

41
Which of the following correctly pairs memory type with its characteristic?
Medium 2 Marks
Match each memory to its correct defining property.
A RAM — non-volatile permanent storage
B ROM — volatile temporary storage
C Cache — large slow storage inside the hard disk
D RAM — volatile temporary fast storage directly accessed by CPU
42
What happens to data stored in RAM when the computer is switched off?
Easy 1 Mark
Volatile means it disappears without power.
A Data is saved automatically to the hard disk
B Data remains permanently in RAM
C Data is lost because RAM is volatile
D Data is transferred to ROM
43
Which type of memory stores the instructions needed to start (boot) the computer?
Easy 1 Mark
What must already be in the computer before the OS even loads?
A RAM
B Cache memory
C ROM
D Virtual memory
44
A student has 4GB of RAM but wants to run a program that needs 6GB. Which feature allows this?
Medium 2 Marks
Which technique lets the computer fake having more RAM than it physically has?
A Cache memory
B ROM expansion
C Virtual memory
D Installing more DRAM
45
Which of the following is NOT a type of ROM?
Medium 2 Marks
Three options are ROM variants — which one belongs to a completely different memory category?
A PROM
B EPROM
C DRAM
D EEPROM
46
What is the full form of EEPROM?
Medium 2 Marks
Break it down: Electrically Erasable + Programmable + ROM.
A Erasable and Electrically Programmable ROM
B Electrically Erasable Programmable Read Only Memory
C Electronically Embedded Programmable ROM
D Extended Erasable Programmable Read Only Memory
47
Which storage device is most suitable for transferring files between two computers?
Easy 1 Mark
You need something portable that plugs into any computer.
A Hard Disk Drive
B ROM chip
C USB flash drive
D Cache memory
48
Why is secondary storage slower than primary memory?
Hard 3 Marks
Think about how directly RAM connects to the CPU compared to a hard drive.
A Because secondary storage uses binary and primary memory uses decimal
B Because secondary storage is connected via USB and primary memory is not
C Because primary memory (RAM) is directly accessed by the CPU while secondary storage requires additional access mechanisms
D Because secondary storage is cheaper and cheaper always means slower
49
Which of the following lists memory types in correct order from most permanent to least permanent?
Hard 3 Marks
Permanent means data survives power off — which types keep data without power?
A Cache then RAM then ROM then Secondary Storage
B RAM then ROM then Cache then Secondary Storage
C ROM then Secondary Storage then RAM then Cache
D Secondary Storage then RAM then Cache then ROM
50
What is computer memory?
Easy 1 Mark
Think about where a computer keeps information it is currently working with.
A The speed at which a CPU processes data
B The storage space where data instructions and programs are stored for CPU access
C The physical screen that displays output
D The network connection speed of a computer
51
Why does the CPU need data to be available in memory?
Easy 1 Mark
What must happen to a program before the CPU can run it?
A Because the CPU cannot connect to the internet directly
B Because the CPU can only process data that is available in memory
C Because memory is faster than the CPU
D Because memory generates electricity for the CPU
52
What are the two main categories of computer memory?
Easy 1 Mark
One type is directly accessed by the CPU and the other is for long-term storage.
A RAM and ROM
B Cache memory and virtual memory
C Primary memory and secondary memory
D Volatile memory and static memory
53
Which type of memory is directly accessed by the CPU?
Easy 1 Mark
The CPU reads from this memory during program execution.
A Secondary storage
B Virtual memory
C Primary memory
D Optical storage
54
What does RAM stand for?
Easy 1 Mark
The R stands for Random — any location can be accessed directly.
A Read Access Memory
B Random Access Memory
C Rapid Application Memory
D Random Application Module
55
Why is RAM called Random Access Memory?
Medium 2 Marks
What makes RAM different from sequential access storage?
A Because it stores data randomly without any order
B Because any memory location can be accessed directly without going through others
C Because it is randomly assigned by the operating system
D Because its contents change randomly during operation
56
Which of the following best describes RAM?
Easy 1 Mark
RAM holds what the computer is actively working on right now.
A Permanent storage for the operating system
B Temporary storage for data and programs currently being used
C Storage for firmware and boot instructions
D Long-term storage for documents and files
57
RAM is described as volatile memory. What does this mean?
Easy 1 Mark
Volatile means it vanishes — what causes data in RAM to disappear?
A RAM can store data for hundreds of years
B RAM data is lost when the computer is turned off
C RAM stores data using magnetic fields
D RAM is very slow compared to hard drives
58
Which of the following is a characteristic of RAM?
Easy 1 Mark
Think about why RAM is placed close to the CPU.
A Non-volatile permanent storage
B Stores firmware for booting
C Very fast access speed compared to secondary storage
D Uses laser technology to read data
Question Palette
0/58 Answered
Showing 41 - 58 of 58
Instructions:
  • Click on an option to select your answer
  • Use the hint button if you need help
  • Track your progress with the question palette
  • Submit your answers to see results
Difficulty Distribution
Easy 11
Medium 5
Hard 2