Monday, December 29, 2025

1.5 Memory (Primary and Secondary Memory)

 1.5.1 Definition and function of memory

 

Memory is a computer storage system used to store data, instructions, and results either temporarily or permanently during processing.

 

The function of memory is to store data, instructions, and results for use by the CPU during processing so that the CPU can work efficiently.

 

Type of Memory

a. Primary memory and

b. Secondary memory

 

1.5.2 Units of memory measurement

 

Computer memory and storage are measured in bits and bytes.

 

Unit

Symbol

Description

Bit

b

The smallest unit of memory, stores either 0 or 1

Nibble

A group of 4 bits.

Byte

B

A group of 8 bits, represents one character (e.g., a letter/number).

Kilobyte

KB

1024 bytes

Megabyte

MB

1024 KB

Gigabyte

GB

1024 MB

Terabyte

TB

1024 GB

 

1.5.3 Types of memory: primary and secondary memory and their comparison.

 

Primary memory (Main Memory / Internal Memory)

Primary memory is the main memory of a computer system that stores data and instructions currently being used by the CPU. It is directly accessed by the CPU and is used during the processing of data.

 

Secondary memory, (Storage devices or auxiliary or backup memory)

Secondary memory is a type of memory used to store data and instructions permanently for future use. It has a large storage capacity, is not directly accessed by the CPU, and retains data even when the power is switched off.

 

Primary Memory

Secondary Memory

Primary memory is the main memory of a computer used to store data and instructions currently needed by the CPU.

Secondary memory is used to store data and instructions permanently for future use.

Directly accessed by the CPU

Not directly accessed by the CPU

Very fast

Slower compared to primary memory

Limited storage capacity

Very large storage capacity

Mostly volatile (data is lost when power is off)

Non-volatile (data is not lost when power is off)

Examples: RAM, ROM, Cache, Register

Examples: Hard Disk, SSD, Pen Drive, CD/DVD

 

 

 

 

 

1.5.4 Example of primary memory: RAM, ROM, Cache, Register

 

Types of Primary Memory:

 

1. RAM (Random Access Memory)

RAM is a temporary memory that stores data and instructions currently being used by the CPU. It is volatile in nature, so data is lost when the power is switched off.

 

2. ROM (Read Only Memory)

ROM (Read Only Memory) is a non-volatile memory that permanently stores instructions needed to start the computer and load the operating system. It is non-volatile, meaning data is not lost when the power is turned off.

Programs stored in ROM are written during manufacturing and are known as firmware, such as the BIOS (Basic Input Output System), which helps in booting the computer.

 

3. Cache Memory

Cache memory is a very fast memory that stores frequently used data and instructions to improve the performance of the CPU. It is located between the CPU and main memory and reduces the time required to access data.

 

4. Register

Registers are the smallest and fastest memory units located inside the CPU that temporarily store data and instructions during processing.

 

RAM (Random Access Memory)

ROM (Read Only Memory)

RAM is a temporary memory that stores data and instructions currently used by the CPU.

ROM is a permanent memory that stores instructions needed to start the computer and load the operating system.

It is volatile in nature, so data is lost when the power is switched off.

It is non-volatile, meaning data is not lost when the power is turned off.

Used during processing

Used during startup

Faster than ROM

Slower than RAM

Data can be read and written

Data is mostly read-only

 

Types of RAM

 

1. DRAM (Dynamic Random Access Memory)

DRAM is a type of RAM that stores data temporarily and needs to be refreshed repeatedly to retain data. It is slower than SRAM but has a larger storage capacity and is commonly used as the main memory of a computer.

 

2. SRAM (Static Random Access Memory)

SRAM is a type of RAM that stores data without frequent refreshing. It is faster and more reliable than DRAM but has a smaller capacity and is more expensive, so it is mainly used as cache memory.

 

SRAM (Static Random Access Memory)

DRAM (Dynamic Random Access Memory)

SRAM is a type of RAM that stores data without the need for frequent refreshing.

DRAM is a type of RAM that stores data temporarily and needs continuous refreshing.

Very fast and more expensive

Slower than SRAM and less expensive

Smaller storage capacity

Larger storage capacity

Consumes less power and more reliable

Consumes more power due to refreshing and less reliable compared to SRAM

Types of ROM:

 

1. PROM (Programmable Read Only Memory)

PROM is a type of ROM that is programmed only once after manufacturing. Once data is written into PROM, it cannot be changed or erased. It is used when permanent data storage is required.

 

2. EPROM (Erasable Programmable Read Only Memory)

EPROM is a type of ROM that can be erased using ultraviolet (UV) light and reprogrammed. It allows data to be modified, but the chip must be removed from the computer for erasing.

 

3. EEPROM (Electrically Erasable Programmable Read Only Memory)

