Chapter 2
COMPUTER MEMORY
MAIN MEMORY
▪ Every computer has a temporary storage built into the computer hardware
▪ It stores instructions and data of a program mainly when the program is
being executed by the CPU.
▪ This temporary storage is known as main memory, primary storage, or
simply memory.
▪ Physically, it consists of some chips either on the motherboard or on a
small circuit board attached to the motherboard of a computer
▪ It has random access property.
▪ It is volatile.
STORAGE EVALUATION CRITERIA
FIXED WORD LENGTH MEMORY
Word
0501 B O M B A Y
0502 D E L H I
Address 0503
Numbers
1024
▪ Storage space is always allocated in multiples of word-length
▪ Faster in speed of calculation than variable word-length memory
▪ Normally used in large scientific computers for gaining speed of
calculation
VERIABLE WORD-LENGTH MEMORY
0025 B 0051 D ▪ Each memory location
0026 O can store only a single
0052 E character
0027 M L
0053 ▪ Slower in speed of
0028 B 0054 H calculation than fixed
Address world-length memory
0029 A Address 0055 I
Numbers Numbers
0030 Y ▪ Used in small business
0056
computers for
0031 optimizing the use of
storage space
4096 4096
Note: With memory becoming cheaper and larger day-by-day, most
modern computers employ fixed-word-length memory organization
MEMORY CAPACITY
▪ Memory capacity of a computer is equal to the number of bytes that can be
stored in its primary storage
▪ Its units are:
Kilobytes (KB) : 1024 (210) bytes
Megabytes (MB) : 1,048,576 (220) bytes
Gigabytes (GB) : 1,073,741824 (230) bytes
TYPES OF COMPUTER MEMORY
PRIMARY MEMORY
RANDOM ACCESS M EMORY (RAM)
▪ Also called ‘main memory’
▪ Implemented as ‘solid state’ (electronic) random access memory
(RAM)
▪ RAM is fast, small with low power consumption, but relatively
expensive (cost per bit) and volatile (data is lost when switched
off)
▪ Like a CPU, it is build as an IC (integrated circuit)
▪ How does RAM work?
[Link]
RANDOM ACCESS M EMORY (RAM)
▪ Two basic RAM technologies:
▪ Static RAM (SRAM) – uses a flip-flop circuit and remembers as
long as it has power but costs more
▪ Dynamic RAM (DRAM) – uses a capacitor to hold charge, which
leaks out so needs refreshing but costs less
▪ Most PC systems (and games consoles etc) use dynamic RAM
because of cost.
RANDOM ACCESS M EMORY (RAM)
RANDOM ACCESS M EMORY (RAM)
▪ Modern computers have multiple Gigabytes (GB) of RAM in a
small number of chips mounted on a circuit board package
called a ‘dual in-line memory module’ (DIMM) which mount in
slots on the motherboard.
▪ There is also ‘single in-line memory module’ (SIMM)
READ ONLY MEMORY (ROM)
▪ ROM: Read Only Memory
▪ Also known as ‘firmware’
▪ A variation on the previous main memory
▪ The data or program instructions are built into the chips when
they are made and cannot be changed
▪ Non-volatile – will retain data when power removed
▪ Used for code that does not change, such as PC BIOS
[Link]
TYPES OF ROM
Type Usage
Data is burnt by the manufacturer of the
Manufacturer-programmed ROM
electronic equipment in which it is used.
User-programmed ROM
or The user can load and store “read-only”
programs and data in it
Programmable ROM
(PROM)
The user can erase information stored
in it and the chip can be reprogrammed
Erasable PROM (EPROM) to store new information
TYPES OF ROM
Type Usage
A type of EPROM chip in which the stored
Ultra Violet EPROM information is erased by exposing the chip
(UVEPROM) for some time to ultra-violet light
Electrically EPROM
(EEPROM) A type of EPROM chip in which the stored
or information is erased by using high
voltage electric pulses
Flash memory
TYPES OF ROM
PROM EPROM
EEPROM UVEPROM
QUICK BRAIN – Sample Question 1
1. How does RAM work?
2. State the differences between SRAM & DRAM
SECONDARY MEMORY
HARD DISK
▪ Also called backing store - normally implemented as a
hard-disk drive (HDD)
▪ Non-volatile, low cost per bit, high power consumption, many
times slower than RAM
▪ Originally developed by IBM for mainframes - been massive
advances in data storage density and overall capacity – even in
laptops and desktops
HARD DISK
HARD DISK
▪ HDD capacity now multi-terabytes (TB)
▪ Multiple ‘platters’ are held in a stack, coated with a magnetic
material, and divided into sectors, tracks and clusters
▪ These partitioned platter surfaces can be magnetised in two
ways – giving binary storage
▪ A read/write head hovers over the spinning disk surfaces and
through electro-magnetism can detect (read) the values or
record (write)new data
[Link]
SOLID STATE DISK
▪ SSD capacity multi-terabytes (TB)
▪ Uses interconnected flash-memory
chips, not magnetic media, to store
data.
▪ No moving parts, SSDs can deliver
improved reliability.
▪ Significant increase in the performance
of a computer equipped with an SSD.
▪ SSDs consume far less power than
traditional hard drives.
[Link]
OPTICAL DISK
• Originally based on Compact Disk (CD) technology from the
music industry – have variations like CD-R
• Then came Digital Versatile Disk (DVD) from the movie
industry - due to higher data compression and thus storage
capacity
• Now we have Blu-ray disks
• Hard disks (HDD) use spots of magnetism to store data
• Optical disks use spots of light – as reflective disk surface
stamped with “pits” and “lands”- giving a binary storage
system - read by bouncing a laser off the surface and detecting
changes in reflection from pits and lands
[Link]
[Link]
[Link]
OPTICAL DISK
FLASH MEMORY
▪ Use flash RAM technology as secondary storage
▪ Common examples include USB memory stick and
camera data cards
▪ Should be regarded as temporary storage as they are less
reliable long term than hard disk or optical storage
▪ Subject to physical damage
PRIMARY VS SECONDARY MEMORY
Parameter Primary memory Secondary memory
The primary memory is categorized The secondary memory is always
Nature
as volatile & nonvolatile memories. a non-volatile memory.
Secondary memory is known as a
These memories are also called
Alias Backup memory or Additional
internal memory.
memory or Auxiliary memory.
Data cannot be accessed directly
by the processor. It is first copied
Data is directly accessed by the
Access from secondary memory to
processing unit.
primary memory. Only then CPU
can access it.
It's a volatile memory meaning It's a non-volatile memory so that
Formation data cannot be retained in case of that data can be retained even
power failure. after power failure.
CACHE MEMORY
▪ It is commonly used for minimizing the memory- processor speed
mismatch.
▪ It is an extremely fast, small memory between CPU and main memory
whose access time is closer to the processing speed of the CPU.
▪ It is used to temporarily store very active data and instructions during
processing.
Cache is pronounced as “cash”
QUICK BRAIN – Sample Question 2
1. What is secondary storage? What are the two types of secondary
storage? Briefly explain
2. Why secondary storage is essential?