Friday, September 19, 2025

1.5 Memory (Primary and Secondary)

  1.5 Memory (Primary and Secondary)

 




1.5.1 Definition and function of memory

 

Memory is the storage unit of a computer used to store data, instructions, and information either temporarily or permanently. It enables the CPU to process and retrieve data whenever required.

 

Functions of Memory

  1. Storage of Data and Instructions – Holds data and program instructions temporarily (RAM) or permanently (ROM/secondary memory).
  2. Supply to CPU – Provides data and instructions to the CPU during processing.
  3. Store Intermediate Results – Saves temporary results generated during processing.
  4. Store Final Output – Keeps processed results for future use.
  5. Booting Support – ROM stores essential programs (BIOS/firmware) required to start the computer.

 

1.5.2 Units of memory measurement

 

Computer memory and storage are measured in bits and bytes.

  • 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).

 

Hierarchy of Memory Units:

  • 1 Byte (B) = 8 bits
  • 1 Kilobyte (KB) = 1024 Bytes
  • 1 Megabyte (MB) = 1024 KB
  • 1 Gigabyte (GB) = 1024 MB
  • 1 Terabyte (TB) = 1024 GB
  • 1 Petabyte (PB) = 1024 TB
  • 1 Exabyte (EB) = 1024 PB

 

 

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

 

The overall classification of computers can be done in two types:

·       Primary memory

·       Secondary memory

 

Primary memory (Main Memory / Internal Memory)

Primary memory is the main/internal memory of a computer that is directly accessible by the CPU. It temporarily stores data and instructions while the computer is running.

RAM is called volatile memory because all the data stored in it is erased when the power supply is turned off.

RAM is called Random Access Memory because the CPU can read and write data from any physical location directly and quickly, without following a fixed order (sequential path).

 

Types of primary memory

·       RAM (Random Access Memory)

·       ROM (Read Only Memory)

 

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

Storage devices, also called secondary memory / auxiliary memory / backup memory, are used to store data and instructions permanently for future use. Unlike primary memory, they retain data even when the power is turned off.

 

Primary Memory

Secondary Memory

Primary memory is considered as the main memory of a computer system.

Secondary memory is also known as auxiliary or backup memory.

Primary memory is faster than secondary memory.

Secondary memory is slower than primary memory.

They are more expensive.

They are less expensive

Examples: RAM, ROM, Cache

Examples: Pen drive, CD, Hard Disk.

 

 

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

 

RAM (Random Access Memory)

RAM is the volatile / short-term memory of a computer system that temporarily stores data and instructions during processing.

 

Types of RAM

  1. Static RAM (SRAM)                                    2. Dynamic RAM (DRAM)

 

Static RAM (SRAM):

SRAM is a type of volatile memory made of transistors which does not require periodic refreshing to hold data. SRAM is faster than DRAM but is more expensive and has a smaller storage capacity. It is mainly used as cache memory in computers.

 

Dynamic RAM (DRAM)

DRAM is a type of volatile memory made of capacitors which requires periodic refreshing to hold data. DRAM is slower than SRAM but is cheaper and has a larger storage capacity. It is widely used as the main memory in personal computers.

 

 

 

ROM (Read Only Memory)

ROM is a type of non-volatile primary memory that permanently stores data and instructions which can only be read and not easily modified. The contents of ROM remain safe even when the power supply is turned off.

The data and instructions are written during manufacturing and are mainly used to store the BIOS (Basic Input Output System), which is essential for booting the computer. Programs stored in ROM are called firmware.

 

Types of ROM:

·        PROM (Programmable ROM)

·        EPROM (Erasable PROM)

·        EEPROM (Electrically Erasable PROM)

 