EEPROM is a type of ROM that can be erased and reprogrammed electrically without removing it from the computer. It is more flexible and commonly used in modern systems.

 

PROM

EPROM

EEPROM

Programmable Read Only Memory

Erasable Programmable Read Only Memory

Electrically Erasable Programmable Read Only Memory

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

EPROM is a type of ROM that can be erased and reprogrammed using ultraviolet light.

EEPROM is a type of ROM that can be erased and reprogrammed electrically.

Programmed only once

Can be programmed multiple times

Can be programmed multiple times

Cannot be erased

Erased using UV (ultraviolet) light

Erased using electrical signals

Not reusable

Reusable after erasing

Highly reusable

Not applicable

Must be removed from the computer for erasing

No need to remove from the computer

 

1.5.5 Example of secondary memory (Storage devices): Hard disk drive (HDD), Solid State Drive (SDD), Optical Discs (CD/DVD), Flash Memory

 

Hard Disk Drive (HDD)

A Hard Disk Drive (HDD) is a secondary storage device used to store data, programs, and files permanently in a computer system. It is a non-volatile memory, so data is not lost when the power is switched off. HDD stores data on magnetic disks and has a large storage capacity, making it suitable for long-term data storage.

The speed of a hard disk is measured in Revolutions Per Minute (RPM), which usually ranges from 5400 to 7200 rpm in common computers.

 

SSD (Solid State Drive)

A Solid State Drive (SSD) is a secondary storage device used to store data, programs, and files permanently in a computer system. It is a non-volatile memory and stores data using flash memory instead of magnetic disks. SSDs are faster, quieter, and more reliable than hard disk drives.

SSDs are widely used in laptops, notebooks, and ultrabooks for high performance.

HDD (Hard Disk Drive)

SSD (Solid State Drive)

HDD is a secondary storage device that stores data using magnetic disks.

SSD is a secondary storage device that stores data using flash memory.

Has moving parts like rotating disks

Has no moving parts

Slower data access and consumes more power

Faster data access and consumes less power

Less durable, produce noise, cheaper

More durable, silent, more expensive

Optical Storage Disc

An Optical Storage Disc is a secondary storage device used to store data permanently using laser light technology. Data is read and written on the disc with the help of a laser beam. It is a non-volatile storage, so data is not lost when the power is switched off.

Common examples include CDs (Compact Discs), DVDs (Digital Versatile Discs), and Blu-ray Discs.

 

CD (Compact Disc)

A CD (Compact Disc) is an optical storage disc used to store data permanently. It uses laser technology to read and write data. A CD is a non-volatile storage device, so the data stored on it is not lost when the power is switched off.

 

A CD (Compact Disc) is an optical storage disc used to store data permanently. It uses laser technology to read and write data. A CD is a non-volatile storage device, so the data stored on it is not lost when the power is switched off.

A standard CD is 12 cm in diameter, 1 mm thick, and weighs about 18 g. The storage capacity of CD is 700MB.

 

DVD (Digital Versatile Disc)

A DVD (Digital Versatile Disc) is an optical storage disc used to store data permanently. It uses laser technology to read and write data. A DVD has a larger storage capacity than a CD, making it suitable for storing videos, software, and large data files.

A DVD is an optical storage disc developed in 1995 by Philips, Sony, Toshiba, and Panasonic. A DVD drive is required to read and write data on DVDs.

Storage Capacities:

  • Single Side, Single Layer: 4.7 GB
  • Single Side, Double Layer: 8.5 GB
  • Double Side, Single Layer: 9.4 GB
  • Double Side, Double Layer: 17.08 GB

 

CD (Compact Disc)

DVD (Digital Versatile Disc)

Uses laser technology to read and write data

Uses advanced laser technology to read and write data

Stores about 700 MB of data

Stores 4.7 GB or more of data

Lower data density and Slower data access speed

Higher data density and Faster data access speed

Usually single layer

Can be single-layer or double-layer

Used for music, small software, and documents

Used for movies, videos, large software, and data

Lower video quality and Older technology

Better video quality and More advanced than CD

 

Blu-ray Disc

A Blu-ray Disc is an optical storage disc used to store large amounts of data permanently. It uses a blue-violet laser, which allows it to store more data than CDs and DVDs. It is commonly used for high-definition videos and large data storage.

 

Flash Memory

Flash memory is a type of non-volatile memory used to store data permanently. It stores data in electronic form and does not require power to retain data. Flash memory is widely used in devices such as pen drives, memory cards, and solid state drives (SSD).

 

Pen Drive

A pen drive is a portable secondary storage device that uses flash memory to store data permanently. It is a non-volatile memory, so data is not lost when power is switched off. A pen drive connects to a computer through a USB port and is used for storing and transferring data.

 

