0% found this document useful (0 votes)
6 views8 pages

Understanding Primary Memory Types

Primary memory, or main memory, is essential for a computer's CPU to perform tasks, divided into RAM (volatile) and ROM (non-volatile). RAM allows for quick access to active data, while ROM stores critical startup instructions. Secondary memory provides long-term data storage, and registers serve as the fastest storage units within the CPU, facilitating immediate data processing.

Uploaded by

mbahgodwin215
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views8 pages

Understanding Primary Memory Types

Primary memory, or main memory, is essential for a computer's CPU to perform tasks, divided into RAM (volatile) and ROM (non-volatile). RAM allows for quick access to active data, while ROM stores critical startup instructions. Secondary memory provides long-term data storage, and registers serve as the fastest storage units within the CPU, facilitating immediate data processing.

Uploaded by

mbahgodwin215
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Primary Memomry

Primary memory, also known as Main Memory, is the


internal storage area of a computer that the Central
Processing Unit (CPU) can access directly. It acts as the
« bridge » between the processor and the permanent
storage (like your hard drive).
Without primary memory, a computer would be unable to
perform even the simplest tasks because the CPU would
have no place to « park » the instructions it is currently
working on.

Various Types of Primary Memory


Primary memory is broadly classified into two main
categories, each with its own sub-types :

RAM (Random Access Memory)


This is the « working memory » of the system. It is
volatile, meaning it loses its data as soon as the power is
turned off.
**SRAM (Static RAM) : Retains its Data as long as
electrical power is apply to the chips, if power is turn of ,
its content is lost forever
**DRAM (Dynamic RAM) : on the other hand it have very
short data life time typically about miliseconds and this
true even if power is applied constandly. it is used to
refresh data before its expiresSlower and cheaper than
SRAM, used as the main system memory.
Problem 1 : Multi-tasking (Why we need RAM)
Suppose you are editing a high-resolution photo in
Photoshop while also having 20 Chrome tabs open and a
Spotify playlist running.
The Role of RAM : Your CPU needs to jump between these
tasks instantly. Since the hard drive (Secondary Memory)
is too slow for this, the « active » data for all these apps
is stored in RAM.
The Problem : If your RAM is too small (e.g., 4GB), the computer will
« stutter » because it has to keep swapping data back to the slow hard
drive. High RAM (e.g., 16GB) allows all these « active » problems to live in
the fast lane simultaneosly

ROM (Read-Only Memory)


This is « permanent memory. » It is non-volatile, meaning
it retains data even without power.
Problem 2 : The « Cold Start » (Why we need ROM)
Imagine you press the power button on your computer.
The RAM is empty (because it’s volatile). The hard drive
has the Operating System (OS), but the CPU doesn’t know
how to « talk » to the hard drive yet.
The Role of ROM : The BIOS (stored in ROM) provides the
« seed » instructions. It tells the CPU how to check the
hardware and where to find the OS on the hard drive to
start the boot process. Without ROM, your computer
wouldn’t know how to turn itself on.
**PROM (Programmable ROM) : A blank chip that can be
programmed once by a [Link] process of writing data on
a Prom requires a particular type of device called Device
[Link] device programmer writes data to the
device one woerd at a time by applying an electrical
charge input pins on the chip. Once programmed it code
can nevr be changed as a result PROMs are also known as
ONE TIME Programmable Device

**EPROM (Erasable PROM) : Can be erased using


ultraviolet (UV) light and then
[Link] in the same manner as PROM
but the keep difference is the in this case Eprom can be
ersed and Re-programmed repeatedly. To erase EPROM ,
you simply expose the device to high UV light , by doing
this you essentially reset the device the entire Silicon
Chip to its intial un-programmed state
**EEPROM (Electrically Erasable PROM) : Can be erased
and rewritten electrically. This is what modern
BIOS/firmware [Link] to EPROM,but the erase
operation is accomplished Electrically rather than
exposure to UV light

Key Differences : RAM vs. ROM

Features RAM ROM


volatility Volatile(Temporal) Non-Volatile
(Permenent)
Speed Extremly Fast Slower than the RAM
Data Usage Stores Data cuèrrently Stores Startup
in use Instructions
Modifiability Easily Read aand Mostly Read Only
Written
Cost Expensive Cheaper
FullForm Random Access Memory Read Only Memory

SECONDARY
MEMORY
Secondary memory (also known as external storage) is a type of
non-volatile computer memory that is not directly accessible by the
CPU. Unlike RAM, which is « volatile » (it forgets everything when the
power goes out), secondary memory keeps your data permanently
until you choose to delete it.
Think of RAM as your office desk (fast but limited space) and
secondary memory as the filing cabinet (huge space, but it takes a
moment to walk over and get a folder).

1. Various Types of Secondary Memory

Secondary storage is generally classified based on the technology


used to read and write data :

**Magnetic Storage : Uses magnetized media to store datathey


consist of rotating circular plates coated with a magnegtic material.
Examples : Hard Disk Drives (HDD), Floppy Disks, Magnetic Tapes.

