CS HSSC-I
Basharat Ali, Lecturer in
CS
Govt. College Aliabad
Hunza
Ch 2:
COMPUTER MEMORY
OUTLINE
© [Link]@[Link] | 03445363766
INTRODUCTION TO COMPUTER
MEMORY
• Memory:
• In computing memory refers to the
physical devices used to store
programs (sequence of instructions)
or data on a temporary or
permanent basis for use in a
computer or other
digital/computing device.
• Main/Primary Memory
• Secondary Memory (Storage)
© [Link]@[Link] | 03445363766
MEMORY TERMINOLOGIES
• ACCESS MODE: Access mode refers to the ways/techniques
through which data is accessed (read/written) in a memory device.
• 1. Sequencial/Serial Acess: Data is accessed by starting at the
beginning and then searched through, in order/sequence, until the
required information is found.
• Kind of like an old film reel where the movie starts at the beginning and
data is read in order until the movie is finished
• The need to search from the beginning of the storage medium
makes this type of data access very slow.
© [Link]@[Link] | 03445363766
MEMORY TERMINOLOGIES
• 1. Sequencial/Serial Acess:
Examples:
• Magnetic Tapes
• Punched Cards
© [Link]@[Link] | 03445363766
MEMORY
TERMINOLOGIES
• ACCESS MODE:
• 2. Direct/Random Acess: The A good comparison as to how
computer can calculate exactly direct access differs to serial
where the data has been stored and access is to think of how DVD
can go straight to it directly using movies work compared to old
the address of data element film-reel movies.
• Examples:
In a DVD movie you can 'jump'
• Semiconductor memories (RAM, ROM,
USB Flash memories) directly to any scene you want
but in a film-reel you have to
• CDs/DVDs
© [Link]@[Link] | 03445363766 move through every scene until
• Hard Disks you come to one you want.
MEMORY TERMINOLOGIES
• Access Time:
• It is the time taken to retrieve data from memory. Access time in
sequential access memory devices is more than the random access
memory devices.
• Data Transfer Rate:
• It is the amount of data that is transferred from one memory device
into another in unit time. Its unit in bits per second (bps).
• Capacity:
• The maximum amount of data a memory device can store. Measured
in bits, bytes, etc.
• Cost:
• The price of memory per capacity (1MB) is called cost of memory.
© [Link]@[Link] | 03445363766
MEMORY TERMINOLOGIES
• Bit: (b)
• Bit stands for binary digit.
• It is the smallest unit of data stored on a computer
memory
• A bit is stored in a memory cell.
• Byte: (B)
• It is the basic unit of computer memory which can be Memory
processed by the CPU. Word
• A group of 8 bits which is addressable in a computer
memory.
• Used to store meaningful characters in memory.
© [Link]@[Link] | 03445363766
MEMORY TERMINOLOGIES
b
B
© [Link]@[Link] | 03445363766
MEMORY TERMINOLOGIES
Memory Word
• In computing the smallest chunk or size of data that a computer can process is called
memory word.
• It is a fixed size piece of data handled as a unit by the processor.
• The number of bits in a word is called word size.
• Word size in the modern computers typically ranges from 16 to 64 bits, depending on the
architecture of the computer.
• A computer that has a bigger word size can transfer more bits into the microprocessor at
a time for processing and this improves the processing speed of the computer.
• The main indication of the word size is how much memory the processor can address.
• A 32-bit processor is limited to 2 memory addresses. This is a group of bits (cells) in a
memory that represents information or data
© [Link]@[Link] | 03445363766
Memory Build-up and
Retention Power
• The method of manufacturing and technology determines
the memory build-up.
• The amount of time for which data is stored and method
of storing data is called retention power.
• Three Types:
• Chip/Semiconductor memory
• Magnetic memory
• Optical memory
© [Link]@[Link] | 03445363766
Chip/Semiconductor Memory
• Computer memory that is made up from a semiconductor chip.
Also called Solid State memory.
• A chip is made up of integrated circuits (ICs), in which hundreds
of thousands of components(transistors) are integrated on a
semiconductor chip.
• It is electronic memory, data is stored in the form of electric
charges.
• There are no moving parts, hence it is very fast, smaller, and use
less power.
• Eg. RAM, ROM, Cache, Registers
© [Link]@[Link] | 03445363766
Chip/Semiconductor Memory
© [Link]@[Link] | 03445363766
Magnetic Storage
• This refers to any type of data storage using a magnetized medium.
• A thin layer of magnetic material is coated on the surface of magnetic tape and
magnetic disks.
• Binary information is stored in the form of tiny magnetized and non-
magnetized spots on the surface of magnetic tape or disk.
• A magnetized spot represents a binary 1 and a non-magnetized spot a binary 0.
• A read-write head moves very close to the magnetic surface. The head is able
to detect and modify the magnetization of material.
• Cost is low, can easily be damaged and slower then chip/semiconductor
storage.
© [Link]@[Link] | 03445363766
Magnetic Storage
© [Link]@[Link] | 03445363766
Optical Storage
• In optical storage data is stored on optical discs in the
form of pits and lands.
• These pits and lands are created by a laser beam during
burning (storing data to a disc), and also read by a laser
beam from the same.
• In order to read/write data to a disc we need a disc drive.
• Examples: CD ROM, DVD ROM, DVD RAM, Blu-Ray Disc
etc.
© [Link]@[Link] | 03445363766
• Cheaper, faster than magnetic tape and floppy disc, but
slower than hard disc
Optical Storage
© [Link]@[Link] | 03445363766
Optical Storage
© [Link]@[Link] | 03445363766
Volatile and Non-Volatile
Memory
• VOLATILE MEMORY:
• Volatile memory is computer memory that requires power
(electricity) to maintain the stored information.
• Volatile memory retains the information as long as power supply is
on, but when power supply is off or interrupted the stored memory
is lost.
• It is also known as temporary memory.
• Examples: RAM (Random access memory), Cache memory and
Registers.
© [Link]@[Link] | 03445363766
Volatile and Non-Volatile
Memory
• NON-VOLATILE MEMORY:
• Non-volatile memory is a permanent memory that can retain
the stored information even when not powered.
• Examples: ROM (Read only memory), flash memory,
magnetic storage devices (e.g. hard disks and , and blueray
disk.
• Non-volatile memory is typically used as secondary storage
for long term or future use.
© [Link]@[Link] | 03445363766
TYPES/CLASSIFICATION OF
COMPUTR MEMORY
© [Link]@[Link] | 03445363766
MAIN MEMORY
• Main memory is the memory that is directly accessible by the
CPU.
• Main memory or internal memory is the part of the computer
system that holds data and instructions for processing.
• It is mainly used to store data that is used by the system at start-
up and to run various types of programs such as the operating
system and other programs.
• Typically, main memory is contained on microchips that are
either attached or mounted on the computer’s motherboard.
© [Link]@[Link] | 03445363766
Internal Processor Memory
• These are closest to CPU and
directly accessible by it.
• Registers
• L1 Cache
• L2 Cache
• Internal processor memory is
built up from Static RAM
(SRAM)
© [Link]@[Link] | 03445363766
Internal Processor Memory
• PROCESSOR REGISTERS:
• Registers are small memory units in which a single word is
stored.
• There is a large number of registers inside the microprocessor.
• Their function is to temporarily store binary information and pass
it on to the other parts of the processor or main memory during
the execution of program instructions.
• Some commonly used registers inside the microprocessors are:
• Accumulator (AC), Instruction Register (IR), Data Register (DR,
Program Counter(PC), and Memory Address Register (MAR).
© [Link]@[Link] | 03445363766
Internal Processor Memory
• CACHE MEMORY:
• Cache memory is small amount of high-speed
semiconductor memory which exists inside the
microprocessor or on the motherboard of the computer.
• This memory stores some active portion of main memory.
• It lies between the CPU and RAM of a computer.
• When any information is required by the CPU, first it will
look up in the cache memory, and if it is not available in
the cache then it will fetch it from the RAM.
© [Link]@[Link] | 03445363766
Internal Processor Memory
• CACHE MEMORY:
• Types: L1, L2, and L3 Cache.
• L1 and L2 cache are built into
the processor, they have the
highest access time.
• L3 cache is built on the
motherboard, it is a bit slower
than L1 and L2 cache, but has
higher capacity
© [Link]@[Link] | 03445363766
Random Access Memory
(RAM)
Dr. Bernard Widrow Dr. Robert H. Dennard,
invented the first RAM invented the first
core memory in 1950s
© [Link]@[Link] | 03445363766
electronic DRAM in 1968
(RAM) Types
© [Link]@[Link] | 03445363766
RAM
• RAM (Random Access Memory) is the hardware in a computing device where
the operating system (OS), application programs and data in current use are
kept so they can be quickly reached by the device's processor.
• Random-access memory is a form of computer memory that can be read and
changed in any order, and is directly accessed.
• The access time for any location in RAM is constant irrespective of its location.
• RAM is the main memory in a computer, and it is much faster to read from and
write to than other kinds of storage, such as a hard disk drive (HDD), solid-state
drive (SSD) or optical drive.
• Random Access Memory is volatile.
© [Link]@[Link] | 03445363766
TYPES OF RAM
• According to build-up of
memory cells there are two
types of RAM
• 1. Static RAM:
• 2. Dynamic RAM:
• Memory cells: the basic
electronic component made up
A DRAM Cell An SRAM Cell
of transistors, capacitors etc.
which hold a bit in the form
electric charge is called a cell.
© [Link]@[Link] | 03445363766
TYPES OF RAM
• DRAM: Dynamic RAM
• Each cell of DRAM is made up of transistors and capacitors.
• The capacitors need to be refreshed regularly, otherwise
the capacitor leaks charge and the data is lost.
• Dynamic RAM (D-RAM) is the most common type of RAM in
the computer.
• DRAM is less expansive as compared to SRAM.
• Each dynamic RAM chip contains millions of memory cells.
© [Link]@[Link] | 03445363766
TYPES OF RAM
• SRAM: Static RAM
• Each cell of SRAM is made up of 4 to 6 transistors only.
• There is no need for refreshing the data/cells. Hence
SRAM consumes less energy.
• Cache and Registers are made from Static RAM
(SRAM).
• SRAM is the most expensive computer memory.
• SRAM is the fastest memory.
© [Link]@[Link] | 03445363766
ROM: Read Only Memory
• Read-only memory (ROM) is a type of storage
medium that permanently stores data on personal
computers (PCs) and other electronic devices.
• It contains the programming needed to start a PC,
which is essential for boot-up; it performs major
input/output tasks and holds programs or software
instructions.
• The process of writing data to a ROM is called
programming the ROM.
• Some ROMs can be reprogrammed while others
cannot. The first EPROM, an Intel 1702
© [Link]@[Link] | 03445363766
TYPES OF ROM
• PROM: Programable Read Only Memory
• PROM stands for Programmable ROM.
• A PROM is a semiconductor chip that is obtained from the
manufacturer in an un-programmed state and the user
programs it according to his requirements.
• It can be programmed only once.
• PROM is used in electronic machines that require some
information to be stored in it permanently.
© [Link]@[Link] | 03445363766
TYPES OF ROM
• EPROM: Erasable Programable Read Only Memory
• EPROM stands for Erasable PROM.
• This type of ROM can have its contents erased by ultraviolet light using
special circuitry outside the computer and then reprogrammed.
• This procedure can be carried out many times.
• However, the constant erasing and rewriting will eventually make the chip
useless.
• EPROMs are generally used for programs designed for repeated use such
as the BIOS (Basic Input Output Setup) and can also be upgraded with a
latest version |of
© [Link]@[Link] the program.
03445363766
TYPES OF ROM
• EEPROM: Electrically Erasable Programable Read
Only Memory
• The EEPROM can be altered while being used in a logic board by
using special power circuits and write pulse generators.
• The EEPROM can work like a read/write semiconductor memory
while retaining the non volatile nature of ROMs and PROMs.
• This type of ROM works in a similar way to flash memory.
• It is used to store a computer system's BIOS and can be updated
without removing it from the circuit board.
© [Link]@[Link] | 03445363766
SECONDARY MEMORY
• Secondary memory is also known as backing storage, auxiliary
storage or mass storage.
• It stores large amount of information permanently.
• Secondary storage is non-volatile.
• Examples:
• Magnetic Tape
• Magnetic Discs (Hard disc, External hard disc)
• Optical Discs (CD/DVD/Blu-ray ROM)
• Chip Memory (SSDs External Hard Drives, Flash Memory, Cards etc)
© [Link]@[Link] | 03445363766
Magnetic Tape
© [Link]@[Link] | 03445363766
Magnetic Tape
© [Link]@[Link] | 03445363766
Magnetic Tape
© [Link]@[Link] | 03445363766
Magnetic Tape
• Magnetic tape is a plastic strip made up of layers with a magnetic coated
material.
• Bits are recorded as magnetic spots (domains) arranged in a pattern on
the tape along several tracks to represent a bit (0 or 1).
• Usually 7 or 9 bits are recorded simultaneously to form a character.
• Read/Write heads are mounted one in each track so that data can be
recorded and read as a sequence of characters.
• It is sequential, slow, and cheap.
• It is used to archive huge amounts of data, usually in TBs. Magnetic Tapes
come to 5TB. (Latest IBM Tape 220 TB)
in sizes up| 03445363766
© [Link]@[Link]
Magnetic Discs
• A magnetic disk is a flat
disk coated with a
magnetic material on
which data/information is
stored in digital form.
• Data/Information is
stored in digital form as
tiny magnetized spots.
© [Link]@[Link] | 03445363766
Hard Disc
© [Link]@[Link] | 03445363766
Hard Disc
© [Link]@[Link] | 03445363766
Hard Disc
1956: IBM RAMAC Super Computer with the First Hard
Disc with size 5MB
© [Link]@[Link] | 03445363766
Hard Disc
• Hard disk contains one or many platters (disks) coated with magnetic material on
both sides.
• The platters are attached to a spindle holding them in parallel with equal gap.
• All the platters rotate together at high speed.
• Bits are stored on the magnetic surface in spots along concentric circles called tracks.
• Hard disks contain thousands of tracks.
• Track is divided into sections called sectors.
• Each platter has two read/write heads for writing data to and reading data from both
surfaces of the platter. These heads have direct access.
• Hard discs are manufactured in extremely clean environment to avoid dust particles.
© [Link]@[Link] | 03445363766
Portable Hard Drive
© [Link]@[Link] | 03445363766
Portable Hard Drive
• A portable hard drive is a compact magnetic disk drive that
plugs into a USB port on a computer.
• It is used as portable secondary or backup storage device.
• Its common storage capacity is 500GB to 4TB.
• It consists of one or more platters which are air-sealed inside
a casing and connected to and powered by USB port of
computer.
• They use USB 2.0 or 3.0 technology for fast data transfer.
• Some have wireless functionality.
© [Link]@[Link] | 03445363766
Optical Storage/Discs
• Optical disk is a
plastic-coated disk
that can store digital
data.
• Data is stored in
optical disk in digital
form by laser
technology as tiny
bumps (pits and
© [Link]@[Link] | 03445363766
lands) etched on the
surface.
Compact Disc (CD)
• It is an optical disk used for storing digital data.
• It was originally developed for storing and playback of
sound recording but later on its use expanded to
computer data storage.
• A CD is 1.2 millimetres thick with a diameter of 120
millimetres.
• It is made up of polycarbonate plastic and weighs 15 to
20 grams.
• The storage capacity of CDs ranges from 350 MB to
800MB.
© [Link]@[Link] | 03445363766
Compact Disc
(CD)
• A CD has a single spiral track divided into
sectors that spirals (rotates) from the centre
to the outside edge. (Direct access)
• Information is stored on a CD in the form of
lands and pits.
• A binary 0 is represented by a pit (bump) and
a 1 by a land.
• A CD player/drive is used for reading data
from CDs
• A CD writer is used to write data to CD R/RWs
© [Link]@[Link] | 03445363766
Optical Storage
CD/DVD
Drive
CD/DVD
ROM
© [Link]@[Link] | 03445363766
Optical Storage
© [Link]@[Link] | 03445363766
CD/DVD-R (Recordable Once)
© [Link]@[Link] | 03445363766
CD/DVD-R (Recordable Once)
© [Link]@[Link] | 03445363766
CD/DVD-R (Recordable Once)
© [Link]@[Link] | 03445363766
CD/DVD-R (Recordable Once)
© [Link]@[Link] | 03445363766
CD/DVD-R (Recordable Once)
© [Link]@[Link] | 03445363766
CD/DVD-R (Recordable Once)
© [Link]@[Link] | 03445363766
CD/DVD-RW (Re-Writeable)
© [Link]@[Link] | 03445363766
CD/DVD-RW (Re-Writeable)
© [Link]@[Link] | 03445363766
CD/DVD-RW (Re-Writeable)
© [Link]@[Link] | 03445363766
CD/DVD-RW (Re-Writeable)
© [Link]@[Link] | 03445363766
CD/DVD-RW (Re-Writeable)
© [Link]@[Link] | 03445363766
Blu-Ray Disc
© [Link]@[Link] | 03445363766
Blu-Ray Disc
© [Link]@[Link] | 03445363766
Blu-Ray Disc
© [Link]@[Link] | 03445363766
Blu-Ray Disc
© [Link]@[Link] | 03445363766
USB Flash Memory
(EEPROM)
© [Link]@[Link] | 03445363766
USB Flash Memory
(EEPROM)
© [Link]@[Link] | 03445363766
Flash Memory Cards
(EEPROM)
© [Link]@[Link] | 03445363766
Flash Memory Cards
(EEPROM)
© [Link]@[Link] | 03445363766