PROM (Programmable ROM

PROM is a type of non-volatile memory that is initially blank at the time of manufacturing and can be programmed only once using a device called a PROM programmer (PROM burner). Once data is written, it becomes permanent and cannot be erased or modified. Like other ROMs, PROM retains its contents even when the power is off.

 

EPROM (Erasable PROM)

EPROM is a type of non-volatile memory that can be erased and reprogrammed multiple times. To erase the stored data, it requires exposure to ultraviolet (UV) light. After erasing, new data can be written again. However, repeated erasing and rewriting may cause wear and reduce the lifespan of the chip.

 

EEPROM (Electrically Erasable PROM)

EEPROM is a type of non-volatile memory that can be erased and reprogrammed electronically using electrical signals within milliseconds. Unlike EPROM, it does not require UV light or special equipment. Data can be modified flexibly, either one byte at a time or the entire chip, making EEPROM more convenient for updating stored information.

 

Firmware

Firmware is a special type of software permanently stored in hardware devices to control and operate them. It provides the necessary instructions that allow the hardware to function correctly.

 

 

 

Cache Memory

Cache memory is a high-speed volatile memory located between the CPU and RAM. It stores frequently used data and instructions so that the CPU can access them quickly, making processing faster.

 

CPU Register

A CPU register is a very small and high-speed storage location inside the microprocessor. It stores data, addresses, and instructions that the CPU needs immediately during processing.

 

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

A hard disk is a popular secondary storage device that stores a very large amount of data permanently. It consists of circular platters made of aluminum coated with a magnetic material, which rotate at high speed while data is written or read.

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)

An SSD is a modern secondary storage device that stores data using semiconductor chips instead of rotating platters. It provides faster read/write speeds, lower latency, and better reliability compared to hard disks. Although more expensive, SSDs are widely used in laptops, notebooks, and ultrabooks for high performance.

 

Optical Storage Disc

An optical storage disc is a secondary storage device that uses laser light technology to store and retrieve data. Common examples include CDs (Compact Discs), DVDs (Digital Versatile Discs), and Blu-ray Discs.

CD (Compact Disc)

A CD is an optical storage disc developed by Philips Company (Netherlands) in 1980. It uses laser ray technology to store and read data in the form of pits (tiny reflective bumps). 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 / Digital Video Disc)

A DVD is an optical storage disc developed in 1995 by Philips, Sony, Toshiba, and Panasonic. It has a higher storage capacity than CDs because it stores data in multiple layers. 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

Difference between CD and DVD

CD

DVD

Its storage capacity is 700MB.

Its storage capacity is up to 20GB

It is cheaper

It is expensive

Its types are CD-R, CD-RW, etc.

Its types are DVD-RW, DVD+RW, etc

 

 

 

Flash Memory

Flash memory is a type of non-volatile storage that can be electrically erased and reprogrammed. It is widely used in USB drives, memory cards, SSDs, and other portable storage devices. Flash memory retains data even when the power is switched off.

 

Pen Drive (USB Flash Drive)

A pen drive is a portable storage device that uses flash memory (non-volatile) to store and transfer data between computers and digital devices. It connects to a computer via a USB (Universal Serial Bus) port and retains data even when power is turned off.

 

Cloud Storage

Cloud storage is a type of online data storage where files are stored on remote servers accessed through the Internet. It allows users to upload, access, and manage data from anywhere and on any device with an internet connection. Examples: Google Drive, Dropbox, Microsoft OneDrive, Amazon S3

 

Compare HDD Vs SSD Vs Flash memory

 

Feature

HDD

SSD

Flash memory

Storage Technology

Uses mechanical parts with spinning disks and read/write heads.

Uses flash memory chips with no moving parts.

Non-volatile memory using flash technology, typically in small form factors (USB drives, memory cards).

Speed

Slower read/write speeds due to mechanical parts.

Faster read/write speeds with no moving parts.

Fast, but typically slower than SSDs for large-scale data storage (depends on the device type).

Capacity

Available in larger capacities (up to several TBs).

Available in smaller to moderate capacities (typically up to several TBs).

Typically smaller capacity (e.g., 1GB to 1TB, depending on the device).

Size/Weight

Typically larger and heavier.

Smaller, lighter, and more compact.

Very small and lightweight, often used in portable devices like USB sticks, SD cards, etc.

1.5.6 Function and characteristics of each type of memory

 


 

No comments:

Post a Comment