*HDD : these contains multi^le platters and a mechanical “read and


write arm “ that moves across them much like a record player

*Floppy Disks : small, flexible magnetic disk in a plastic case

The « Deep Archive » Problem


Scenario : A bank needs to store financial records for 10 years for
legal compliance, but they will likely never look at them.
Solution : Magnetic Tape. It is incredibly slow to read, but it is the
most reliable and cheapest way to store massive amounts of data for
decades without the hardware failing.

**Solid-State Storage : Uses electronic circuits (flash memory)


with no moving parts not always considered as “actually as
disks”since they have no circular rotating part.
Examples : Solid State Drives (SSD), USB Flash Drives, SD Cards.

The « Portable Presentation » Problem


Scenario : A student needs to move a small PowerPoint file from their
home computer to a school computer with no internet.
Solution : USB Flash Drive. It’s small, fits on a keychain, and is much
more durable than a CD or an external hard drive for daily travel in
**Optical Storage : Uses lasers to read/write data on a reflective
surface.
Examples : CDs, DVDs, Blu-ray Discs.

2. Key Differences Between Types


Each type has a different « personality » depending on what you
need (speed vs. Cost).

Features Magnetic SSD Optical


Speed Midium Fastest slow
Cost Cheapest More Expensive Very Cheap
Durability Gragile High Medium
Capacity Very High ( uo High( up to Low ( 700MB-
to 20TB+) 8TB+) 50GB)

REGISTRES

While secondary memory is like a filing cabinet, registers are the


equivalent of the CPU’s hands. They are the smallest and fastest storage
units in the computer, located directly inside the processor.

Since the CPU cannot perform math or logic directly on data while it is
sitting in the RAM or Hard Drive, it must first “grab” that data and place it
into a register.

1. Characteristics of Registers

Location: Inside the CPU (Central Processing Unit).

Speed: The fastest memory in the hierarchy (accessible in a single clock


cycle).

Size: Very small, typically measured in bits (e.g., 32-bit or 64-bit).

Volatility: Highly volatile; data is lost the moment power is cut or the next
instruction overwrites it.

2. Common Types of Registers


Registers are categorized by their specific “job” during the Fetch-Decode-
Execute cycle:

Register Name Abbreviation Fuction


Program_Counter PC Hold the memory Adress of the
next instruction to be fetch
Instruction Register IR Hold the current instruction been
decoded or executed
Memory Adress MAR Holds the memory address of the
Register data that the CPU needs to read
or write
Memory Data MDR Holds the actual data being
Register tranfered to or from memory
Accumulator AC A General purpose register used
to store the results of arithemetic
and logical operations
Program Status Word PSW Also called flag register its stores
status bits if calculation resulted
into a Zero, error or overflow

3. How They Work Together (The Real-World Process)

Imagine you want the computer to solve 5 + 3 :

The PC points to the address where the « Add 5 and 3 » instruction is


stored.

The MAR takes that address to the RAM.

The RAM sends the data back, which lands in the MDR.

The instruction moves to the IR to be decoded (the CPU realizes it needs to


add).

The number 5 is loaded into the Accumulator.

The number 3 is added to it, and the new result, 8, replaces the old value
in the Accumulator.

CACHE MEMORY
If registers are the CPU’s “hands,” and RAM is your “desk,” Cache Memory
is like a small organizer tray sitting right on the corner of that desk.

It is a high-speed storage area that sits between the CPU and the RAM. Its
only job is to store copies of the data that the CPU uses most frequently so
the processor doesn’t have to « walk » all the way to the RAM to get it.

1. Why do we need Cache ?

There is a « Speed Gap » in computers :

CPUs are incredibly fast (they work in nanoseconds).

RAM is relatively slow compared to the CPU.

If the CPU had to wait for RAM every time it needed a piece of data, it
would spend 90% of its time sitting idle. Cache solves this by anticipating
what the CPU needs next.

2. The Three Levels of Cache (L1, L2, L3)

Modern computers use a « multi-level » cache system to balance speed


and cost.

3. Key Caching Concepts

When the CPU looks for data, it follows a specific logic :

Cache Hit : The CPU finds the data it needs in the cache. This is the goal !
The computer feels snappy and fast.

Cache Miss : The data isn’t in the cache. The CPU must go to the slower
RAM, which causes a « stall » or delay.

Locality of Reference : This is the « magic » behind caching. It’s the


principle that if a computer uses a piece of data, it is very likely to use it
(or the data right next to it) again very soon.

4. Real-World Example : The « Kitchen » Analogy

Imagine you are a chef (the CPU) :

Registers : The tools currently in your hands (knife, spoon).

Cache : The ingredients already chopped and sitting on your cutting board
(ready to use in seconds).

RAM : The ingredients inside the refrigerator (you have to stop cooking,
walk over, and find them).
Secondary Memory : The grocery store (you have to leave the house
entirely).

The Problem : If you had to go to the grocery store every time you needed
a pinch of salt, you’d never finish the meal. Caching (keeping the salt on
the counter) makes the process efficient.

Summary : Registers vs. Cache vs. RAM

You might also like