Online Read and Download Computer Science Notes ICS Board of Intermediate and Secondary Education Peshawar (bisep) Short Questions, Long Questions, & Mcqs.
Computer Memory Notes Intermediate Part-1 Pdf

Q.2 i) What is computer memory?
Answer:
Computer Memory
Definition:
“The storage space in the computer where data is to be processed and instructions required for processing are stored”.
Explanation:
It is any device that is capable of storing information temporarily or permanently. It is just like a human brain. The computer memory is divided into a large number of small parts called cells. Each location or cell has a unique address which varies from zero to memory size minus one. For example, if memory size is ‘n’ then the cell address ranges to ‘n-1’.
Types:
Memory is of three types:
– Cache memory
– Primary memory / Main memory
– Secondary memory
Cache memory is the fastest memory. It acts as a buffer between the CPU and main memory. Primary memory is the working area of the computer. It stores data temporarily.
Secondary memory is the permanent storage area of the computer.
Q.2 ii) Define bit, byte, and memory word.
Answer:
Bit
Abbreviation:
A bit is a short form of ‘binary digit’.
Definition:
“A bit is a single and smallest amount of computer memory.”
A binary digit is a logical 0 or 1 representing a passive or active component in an electric circuit.
Byte:
Definition:
“A group of 8 bits is called byte.”
A byte is the smallest unit that can represent a data item or a character.
Memory word:
Definition:
“A group of a fixed number of bits processed as a unit which varies from computer to computer.”
Modern computers have a size of 16, 32, or 64 bits.
Q.2 iii) What is the importance of cache memory in a computer?
Cache memory is a very high-speed semiconductor memory that can speed up the CPU. It is an extremely important part of modern computers. Computers are faster now a day because they have the fastest memory transfer rate that competes with the speed of microprocessor which makes calculations. The microprocessor can only perform fast calculations when the data is fed quickly. If the processor doesn’t have any data to calculate on a cycle, the cycle is missed and the calculation will not occur until the next cycle, which reduces the speed of the microprocessor. The job of the cache memory is to eliminate as many wasted cycles as possible.
Advantages:
The advantages of cache memory are as follows:
- 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.
- It stores data for temporary use.
Disadvantages:
The disadvantages of cache memory are as follows:
- Cache memory has limited capacity.
- It is very expensive.
Q.2 iv) Give some uses of secondary memory.
Answer:
Secondary memory is also known as external memory or non-volatile. It is slower than the main memory. These are used for storing data/ information permanently. CPU directly does not access these memories instead they are accessed via input-output routines. Contents of secondary memory are first transferred to main memory and the CPU can access it. For example, disk, CD-ROM, DVD, etc.
Uses of secondary memory:
- The secondary memory has huge space for data storage.
- The secondary memory is used for the long-term storage of programs and data on the computer.
- CPU cannot access it directly so it is less accessible to viruses.
Q.2 v) What is the role of registers in computers?
Answer:
The register is a special high-speed storage area within the CPU. It has a major role in the memory of computers because all data must be represented in a register before it can be processed. For example, if two numbers are added, both numbers must be in registers and the result is also placed in a register.
The register can also contain the address of a memory location where data is stored rather than the actual data itself.
The number of registers that a CPU has and the size of each register determine the power and speed of a CPU. For example, a 32-bit CPU is one in which each register is 32-bits wide. Therefore, each CPU instruction can manipulate 32 bits of data.
Some of the main registers in the CPU are as follows:
Accumulator register (AC): It is located in ALU and is used to store the results of arithmetic and logic unit operations.
Status register: It is used to indicate certain conditions during CPU operation.
Instruction Register (IR): It holds the instruction which has to be executed next.
Program Counter (PC): It is also called the instruction pointer register. It is used to store the address of the next instruction which is to be fetched for execution.
Buffer Register: This register is used to hold the contents of data or instructions read or written in memory.
Q.2 vi) Differentiate between DRAM and SRAM.
Answer:
The difference between SRAM and DRAM is as follows:
Headings | SRAM | DRAM |
Static/dynamic | SRAM is static. | DRAM is dynamic. |
Speed | SRAM is fast. | DRAM is slower than SRAM. |
Power | SRAM consumes less power. | DRAM consumes more power than SRAM. |
Transistors | SRAM uses more transistors per bit of memory. | DRAM uses fewer transistors per bit of memory. |
Value | SRAM is expensive. | DRAM is cheaper. |
Used in | SRAM is commonly used in cache memory. | DRAM is used in the main memory. |
Q.2 vii) Give a few characteristics of secondary storage devices
Answer:
Secondary storage devices are used for storing data permanently in the computer system. Their characteristics are as follows:
- It is a non-volatile memory i.e. it does not require continuous power to store data.
- The storage capacity of these devices is very high. It can store data up to terabytes.
- They are cheaper than the main memory.
- They can be reused even after data is erased and stored at any time.
- They can be sequential, random, or direct access.
Q.2 viii) Differentiate between the following.
a) Chip memory and Magnetic memory
b) Cache and Register ‘
c) Volatile and non-volatile memory
d)Magnetic tapes and Magnetic disks
e) EPROM and EEPROM
Answer:
a) Chip memory and Magnetic memory.
The difference between Chip and magnetic memory is as follows:
Headings | Chip memory | Magnetic memory |
Parts | They don’t have moving parts. | They have moving parts called tracks. |
Data storage | Data is stored electronically. | Data is stored magnetically. |
Speed | Chip memory is faster. | Magnetic memory is comparatively slower. |
Reliability | Its data is more reliable. | Its data is not that reliable after a specific time. |
Example | Flash memory etc. | Hard disk etc. |
b) Cache and registers:
The difference between cache and registers is as follows:
Headings | Cache | Register |
Visibility | The cache is completely transparent to software. | Registers are visible to software. |
Managed by | Caches are completely managed by the hardware. | Registers are managed at compile time when the high-level program is converted to machine-specific assembly. |
Located at | It is located next to the CPU on a separate chip. | These are located in the processor. |
Number | There is one cache in computer memory. | TThere are several registers in the processor. |
c) Volatile and non-volatile memory
The difference between volatile and non-volatile is as follows:
Headings | Volatile | Non-volatile |
What is it? | It requires an active power connection to function. | It does not require continuous power to connect. |
Retains information | Volatile memory retains the information as long as power is supplied. | Non-volatile memory retains information forever. |
Examples | RAM and Registers. | ROM, Flash memory, hard disk, etc. |
d) Magnetic tapes and magnetic disks
The difference between magnetic tapes and magnetic disks are as follows:
Headings | Magnetic tapes | Magnetic disks |
Coating | Magnetic tapes are polymers coated with special material to store data. | Magnetic disks are metal disks that are coated with special material to store data. |
External devices | A magnetic tape has storage parts that are touched by external devices. | A magnetic disk is not touched by an external device. |
Data access tape | The data access speed of the magnetic tape is slower. | The data access speed of the magnetic disk is fast. |
Space. | Magnetic tape has comparatively less storage space. | The magnetic disk can hold more data per unit volume. |
Examples | Audio cassettes, video cassettes etc. | Hard disk drives, floppy drives, etc. |
e) EPROM and EEPROM
The difference between EPROM and EEPROM is as follows:
Headings | EPROM | EEPROM |
Erased | EPROM has to be erased with exposure to ultraviolet rays. | EEPROM is erased electronically. |
Casing | It has a Quartz window in the package to expose the chip to ultraviolet light. | EEPROM is completely encased in an opaque plastic case. |
Speed | EPROM is slower. | EEPROM is much faster. |
Used as | Previously used as BIOS chips. | Currently used as BIOS chips. |
Extensive Questions
Q.3 i) Briefly explain the processor’s internal memory and its types.
Answer:
Internal processor memory:
Internal processor memory is part of the main memory of the computer. It is directly accessed by the CPU. It works very fast. There are two types of internal processor memory, these are:
1. Cache memory
2. Registers
1. Cache memory:
ache memory is a portion of the high-speed static RAM (SRAM) and is effective because most programs access the same data or instructions over and over. If repeatedly used information is placed in cache, the CPU will access it faster and more efficiently.
There are different levels of Cache. These are:
- Level 1 (L1) Cache: It is referred to as the primary cache, internal cache, or system cache. It exists in the microprocessor and is a very fast and most expensive cache. The processor first checks the L1 cache memory.
- Level 2 (L2) Cache: It is commonly referred to as secondary cache or external cache. It is located on the motherboard of earlier computers. In modern computers, it is found on the processor chip.
- Level 3 (L3) Cache: In modern computers, L3 is located on the motherboard. Its size is large in comparison to the L1 and L2 cache.
2. Registers:
The register is a memory component that resides within a CPU. These are high-speed temporary memory used to help the CPU get access to data and instructions quickly and effectively. These are semiconductor devices whose contents can be read and written at extremely high speeds but which are held temporarily during the execution of programs.
Registers are the top memory hierarchy. These are the fastest way for the system to manipulate data. These are measured by the number of bits they can hold. For example, an 8-bit register means it can store 8 bits of data or a 32-bit register means it can store 32 bits of data.
The main registers are:
- Accumulator register (AC): It is used to store the result of arithmetic and logical instructions.
- Status register: It is also called Processor Status Word (PSW). It holds the system status indicators i.e. carry digits, overflow.
- Instruction register (IR): It is used to store the current instruction being executed.
- The program counter (PC): This register contains the address of the next instruction to process.
- Buffer register: This register is used temporarily store the data from memory.
Q.3 ii) Explain RAM and ROM along with their types in detail
Answer:
Random Access Memory (RAM):
RAM is also called the primary storage of the computer. It is the working area of computers. It is Read and Write (R/W) memory. It is a volatile memory means that all data will be lost when the power goes off. It holds data and instructions temporarily. CPU gets that information from RAM when it needs that for processing. It is the most common type of memory found in computers.
Abbreviation:
RAM stands for Random Access Memory.
Types:
It has two different types:
– Static Random Access Memory (SRAM)
– Dynamic Random Access Memory (DRAM)
1) Static Random Access Memory (SRAM):
SRAM is a type of memory that retains data bits in its memory as long as power is being supplied. SRAM provides faster access to data and is more expensive than DRAM. SRAM is used for the computer’s cache memory. It is called SRAM because it does not have to be periodically refreshed to maintain its state.
2) Dynamic Random Access Memory (DRAM):
DRAM is a type of memory used in most computers. DRAM must have an electric current to maintain an electrical state. It is called DRAM because it is periodically refreshed to maintain its state. DRAM is used as the internal memory of a computer as it has a simple structure and it is also cost-effective with high storage.
Types:
It has two types:
– SDRAM
– DDR SDRAM
2.1) SDRAM
Abbreviation:
SDRAM stands for Synchronous Random Access Memory.
Explanation:
It is semiconductor memory with very high speed. It is an improved version of the earlier DRAM. Its working is synchronized with the system data bus, and because of this, its speed is very in operation than non-synchronous RAM.
2.2) DDR SDRAM
Abbreviation:
DDR SDRAM stands for Double Data Rate SDRAM. It is an improved technology of SDRAM. It allows data transfer at double speed. Types of DDR SDRAM used today are:
- DDR1 RAM (Double Data Rate)
- DDR2 RAM
- DDR3 RAM
DDR2 and DDR3 are used in computers nowadays. DDR3 RAM is shown below in the figure:

Read Only Memory (ROM):
ROM is a non-volatile memory i.e. it retains the information stored in it even when power is not supplied. So, it is a permanent storage device. ROM is written by manufacturers, not by users or programmers.
ROM has the following types:
I. Programmable Read Only Memory (PROM)
II. Erasable Programmable Read Only Memory(EPROM)
III. Electrically Erasable Programmable Read Only Memory (EEPROM)
- PROM:
PROM is the type of ROM that is programmed only once after it has been created and then it can never be changed. Once it has been programmed, the information written on it cannot be deleted or erased. Computer BIOS is an example of PROM.

- EPROM:
EPROM is the type of ROM which is erasable for once. The data written on EPROM can be removed by using Ultra Violet Rays and it can be re-written. Its erasing time is about 20 minutes. Intel 8048 chip is an example of EPROM.

- EEPROM:
EEPROM is the type of ROM that can be erased and reprogrammed within milliseconds. It has a limited number of times for re-programming. Usually, it can be re-programmed 10,000 times. Flash drive is an example of EEPROM.

Q.3 iii) What is meant by secondary storage devices also explains the difference between Sequential access and Random access.
Answer:
Secondary storage devices:
Secondary storage devices are one of the most valuable assets of the computer. It is storage where software and data can be stored permanently. Secondary storage is necessary because data is lost from memory or primary storage when a computer is turned off whereas secondary storage does not. Therefore, it is commonly known as non-volatile storage. The data on it stays forever until it is deleted or overwritten by the user.
Characteristics of secondary storage devices:
Some characteristics of secondary storage devices are as follows:
- It is non-volatile storage that is it retains data even after power is switched off.
- The storage capacity of these devices is very high.
- They are cheaper than the main memory.
- They can be reused as data can be erased or deleted and then re-written.
- They can be either sequential, random, or direct access.
Examples of secondary storage devices:
Following are some common examples of secondary storage devices:
- Floppy disks
- Hard disks
- Optical disks
- Magnetic tapes etc.
Difference between sequential and random access:
The differences between direct and sequential access are as follows:
Headings | Sequential access | Random access |
Storage | It can store data in volumes. | It can store data in disk blocks which uses more space. |
Access | It accesses data in sequence. | It can access data randomly that is in any order. |
Examples | Magnetic disks, magnetic tapes, etc. | RAM, flash drives, etc. |
Q.3 iv) Describe the following along with their advantages and disadvantages:
a) Magnetic tapes
b) Magnetic disks
c) Optical disks( CD, DVD, Blue Ray)
a.Magnetic Tapes:
Magnetic tape is commonly used to record and store computer and video data. Magnetic tape is mainly used by large companies and organizations that require massive data storage. Following are the advantages and disadvantages of magnetic tapes:
Advantages:
- A single magnetic tape cartridge can store a large amount of data up to 1 Terabyte. Large cartridges are used by big companies and institutions that require continuous recording and backup of data.
- Data collection can go on without interruption overnight or for an entire weekend.
- Magnetic tape can be recorded over and reused repeatedly.
- Large amounts of information are stored.
- Magnetic tape is inexpensive and budget friendly.
Disadvantages:
- Special equipment must be purchased and set up for recording and storing data. The data can only be read on special equipment.
- If the data is stored near a strong magnetic field or a large speaker, the tape can be damaged.
- Magnetic tape has a lifespan of 15 years. Data quality gradually erodes over time.
- It is necessary to keep older tape equipment just to be able to read the stored data.
b.Magnetic Disks:
A magnetic disk is a storage device that uses magnetization to write, rewrite and access data. It is covered with a magnetic coating and stores data in the form of tracks, spots, and sectors. Hard disks and floppy disks, zip disks are common examples of magnetic disks.
Advantages:
- Unlike magnetic tapes, which support sequential access to data, magnetic disks support direct access to data. Hence, they are more suitable for a wider range of applications.
- Due to its random access property, magnetic disks are often used as online secondary storage devices, in which case they store data of multiple users of the computer system. A tape is not suitable for such type of usage, due to its sequential-access property.
- Expect for the fixed type Winchester disks, the storage capacity of other magnetic disks is virtually unlimited because as many disks as required can be used for storing very large data sets.
- Due to their low cost and high data recording densities magnetic dis, the cost per bit of storage is low for magnetic disks. An additional cost benefit is that magnetic disks can be erased and refused many times.
- Floppy disks and zip disks are compact and light in weight. Hence, they are easy to handle and store. A very large amount of data can be stored in small storage space.
- The data transfer rate for a magnetic disk system is normally higher than for a tape system.
- Magnetic disks are less vulnerable to data corruption due to careless handling or unfavorable temperature and humidity conditions than magnetic tapes.
Disadvantages:
- Although magnetic disks may be used for both types of application, for applications of the latter type, the use of magnetic disks may be less efficient than magnetic tapes.
- It is more difficult to maintain the security of information stored on magnetic disks, which are used as shared, online secondary storage devices as compared to information stored on magnetic tapes or other types of magnetic disks.
- For Winchester disks, a disk crash or drive failure often result in the loss of entire data stored on it. It is not easy to recover the lost data. Hence, suitable backup procedures are suggested for data stored on Winchester disks.
- Some types of magnetic disks, such as disk packs and Winchester disks, are not so easily portable as magnetic tapes.
- On a cost-per-bit basis, the cost of the magnetic disk is low, but the cost of magnetic tapes is even low.
- They must be stored in a dust–free environment.
- Floppy disks, zip disks, and disk packs should be labeled properly to prevent the erasure of useful data by mistake.
c.Optical Disks:
An optical disk is an electronic data storage medium that can be written to and read using a low-powered laser beam. Few advantages and disadvantages of optical disk:
Advantages:
- The cost–per–a bit of storage for optical disks is very low, because of their low cost and enormous storage density.
- The use of a single spiral track makes optical disks an ideal storage medium for reading large blocks of sequential data, such as music.
- Optical disk drives do not have any mechanical read\write heads to rub against or crash into the disk surface. This makes optical disks a more reliable storage medium than magnetic tapes or magnetic disks.
- Optical disks have a data storage life of more than 30 years. This makes them a better storage medium for data archiving as compared to magnetic tapes or magnetic disks.
- Since data once stored on an optical disk become permanent, the danger of stored data getting inadvertently erased/overwritten is not there with optical disks.
- Due to their compact size and lightweight, optical disks are easy to handle, store, and port from one place to another.
- Music CDs can be played on a computer having a CD-ROM drive along with a sound board and speakers. This allows computer systems to be also used as music systems, whenever desired.
Disadvantages:
- It is a read-only(permanent) storage medium. Data once recorded, cannot be erased, and hence, the optical disks cannot be reused.
- The data access speed for optical disks is slower than magnetic disks.
- Optical disks require a more complicated drive mechanism than magnetic disks.
Q.3 v) Describe the following chip Memories with their advantages and disadvantages.
a) Flash Memory
b) Memory Cards
Answer:
a.Flash Memory:
Flash Memory storage devices are typically small, lightweight, removable, and rewritable. They consist of a small printed circuit board that is encased in a plastic or metal casing. They usually have a removable cap with covers and protect the part of the stick which is inserted into a USB port. Memory sticks are available from 1 Gb upwards. Following are the advantages and this advantages of flash memory:
Advantages:
- They are more compact and portable than CDs or DVDs.
- They hold more data than CDs, many gigabytes.
- They are reliable as they have no moving parts(unlike a hard disk).
- They are easily branded on their cover to reflect the organization.
- They are not affected by magnetic fields(unlike magnetic tape).
Disadvantages:
- More expensive than CD or DVD as a medium.
- They can be easily lost.
- The metal part which is inserted into the USB port can be snapped off or damaged if handled roughly.
b.Memory Cards
A memory card is a small storage device, which is used to store your data backups such as text, pictures, audio, and video. There are a few advantages and disadvantages of memory cards:
Advantages:
- Memory cards have non-volatile memory, which keeps data stable on the card. Data on them are not threatened by loss of power source, and need not be periodically refreshed.
- They are solid-state media hence free from mechanical difficulties or damage.
- The new generation memory cards are smaller, lighter, and compact with higher storage capacity.
- They require less amount of power.
- They are highly portable. They can be easily used in several small, lightweight, and low-power devices.
- They do not produce any noise while at work
- They allow more immediate access.
- They come in all sorts of sizes. The 64GB SD cards are the most common ones.
- They have relatively large storage space compared to old backup devices.
- They can easily fit in the memory card slots in different devices and are easily removable.
- They can be used on different devices such as cameras, com[uters or mobile phones.
- They are easy to keep track of.
- One can use a large card for cost-effectiveness.
- Memory cards do not need organization.
Disadvantages:
- They can break easily.
- They can be lost, misplaced, or smashed.
- These cards may be affected by electronic corruption and make the entire card unreadable.
Read more: Cha 1 (Introduction to a computer system)
Table of Contents