Cloud Storage

Cloud storage is a type of online storage system that allows users to store data on remote servers accessed through the internet instead of storing it on a local device. It enables users to access, share, and manage data from anywhere using an internet connection. Examples: Google Drive, Dropbox, Microsoft OneDrive, Amazon S3

 

Comparison Between HDD, SSD, and Flash Memory

 

HDD (Hard Disk Drive)

SSD (Solid State Drive)

Flash Memory

HDD is a secondary storage device that stores data using magnetic disks.

SSD is a secondary storage device that stores data using flash memory chips.

Flash memory is a type of non-volatile memory used to store data electronically.

Magnetic storage (rotating platters)

Flash memory (electronic chips)

Flash memory (electronic)

Has moving parts

No moving parts

No moving parts

Slower data access speed

Very fast data access speed

Faster than HDD but slower than SSD

Less durable due to moving parts

More durable and shock-resistant

Highly durable

Consumes more power

Consumes less power

Consumes very little power

Not portable

Less portable

Highly portable

Used in traditional desktop computers

Used in modern laptops and high-speed systems

Used in pen drives, memory cards, USB devices

 

1.5.6 Function and characteristics of each type of memory

 

Type of Memory

Function

Characteristics

Primary Memory

Stores data and instructions currently required by the CPU for processing.

• Directly accessed by CPU

• Fast in speed

• Limited storage capacity

• Mostly volatile

RAM (Random Access Memory)

Temporarily stores data and instructions during execution of programs.

• Volatile memory

• Data lost when power is off

• Fast access speed

• Used during processing

ROM (Read Only Memory)

Stores instructions needed to start the computer and load the operating system.

• Non-volatile memory

• Permanent storage

• Mostly read-only

• Stores firmware (BIOS)

Cache Memory

Stores frequently used data and instructions to improve CPU performance.

• Very fast memory

• Located between CPU and RAM

• Small capacity

• Expensive

Register

Stores data and instructions temporarily inside the CPU during processing.

• Smallest and fastest memory

• Located inside CPU

• Very limited capacity

Secondary Memory

Stores data and programs permanently for future use.

• Non-volatile memory

• Large storage capacity

• Slower than primary memory

• Not directly accessed by CPU


 

1. Memory in a computer is used to
A. Control hardware                           B.
Store data, instructions, and results
C. Perform calculations                      D. Display output

2. The smallest unit of memory is
A. Byte            B. Nibble                    C.
Bit                      D. Word

3. A group of 4 bits is called
A. Byte            B.
Nibble                C. Word                       D. Register

4. A byte consists of
A. 4 bits          B. 6 bits                      C.
8 bits                  D. 16 bits

5. 1 KB is equal to
A. 1000 bytes              B. 512 bytes    C.
1024 bytes          D. 2048 bytes

6. Which memory is directly accessed by the CPU?
A. Secondary memory            B. Optical memory     C.
Primary memory            D. Flash memory

7. Which memory loses data when power is switched off?
A. ROM                      B. HDD           C. SSD            D.
RAM

8. Which of the following is non-volatile memory?
A. RAM                      B. Cache         C.
ROM                  D. Register

9. BIOS is stored in
A. RAM                      B. Cache         C.
ROM                  D. Register

10. Cache memory is used to
A. Store files permanently                 B. Increase storage capacity
C.
Speed up CPU processing         D. Backup data

11. Registers are
A. Secondary storage devices            B.
Located inside CPU
C. Slower than RAM                          D. Used for permanent storage

12. Which memory has the fastest access speed?
A. RAM                      B. Cache                     C.
Register              D. SSD

13. Which memory is mostly read-only?
A. RAM                      B.
ROM                  C. Cache                     D. Register

14. Firmware refers to programs stored in
A. RAM                      B. HDD                       C.
ROM                  D. Cache

15. Which memory is volatile?
A. ROM                      B. HDD                       C. SSD            D.
RAM

16. DRAM stands for
A. Direct RAM                       B.
Dynamic Random Access Memory
C. Digital RAM                      D. Dual RAM

17. Which RAM needs refreshing?
A. SRAM                    B.
DRAM                C. ROM                      D. Cache

18. Which RAM is faster?
A. DRAM                   B.
SRAM                C. ROM                      D. Flash

19. PROM can be programmed
A. Multiple times       B.
Only once                       C. After UV erase                   D. Electrically

20. EPROM is erased using
A. Electrical signals   B. Heat                        C.
UV light             D. Magnet

21. EEPROM is erased using
A. UV light                 B. Heat                        C.
Electrical signals                        D. Magnet

22. Which memory is permanent?
A. RAM                      B. Cache                     C. Register                  D.
ROM

23. Which is secondary memory?
A. Cache                     B. Register                  C. RAM                      D.
Hard disk

