Unit No 2
Unit No 2
(ICS_PART-I)
COMPUTER
MEMORY
Q2.1 What is computer memory? Explain different units of memory?
Memory: An electronic holding place where data and information are
store either temporary or permanent is called Memory.
Computer memory is divided into the following types:
1. Internal Processor Memory
2. Primary or Main or Internal Memory
3. Secondary or Auxiliary or Backing Storage Memory
Units of Memory: The following are basic memory measurement units.
Bit
Nibble
Byte
Kilobyte
Megabyte
Gigabyte
Terabyte
Memory Word
Bit: Bit stands for ‘Binary digit’, the binary digit 0 and 1 is called Bit. It’s
the basic and smallest unit of storage in computer memory. A bit can
hold only one of two values; either 0 (OFF) or 1 (ON).
Nibble: A group of four (4) bits is called Nibble.
e.g., 0000, 1111, 0011, 1100, 0101 and 1010 etc
Byte: A group of eight (8) bits is called Byte. A byte can store a single
character of data. For example, K, a, 7, @, # etc. Computer storage is
measured in byte multiples.
1 Byte=8 bits
Kilobyte (KB): Kilo means one Thousand (1000 or 103) but in digital
computer as information is stored in binary digits (0, 1) and its units are
power of 2 and the most nearest number near thousand is 2 10 = 1024.
i.e.
1 Kilobyte=210 Bytes =1024 Bytes
1 KB=1024 Bytes
1|Page
1 You can also watch my video lectures on YouTube Bannu Professors Academy
COMPUTER SCIENCE NOTES
(ICS_PART-I)
Megabyte (MB): Mega means one Million (1,000,000 or 10 6) but in
digital computer as information is stored in binary digits (0, 1) and its
units are power of 2 and the most nearest number near million is
220 = 10,48,576.
2 You can also watch my video lectures on YouTube Bannu Professors Academy
COMPUTER SCIENCE NOTES
(ICS_PART-I)
1 Megabyte=220 Bytes=10, 48,576 Bytes
1 MB=1024 KB
Gigabyte (GB): Giga means Billion (1,000,000,000 or 10 9) but in digital
computer as information is stored in binary digits (0, 1) and its units are
power of 2 and the most nearest number near billion is
230 = 1,073,741,824.
1 Gigabyte=230 Bytes =1,073,741,824 Bytes
1 GB= 1024 MB
Terabyte (TB): Tera means Trillion (1,000,000,000,000 or 10 12) but in
digital computer as information is stored in binary digits (0, 1) and its
units are power of 2 and the most nearest number near trillion is
240 = 1,099,511,627,776.
1 Terabyte=240 Bytes =1,099,511,627,776 Bytes
1 TB= 1024 GB
Memory Word: A memory word, like a byte, is a group of fixed number
of bits processed as a unit, which varies from computer to computer
but is fixed for each computer. The length of a memory word is called
word- size or word length. It may be as small as 8 bits or may be as long
as 64 bits. A computer stores the information in the form of memory
words. Modern computers usually have a word size of 16, 32 or 64 bits.
3 You can also watch my video lectures on YouTube Bannu Professors Academy
COMPUTER SCIENCE NOTES
(ICS_PART-I)
Examples: Main Memory (RAM, ROM, Cache), Flash memory drives,
Memory Cards, registers.
Magnetic Memory: The memory in which writing and reading
process are made by magnetic mechanism is called magnetic memory.
A core is a ring of ferrite material. Magnetic media is coated with a
magnetic layer which is magnetized in clockwise or anticlockwise
directions. When the disk moves, the head interprets the data stored at
a specific location in binary 1s and 0s at reading. The information is
accessed using one or more read/write heads.
Examples: Hard disks, Floppy disks and Magnetic tapes.
_
i. Cache Memory
ii. Registers
Cache Memory: t is the second part of internal memory. Its speed is faster than
4 You can also watch my video lectures on YouTube Bannu Professors Academy
COMPUTER SCIENCE NOTES
(ICS_PART-I)
RAM and ROM but slower than Register. Its size is smaller than RAM and Larger
than Register. Cache memory is used to store those parts of program which is
nearly to run. Since the speed of processor is much faster than RAM so RAM cannot
provide the data to processor. For this reason cache memory is built between RAM
and Processor. There are three level of cache memory L1, L2 and L3.
L1 (Levele1) cache: L1 is built into the actual processor. It is high speed memory
which provides data to the processor at the same speed as the processor needed.
Its size is from 8 Kilobytes to 128 Kilobytes.
L2 (level2 cache): L2 pulls information from the RAM, which is than accessed by L1.
Its speed is slow than L1 but faster than RAM and size is from64 KB to 16 MB.
L3 (Level 3) cache: L3 memory works hand-in-hand with L1 and L2 cache to improve
computer performance. The speed of L3 is faster than RAM and size is larger than
L1 and L2. CPU first of all looks for the instruction in L1 than it checks in L2 and L3
respectfully. The main purpose of cache memory is to utilize the processor as much
as possible.
Registers. Register is the small size of memory inside the processor. There are
different types of Register in the processor which perform different types of
operation. On the basis of the function performed by the register, there are two
categories of register these are i) general purpose Register ii) Special purpose
Register. Here we will discuss some important types of register.
6 You can also watch my video lectures on YouTube Bannu Professors Academy
COMPUTER SCIENCE NOTES
(ICS_PART-I)
reads or writes two consecutive words per clock cycle. There are many types of
DDR SDRAM which are used in computer today. These are DDR1 RAM, DDR2
RAM and DDR3 RAM.
7 You can also watch my video lectures on YouTube Bannu Professors Academy
COMPUTER SCIENCE NOTES
(ICS_PART-I)
Q2.7 Differentiate between RAM and ROM?
Following are some differences b/w RAM and ROM.
Differences b/w RAM and ROM
Basis for
RAM ROM
Comparison
8 You can also watch my video lectures on YouTube Bannu Professors Academy
COMPUTER SCIENCE NOTES
(ICS_PART-I)
Features of Secondary Storage: The main features of secondary
storage are;
It is non-volatile (permanent) in nature.
It has larger storage capacity.
It is less expensive than main memory.
It can be accessed sequentially and randomly (directly).
They are reusable and can be erased and store data any time the
user requires.
Examples: Magnetic Tapes, Magnetic Disks, Optical Disks, Flash Memory,
Memory Cards etc.
*****xxxxx*****
9 You can also watch my video lectures on YouTube Bannu Professors Academy
COMPUTER SCIENCE NOTES
(ICS_PART-I)
Disadvantages: The main disadvantage of Direct Access Storage is; that
it’s costly as compared to sequential access storage.
Examples: Magnetic disks (Hard disk, floppy disk), Optical disk (CD, DVD).
*****xxxxx***** _
10 You can also watch my video lectures on YouTube Bannu Professors Academy
COMPUTER SCIENCE NOTES
(ICS_PART-I)
Magnetic Disk: The most common type of secondary storage devices
are magnetic disks. These are made of either flexible plastic material
(Floppy disks) or rigid metal (Hard disks). Magnetic disks are coated
with a magnetic substance. Each surface of the disk is subdivided into
concentric circles, called Tracks. There is at least one read-write head
for each surface. Some common types of magnetic disks are Floppy
disks, Hard disks and Zip disks.
a. Floppy Disks: Floppy disks are old type of magnetic storages. It is
flexible plastic disk coated with magnetic material on both sides.
They are packed inside a plastic jacket for protection. Digital
information is stored in the form of small magnetized spots.
Floppy disk drive is used for reading and writing information in
Floppy disks. Maximum storage capacity of floppy disk was 1.44
MB. Now a day’s floppy disk is not used in computer.
b. Zip Disks: It is just like a Floppy disk but only the size and storage
capacity are different. A Zip disk can hold about 100 MB to 250
MB of data.
11 You can also watch my video lectures on YouTube Bannu Professors Academy
COMPUTER SCIENCE NOTES
(ICS_PART-I)
Floppy disk and zip disks are also easily portable from one place to
another.
Data can be read directly from any part of the hard disk.
It stores large amount of data, usually in TB.
Very fast access to data.
Disadvantages: Magnetic disk has the following disadvantages;
Data can be corrupted by magnetic fields, dust or mechanical
problems.
Consumes a lot of power.
Can be broken if dropped.
Costly than Magnetic tape.
Optical Disks: An optical disk is an electronic storage medium that
uses optical storage techniques and technology to read and write data.
It is a computer storage disk that stores data digitally and uses laser
beams to read and write data.
The following are different types of optical disks.
i. CD (Compact Disk)
ii. DVD (Digital Versatile Disk)
iii. Blue Ray Disk (BD)
i. CD (Compact Disk): A compact disc (CD) is a thin, circular disc of
plastic used for recording, storing and playing back audio, video
and computer data. A CD can store about 700 MB of data. A CD
player/drive is used for reading/recording the data on the CD. It’s
used for storing music, video, data and programs. When the CD
played, it rotates around and a red laser beam is used to read the
data. It supports one of three recording types;
Read only (CD-ROM; Compact Disk-Read Only Memory)
Write-once (CD-R; Compact Disk-Recordable)
Re-recordable (CD-RW; Compact Disk-Re-Writable)
ii. DVD (Digital Versatile Disk): It is an optical disk technology that
can stores 4 to 16 GB of audio, video or other information. DVDs
can be single or double sided. Red laser is used for read/write
operations in DVDs. Its data storage capacity is about ten times
more than a CD. A DVD writer/player is used for
reading/recording the data on the DVD. DVDs are available as;
Recordable (DVD-R)
Re-writable (DVD-WR)
12 You can also watch my video lectures on YouTube Bannu Professors Academy
COMPUTER SCIENCE NOTES
(ICS_PART-I)
iii. BD (Blue-Ray Disk): It is the latest optical disk technology which
can store more data than DVD. It stores 50 GB to 100 GB of data.
The bumps (pits, 0) and lands(1) on the surface of blue-ray that
represent digital information are much smaller and very densely
packed. This increases the storage capacity of blue-ray disk. Blue-
violet laser is used for read/write operations in Blue-ray disks. It’s
more durable than CDs and DVDs. It requires a special blue-ray
drive for reading and writing.
Advantages: Optical disk has the following advantages;
Very cheap than Magnetic tape and Magnetic disk.
Large storage capacity is available.
Can sometimes be re-used.
High data stability.
Small and portable.
Disadvantages: Optical disk has the following disadvantages;
It requires special drives to read/write data.
Slower to access than hard disk.
Easy to scratch.
Easily broken.
Chip Memory: Chip or microchip is a small piece of semi-conductor
material (Silicon). A small circuit called IC (Integrated Circuit) is
embedded on it. A typical chip contains a million of electronics
components (Transistors).Chip memory can be used as primary and
secondary memory. RAM and ROM are used as a primary Chip memory
and Flash memory and Memory cards are used as a secondary chip
memory.
i. Flash Memory: Flash memory is a non-volatile memory chip that
can be electronically erased and reprogrammed. It is primarily
used in memory cards, USB flash drives, MP3 players, digital
cameras and solid-state drives for general storage and transfer of
data between computers and other digital devices. Flash memory
is a type of electronically erasable programmable read only
memory (EEPROM), but may also be a standalone memory
storage device such as a USB drive. USB flash drives are also called
Pen drives, Memory sticks, Key chain drives, Key drives and
Memory keys.
13 You can also watch my video lectures on YouTube Bannu Professors Academy
COMPUTER SCIENCE NOTES
(ICS_PART-I)
Advantages: Flash memory has the following advantages;
It is small in size and portable as compare to other storage
devices.
Extremes in pressure and temperature change would not
normally affect Flash memory.
It consumes less power than other storage devices.
It is more durable than CDs and DVDs.
It is less expensive than hard disk.
It is faster than hard disk and optical disks.
It is less prone to damage.
Disadvantages: Flash memory has the following disadvantages;
It can be easily lost.
More expensive than CD and DVD.
It has limited number of write and erase cycles.
Most flash drives do not have a write-protection mechanism.
ii. Flash Memory Cards: A Flash Memory Card is a small storage
device used to store data such as text, pictures, audio and video.
It is commonly used in many electronic devices such as digital
cameras, mobile phones, laptops, MP3 players etc. They are small,
re-recordable and able to retain data without power.
Advantages: Memory cards have the following advantages;
Memory cards are much lighter, smaller and compact with large
storage capacity.
Highly portable and can easily be used with different electronic
devices.
Memory cards have non-volatile memory.
It consumes less power.
Do not produce any noise.
Disadvantages: Memory cards have the following disadvantages;
Cannot be read by the computer without proper hardware.
Can get corrupted if not handled carefully.
They can be lost or misplaced.
They can break easily.
Sometimes work slowly.
_
14 You can also watch my video lectures on YouTube Bannu Professors Academy
COMPUTER SCIENCE NOTES
(ICS_PART-I)
Exercise of chapter no 2
Q1 select the best choice for the following MCQs.
i. ___________ memory holds data and programs not currently in use and provides
long-term storage.
a. primary memory b. Secondary memory
c. Main d. Internal
ii.___________ is the smallest amount of memory a computer can hold?
a. Byte b. KB c. Bit D.MB
iii. Which of the following is the fastest memory?
a. RAM b. ROM c. Cache Memory d. PROM
15 You can also watch my video lectures on YouTube Bannu Professors Academy
COMPUTER SCIENCE NOTES
(ICS_PART-I)
1. Internal Processor Memory
2. Primary or Main or Internal Memory
3. Secondary or Auxiliary or Backing Storage Memory
ii. Define bit, byte and memory word
Bit: Bit stands for ‘Binary digit’, the binary digit 0 and 1 is called Bit. It’s
the basic and smallest unit of storage in computer memory. A bit can
hold only one of two values; either 0 (OFF) or 1 (ON).
Byte: A group of eight (8) bits is called Byte. A byte can store a single
character of data. For example, K, a, 7, @, # etc. Computer storage is
measured in byte multiples. 1 Byte=8 bits
Megabyte (MB): Mega means one Million (1,000,000 or 10 6) but in
digital computer as information is stored in binary digits (0, 1) and its
units are power of 2 and the most nearest number near million is
220 = 10,48,576.
iii. What is the importance of cache memory in a computer?
Cache memory is used to store those parts of program which is nearly to run. The
main purpose of cache memory is to utilize processor speed. Since the speed of
processor is much faster than RAM so RAM cannot provide the data to processor.
For this reason cache memory is built between RAM and Processor. There are
three level of cache memory L1, L2 and L3.
iv. Give some uses of secondary memory
Register is the small size of memory inside the processor. There are different types
of Register in the processor which perform different types of operation. On the
basis of the function performed by the register, there are two categories of register
these are i) general purpose Register ii) Special purpose Register
16 You can also watch my video lectures on YouTube Bannu Professors Academy
COMPUTER SCIENCE NOTES
(ICS_PART-I)
Basis for
SRAM DRAM
Comparison
Definition A type of RAM which does A type of RAM which
not need to be periodically needs to be periodically
refreshed to retain its data is refreshed to retain its data
called SRAM. is called DRAM.
*****xxxxx***** _
*****xxxxx***** _
17 You can also watch my video lectures on YouTube Bannu Professors Academy
COMPUTER SCIENCE NOTES
(ICS_PART-I)
Q# viii: (b) Differentiate b/w Cache and Registers
S.No Cache Registers
1. Small amount of memory lies in Small memory circuits within
between RAM and CPU (L3) or CPU.
lies within CPU (L1, L2).
*****xxxxx***** _
18 You can also watch my video lectures on YouTube Bannu Professors Academy
COMPUTER SCIENCE NOTES
(ICS_PART-I)
Q# viii: (d) Differentiate b/w Magnetic Tape and Magnetic Disk
Basis for
Magnetic Tape Magnetic Disk
Comparison
Physical It is a thin and long It consists of several platters
plastic strip coated arranged above each other to
with magnetic form a cylinder; each platter has
material. a read-write head.
X
AJAB NOOR
Lecturer in Computer Science, GPGC Bannu
*****xxxxx***** _
19 You can also watch my video lectures on YouTube Bannu Professors Academy