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.

1
How does RAM affect a computer performance?
Medium 2 Marks
More RAM means the computer can juggle more tasks at once.
A It determines the screen resolution
B It determines how many programs can run simultaneously and affects execution speed
C It controls the speed of the internet connection
D It determines the quality of printed output
2
What is DRAM?
Medium 2 Marks
Dynamic means it needs constant refreshing to keep its data.
A A type of ROM used for permanent storage
B Dynamic RAM that stores each bit in a capacitor and needs constant refreshing
C Static RAM that uses flip-flop circuits
D A type of cache memory inside the CPU
3
What is SRAM and where is it mainly used?
Medium 2 Marks
Static means it holds data without refreshing — making it faster but costlier.
A Slow RAM used as main system memory
B Dynamic RAM that requires constant refreshing
C Static RAM that uses flip-flop circuits and is mainly used in cache memory
D RAM that can only be read not written to
4
Which type of RAM is faster: DRAM or SRAM?
Easy 1 Mark
Which RAM avoids the time wasted on refreshing cycles?
A DRAM
B Both are equally fast
C SRAM
D Speed depends on manufacturer
5
Which type of RAM is used as the main system memory in computers?
Easy 1 Mark
Cost matters for large-capacity main memory — which is cheaper?
A SRAM
B EEPROM
C DRAM
D Cache memory
6
What does ROM stand for?
Easy 1 Mark
ROM can be read but not easily written to — hence its name.
A Random Output Memory
B Read Only Memory
C Rewritable Output Module
D Rapid Output Memory
7
What is the key difference between RAM and ROM?
Easy 1 Mark
Volatile means data disappears without power — which one keeps data permanently?
A RAM is slower than ROM
B RAM is non-volatile while ROM is volatile
C RAM is volatile (temporary) while ROM is non-volatile (permanent)
D ROM is used for running programs while RAM stores firmware
8
What is firmware?
Medium 2 Marks
Think about software that is baked into the hardware itself.
A A type of application software installed by the user
B Software permanently embedded in hardware devices stored in ROM
C A type of antivirus program
D Temporary data stored in RAM during processing
9
What is ROM primarily used for in a computer?
Easy 1 Mark
What instructions does a computer need before it can even start the operating system?
A Running user applications like word processors
B Storing temporary data during program execution
C Storing firmware and instructions needed to boot the computer
D Acting as virtual memory when RAM is full
10
What is PROM?
Medium 2 Marks
PROM can be written once — after that it becomes permanent.
A Permanently Readable Output Memory
B Programmable Read Only Memory that can be programmed once after manufacturing
C Erasable ROM that uses ultraviolet light
D ROM that uses electrical signals for erasure
11
How is EPROM erased?
Medium 2 Marks
The E in EPROM stands for Erasable — think about what type of light erases it.
A Using electrical signals
B Using a strong magnetic field
C Using ultraviolet (UV) light
D Using water cooling
12
What is EEPROM?
Medium 2 Marks
The EE in EEPROM stands for Electrically Erasable — no UV light needed.
A ROM that can only be programmed once
B ROM erased using ultraviolet light
C Electrically Erasable Programmable ROM that can be erased and rewritten using electrical signals
D A type of DRAM used for cache memory
13
Which type of ROM is used in most modern computers?
Medium 2 Marks
Which ROM technology is most flexible and convenient for updates?
A PROM
B EPROM
C Basic ROM
D EEPROM or Flash memory
14
Which of the following correctly describes a characteristic of ROM?
Easy 1 Mark
Non-volatile means the data survives without power.
A Data is lost when the computer is turned off
B Data can be freely written and rewritten like RAM
C Data is not lost when power is turned off
D ROM is faster than RAM
15
What is cache memory?
Easy 1 Mark
Think about a small but super-fast shortcut memory right next to the CPU.
A A large storage area on the hard disk
B A very small but extremely fast memory located close to or inside the CPU
C A type of secondary storage for backups
D Another name for virtual memory
16
What is the main purpose of cache memory?
Medium 2 Marks
Cache saves time by keeping frequently needed data within quick reach.
A To store the operating system permanently
B To act as virtual memory when RAM is full
C To improve CPU performance by storing frequently accessed data closer to the CPU
D To provide long-term backup storage
17
How does cache memory improve CPU performance?
Medium 2 Marks
What happens when the CPU finds data in cache instead of going to RAM?
A By increasing the clock speed of the CPU
B By replacing RAM entirely
C By storing frequently used data close to the CPU so it is retrieved faster than from RAM
D By compressing data to save storage space
18
Which of the following correctly describes cache memory?
Medium 2 Marks
Cache trades size for speed — it is tiny but extremely fast.
A Large in size and slow in speed
B Small in size fast in speed and expensive
C Large in size fast in speed and cheap
D Same speed as RAM but larger
19
What is L1 cache?
Medium 2 Marks
L1 is first in line — smallest fastest and closest to the processor.
A The largest and slowest cache level
B Cache located on the hard disk for faster file access
C The smallest and fastest cache located inside the CPU
D Cache shared between multiple CPU cores
20
What is the correct order of cache levels from fastest to slowest?
Medium 2 Marks
L1 is fastest because it is physically inside the CPU.
A L3 then L2 then L1
B L2 then L1 then L3
C L1 then L2 then L3
D All cache levels have equal speed
Question Palette
0/58 Answered
Showing 1 - 20 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 7
Medium 13
Hard 0