0% found this document useful (0 votes)
10 views

Slide Set - 04

The document discusses different types of computer memory including primary memory like RAM and ROM, secondary memory, and cache memory. RAM is volatile and used for temporary storage while running programs, while ROM permanently stores the BIOS program. Secondary memory includes hard disks for permanent backup storage. Cache memory acts as a fast buffer between the CPU and main memory.

Uploaded by

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

Slide Set - 04

The document discusses different types of computer memory including primary memory like RAM and ROM, secondary memory, and cache memory. RAM is volatile and used for temporary storage while running programs, while ROM permanently stores the BIOS program. Secondary memory includes hard disks for permanent backup storage. Cache memory acts as a fast buffer between the CPU and main memory.

Uploaded by

Jahanzaib Brohi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Slide Set – 04

CPSA & CP
17PG & 17ME
Contents

• Computer Memory
• Primary Memory
• Types of Primary Memory
• RAM (Random Access Memory)
• ROM (Read Only Memory)
• Secondary memory
• Cache
Computer Memory
• Computer memory is the physical device used to store
data and programs (set of instructions) temporarily
or permanently.

Data
+
Programs
Computer Memory

Memory

Primary / Main / Working Secondary / Auxiliary


Cache
Memory Memory

RAM ROM Magnetic Optical Solid State


Computer Memory

Primary Secondary
Memory Memory Cache

Holds Data
Holds Data
and Programs Holds Data
and Programs
that are and Programs
that are most
currently that are not
frequently
being currently used
used by the
processed by by processor
processor
the processor
Primary Memory

• It is known as main memory or working memory.


• Primary memory holds only those data and instructions on which computer
is currently working on.
• It is generally made up of semiconductor material.
• The data and instruction required to be processed reside in main memory.
• It is divided into two subcategories RAM and ROM.
• Faster than secondary memories.
• A computer cannot run without primary memory.
Types of Primary Memory

• There are two types of primary memory:


RAM (Random Access Memory)
• RAM stands for Random Access Memory.
• It stores the data and programs temporarily.
• It is volatile, means it does not retain its contents when power is turned off.
• It provides the data and programs to the processor so that it can process the
data on the basis of given set of instructions.

Set of Instructions

Data Process Information


RAM (Random Access Memory)

• RAM is a physical chip (collection of chips).


RAM (Random Access Memory)

• It is Read and Write memory.


RAM (Random Access Memory)

• The access mechanism is random (non sequential), means we can directly


access any byte of RAM with out touching any other byte.

• The Memory (RAM + ROM) is divided in to pieces of bytes (8-bits).

• Every byte has got address defined in Hexadecimal.

• Say: ROM = 4 bytes, RAM = 8 bytes, Memory = 8 + 4 = 12 bytes


RAM (Random Access Memory)
200BH 16
200AH 8
2009H 0
2008H 49
RAM
2007H 64
2006H 85
2005H -58
2004H -1
2003H 54
2002H 96
2001H 5
ROM
2000H 25

MEMORY
ROM (Read Only Memory)
• It stands for Read Only Memory.

• It stores the special program permanently.

• It is non-volatile, means it retains its contents even when the power is


turned off.

• ROM is physical memory chip which stores special program called BIOS
(Basic Input Output System).
ROM (Read Only Memory)
• BIOS is required to start the computer.

• When ever you turn on/ restart the computer, the very first program that
starts is the BIOS (Stored in ROM).

• The job of BIOS is to execute POST operation (Power On Self Test).

• POST checks whether all the required hardware is present or not? And all
the hardware attached, is working properly or not?
ROM (Read Only Memory)

• The access mechanism is Random like RAM.

• ROM is hardware chip.

• BIOS is the set of instruction (Program)

• ROM + BIOS = Firmware


ROM (Read Only Memory)

• ROM is Read Only, we can only read but can not easily change/update the
contents.
Secondary Memory
• This type of memory is also known as auxiliary/external memory.
• It is slower than main memory.
• These are used for storing data/Information permanently.
• CPU directly does not access these memories. Contents of secondary
memories are first transferred to main memory, and then CPU can access it.
For example : disk, CD-ROM, DVD etc.
• It is known as backup memory.
• It is non-volatile memory.
• Computer may run without secondary memory.
• Slower than primary memories.
Cache Memory
• Cache memory is a very high speed semiconductor memory which can speed
up CPU.
• It acts as a buffer between the CPU and main memory.
• It is used to hold those parts of data and program which are most frequently
used by CPU.
• The parts of data and programs are transferred from disk to cache memory
by operating system, from where CPU can access them.
• Cache memory is faster than main memory.
• It consumes less access time as compared to main memory.
• It stores the program that can be executed within a short period of time.
• It stores data for temporary use.
Cache Memory
• Cache memory has limited capacity.
• It is very expensive.
• Most processors have L1, L2 and L3 (Level 1, Level 2 and Level 3) Cache.
• L1 cache is built inside the microprocessor.
• L2 and L3 cache are located on the microprocessor chip.
• First, microprocessor finds data in cache memory.
• If data is found in cache, it is called as HIT.
• If data is not found in cache, it is called as MISS.
• In case of MISS, microprocessor requests data from RAM.
Cache Memory

CPU HIT
1. First look in cache for data 3. If data is in cache send it to CPU

Cache
2. If data is not in cache fetch from RAM 4. Send data from RAM, write it to cache
and send it to CPU

RAM MISS

You might also like