24. HDD stores data using
A. Laser                      B. Flash memory                    C.
Magnetic disks               D. Electric charge

25. HDD speed is measured in
A. Mbps                      B. GHz                        C.
RPM                   D. ns

26. SSD stores data using
A. Magnetic disks                   B. Laser                      C.
Flash memory                D. Registers

27. Which storage has no moving parts?
A. HDD                       B.
SSD                    C. CD              D. DVD

28. Optical discs use
A. Magnetism             B. Electricity              C.
Laser technology                       D. Heat

29. Standard CD storage capacity is
A. 4.7 GB                    B. 8.5 GB                    C.
700 MB              D. 1 TB

30. Which memory helps reduce CPU access time?
A. RAM                      B. HDD                       C.
Cache                 D. ROM

31. Data currently being processed is stored in
A. ROM                      B. HDD                       C.
RAM                  D. CD

32. Booting instructions are stored in
A. RAM                      B.
ROM                  C. Cache                     D. HDD

33. Which memory is fastest but smallest?
A. RAM                      B. Cache                     C.
Register              D. SSD

34. Which is NOT primary memory?
A. RAM                      B. Cache                     C. Register                  D.
HDD

35. Which device is best for portability?
A. HDD                       B. SSD            C.
Pen drive            D. DVD

36. A laptop boots faster mainly due to
A. RAM size               B.
SSD                    C. CD drive                D. Cache size

37. Which memory retains data without power?
A. RAM                      B. Cache                     C.
ROM                  D. Register

38. Which storage is used for HD movies?
A. CD                          B. DVD                       C.
Blu-ray               D. Pen drive

39. Which memory is slower than RAM?
A. Cache                     B. Register                  C.
ROM                  D. SRAM

40. Which storage is cloud-based?
A. HDD                       B. SSD            C. Pen drive                D.
Google Drive

41. Which memory consumes more power due to refreshing?
A. SRAM                    B.
DRAM                C. ROM                      D. Cache

42. Which is more durable?
A. HDD                       B.
SSD                    C. CD                          D. DVD

43. Which memory is used during execution of programs?
A. ROM                      B. HDD                       C.
RAM                  D. CD

44. Which memory is inside CPU?
A. RAM                      B. Cache                     C.
Register              D. HDD

45. Which optical disc has highest capacity?
A. CD                          B. DVD                       C.
Blu-ray               D. Pen drive

46. Which memory is erased using UV light?
A. PROM                    B.
EPROM              C. EEPROM               D. ROM

47. Which memory does not need refreshing?
A. DRAM                   B.
SRAM                C. RAM                      D. Cache

48. Which is correct order of speed (fast → slow)?
A. RAM → Cache → Register                      B. HDD → RAM → Cache
C.
Register → Cache → RAM                   D. Cache → Register → RAM

49. Which storage is best for long-term backup?
A. RAM                      B. Cache                     C.
HDD                   D. Register

50. Which memory is closest to CPU?
A. RAM                      B. Cache                     C.
Register              D. SSD

51. Which is true about SSD?
A. Uses magnetic disks                      B. Has moving parts
C.
Faster and silent             D. Needs RPM

52. Which storage is accessed via internet?
A. HDD                       B. SSD            C.
Cloud storage                 D. CD

53. Which memory is used only during startup?
A. RAM                      B.
ROM                  C. Cache                     D. HDD

54. Which memory stores OS files permanently?
A. RAM                      B.
HDD / SSD                    C. Cache         D. Register

55. Which memory type balances speed and cost best?
A. Register                  B. Cache                     C.
RAM                  D. SSD

1.     (A1) Why is RAM called volatile memory? Explain with a suitable example.

2.     (A1) How does cache memory improve the performance of the CPU?

3.     Differentiate between SRAM and DRAM based on working principle and usage.

4.     (A1) Why is ROM essential for booting a computer system?

5.     (A1) Explain the role of cache memory between CPU and RAM.

6.     (A1) A system crashes suddenly. Which type of memory data will be lost and why?

 

7.     (A1) Define computer memory. Explain its functions and importance in a computer system.

8.     (A1) Explain primary memory. Describe its types with suitable examples.

9.     Define secondary memory. Explain different types of secondary storage devices with examples.

10.  (A1) Explain RAM and ROM in detail. Compare them.

11.  (A1) Explain the types of RAM. Describe SRAM and DRAM with differences.

12.  Explain ROM and its types: PROM, EPROM, EEPROM.

13.  Explain Hard Disk Drive (HDD) and Solid State Drive (SSD). Compare them.

14.  Explain optical storage devices: CD, DVD, Blu-ray Disc with capacities.

15.  (A1) Compare Primary memory and Secondary memory.

 


No comments:

Post a Comment