I-18 Computer Fundamentals
Registers: These are the special-purpose, high-speed temporary memory units. These are temporary
storage areas for holding various types of information such as data, instructions, addresses and the
intermediate results of calculations. Essentially, they hold the information that the CPU is cur-
rently working on. Registers can be thought of as CPU’s working memory, a special additional
storage location that offers the advantage of speed. Registers work under the direction of the CU to
accept, hold and transfer instructions or data and perform arithmetic or logical comparisons at high
speed. The CU uses a data storage register in the similar way a store owner uses a cash register as
a temporary, convenient place to store the transactions. As soon as a particular instruction or piece
of data is processed, the next instruction immediately replaces it, and the information that results
from the processing is returned to main memory. Table 1.2 lists some of the important registers
used in CPU.
Table 1.2 Registers and Functions
Register Name Function
Program counter (PC) It keeps track of the next instruction to be executed.
Instruction register (IR) It holds the instruction to be decoded by the control unit.
Memory address register (MAR) It holds the address of the next location in memory to be accessed.
Memory buffer register (MBR) It is used for storing data either coming to the CPU or data being
transferred by the CPU.
Accumulator (ACC) It is a general-purpose register used for storing temporary results and
results produced by ALU.
Data register (DR) It is used for storing the operands and other data.
15. Explain the concept of main memory and its types.
Ans: The ‘memory’ is the part of the computer that holds data and instructions for processing.
Logically it is an integral component of the CPU but physically it is a separate part placed on the com-
puter’s motherboard. It stores program instructions or data for only as long as they pertain the program
to be in operation. The CPU accesses the main memory in random manner, that is, the CPU can access
any location of this memory to either read information from it or store information in it.
The memory in a computer system is of three fundamental types which are as follows:
Internal processor memory: This memory is placed within the CPU (processor) or is attached to
a special fast bus. Internal memory usually includes cache memory and special registers, both of
which can be directly accessed by the processor. This memory is used for temporary storage of data
and instructions on which the CPU is currently working. It is the fastest among all the memories
but is the most expensive also. Therefore, a very diminutive part of internal processor memory
is used in the computer system. It is generally used to compensate for the speed gap between the
primary memory and the processor.
Primary memory: Random Access Memory (RAM) and Read Only Memory (ROM) fall under
the category of the primary memory. This memory is also known as ‘main memory’. Every com-
puter comes with a small amount of ROM that contains the boot firmware (called ‘BIOS’). This
holds enough information to enable the computer to check its hardware and load its operating
system into RAM at the time of system booting. RAM is the place where the computer temporarily
M01_ITL-ESL4791_01_SE_C01.indd 18 12/22/2012 4:52:22 PM
Fundamentals of Computers I-19
stores its operating system, application programs and current data so that the computer’s processor
can reach them quickly and easily. It is volatile in nature, that is, when the power is switched off;
the data in this memory are lost. Unlike RAM, ROM is non-volatile. Even when the computer is
switched off, the contents of the ROM remain available.
Secondary memory: This memory (also known as ‘auxiliary memory’) provides backup stor-
age for instructions (computer programs) and data. The most commonly used secondary storage
devices are magnetic disk and magnetic tapes. These are the least expensive as well as have much
larger storage capacity than primary memory. The instructions and data stored on secondary stor-
age devices are permanent in nature. They can only be removed if the user wants it so or the device
is destroyed. Secondary memory can also be used as ‘overflow memory’ (also known as ‘virtual
memory’), when the capacity of main memory is surpassed. It is to be noted that that unlike pro-
cessor memory and main memory, secondary memory is not directly accessible to the processor.
Firstly, the data and instructions from secondary memory have to be shifted to main memory and
then to the processor.
Internal
processor
memory
Access speed
Storage capacity
Registers,
cache
memory
RAM, ROM
Magnetic tape, magnetic disk
Primary memory
Secondary memory
High
High
Low
Low
Slow
Fast
Cost
Figure 1.5 Memory Hierarchy
Figure 1.5 illustrates the memory hierarchy. The CPU accesses memory according to a distinct hier-
archy. When the data come from permanent storage (for example, hard disk), firstly they go in RAM.
The reason behind it is that if the CPU has to access the hard disk constantly to retrieve every piece of
required data, it would operate very slowly. When the data are kept in primary memory, the CPU can
access them more quickly. Subsequently, the CPU stores the required pieces of data and instructions in
processor memory (cache and registers) to process the data.
16. What is cache? What are the uses or advantages of cache memory? Explain with the help
of an example.
Ans: The ‘cache’ is a very high speed, expensive piece of memory, which is used to speed up the
memory retrieval process. Without the cache memory, every request from CPU to access data would be
sent to the main memory, which in response sends the data back to CPU through the system bus. This
is a slow process in computing terms, so to overcome this problem cache memory has been introduced.
M01_ITL-ESL4791_01_SE_C01.indd 19 12/22/2012 4:52:22 PM
I-20 Computer Fundamentals
This extremely fast memory would store data that are frequently accessed. This achieves the quickest
possible response time to the CPU. However, it is very expensive.
Consider an example of library system. When a person comes into the library and asks for a book,
the librarian searches for the requested book in the bookshelves, retrieves the book and delivers it to the
person. After the person reads the book, it is returned to the library. At the same time, if any other person
comes in requesting the same book, which is still placed on the librarian’s desk, the librarian does not
have to go through the process of searching the book in the bookshelves. This results in saving of pre-
cious time in retrieving the requested book, and thus improving the efficiency of the work. This analogy
can be related to computer’s cache system. The computer uses logic to determine which data are the
most frequently accessed and keeps them in the cache.
17. Discuss different types of cache.
Ans: A cache is a piece of very fast memory, made from high-speed static RAM that reduces the
access time of the data. It is generally incorporated in the processor, where valuable data and program
segments are kept. Cache memory can be categorized into three levels, which are described as follows:
L1 cache: This cache is closest to the processor and hence is termed as ‘primary’ or L1 ‘cache’.
Each time the processor requests information from memory, the cache controller on the chip uses
special circuitry to first check if the requested data are already in the cache. If it is present, then
the system is spared from time-consuming access to the main memory. In a typical CPU, primary
cache ranges in size from 8 to 64 KB, with larger amounts on the newer processors. This type of
cache memory is very fast because it runs at the speed of the processor since it is integrated into it.
L2 cache: This cache is larger but slower in speed than L1 cache. It is used to see recent accesses
that is not picked by L1 cache and is usually 64 to 2 MB in size. An L2 cache is also found on the
CPU. If L1 and L2 cache are used together, then the missing information that is not present in L1
cache can be retrieved quickly from the L2 cache.
L3 cache: This cache memory is an enhanced form of memory present on the motherboard of
the computer. It is an extra cache built into the motherboard between the processor and the main
memory to speed up the processing operations. It reduces the time gap between request and
retrieval of the data and instructions thereby accessing data much more quickly than main memory.
L3 cache is being used with processors nowadays having more than 3 MB of storage in it.
18. Distinguish between primary memory and secondary memory.
Ans: The two basic types of memories are primary memory and secondary memory. Some of the
differences between these two memories are listed in Table 1.3.
Table 1.3 Differences between Primary Memory and Secondary Memory
Primary Memory Secondary Memory
It is directly accessed by the CPU for the purpose of storing and
retrieving information.
It is accessed with the help of address bus and data bus.
It does not hold the data when the power is turned off, that is, it
is volatile in nature.
It is much faster than secondary memory.
It is more costly as compared to secondary memory. Therefore,
a computer system usually comprises a small primary memory.
It is not directly accessible by the CPU.
It is accessed by using input/output channels.
It holds the data even when the power is turned off, that is,
it is non-volatile in nature.
It is comparatively slower.
Secondary memory devices are less costly. Therefore,
a computer system usually comprises much larger
secondary memory.
M01_ITL-ESL4791_01_SE_C01.indd 20 12/22/2012 4:52:22 PM
Fundamentals of Computers I-21
19. How can data be accessed from secondary storage devices?
Ans: Secondary storage devices facilitate storing of data and instructions permanently. The data
stored on a secondary storage device can be accessed, depending upon how they stored on the device.
Primarily, there are two methods of accessing data from the secondary storage devices which are as
follows:
Sequential access: It means the computer system must search the storage device from the
beginning until the desired data are found. The most common sequential access storage device is
magnetic tape where data are stored and processed sequentially. Suppose, a tape contains informa-
tion regarding employees of an organization. Now, to look for employee number 100’s information,
the computer will have to start with employee number 1 and then go past 2, 3 and so on, until it
finally comes to 100. The sequential access method is quite simple than other methods but search-
ing for data is slow.
Direct access: It means that the computer can go directly to the location, where the data that the
user wants, is stored. The direct access method is also called ‘random access’. The most common
direct access storage devices are magnetic disk and optical disk. In these devices, the data is stored
as a numbered sequence of blocks. Thus, one can access block 12, then access block 78 and then
block 2. The direct access method is ideal for applications such as airline reservation systems or
computer-based directory assistance operations. In these cases, there is no fixed pattern of the
requests for data.
20. Differentiate between RAM and ROM.
Ans: Both RAM and ROM fall under primary memory. But, still there exits some differences
between them, which is listed in Table 1.4.
Table 1.4 Differences between RAM and ROM
RAM ROM
RAM is a form of memory in which one can both read and
write the required data.
It is a volatile memory, that is, it stores the data temporar-
ily. The information gets erased when the power is switched
off.
It is used where the data changes on frequent basis.
It is also known as ‘direct access memory’, since it can be
directly accessed by the user.
As it is a read only memory, so it can only be read by the CPU.
Hence, users cannot write anything into it.
It is a non-volatile memory, that is, it stores the data
permanently. Its contents are not lost even when the
power is switched off.
Its contents are written at the time of its IC fabrication, thus its
data is not changed.
It is not accessible to user.
21. Explain in brief various types of RAM.
Ans: ‘RAM’ is like the computer’s scratch card. It allows the computer to store data for immediate
manipulation and to keep track of what is currently being processed. It is the place in a computer where
the operating system, application programs and data in current use are kept so that they can be accessed
quickly by the computer’s processor. It is much faster to read from and write to than the other kinds of
storage in a computer such as the hard disk or floppy disk. RAM is of two types which are as follows:
Static RAM (SRAM): The word static indicates that the memory retains its contents as long as
power is being supplied. However, as soon as the power goes down, the data is lost. This makes
SRAM a volatile memory as opposed to read only memory (ROM). SRAM need not be refreshed
M01_ITL-ESL4791_01_SE_C01.indd 21 12/22/2012 4:52:22 PM
I-22 Computer Fundamentals
(pulse of current through all the memory cells) periodically. It is very fast but much more expensive
than DRAM. SRAM is often used as cache memory due to its high speed.
Dynamic RAM (DRAM): It is named so because it is very unstable. The data continues to move
in and out of the memory as long as power is available. Unlike SRAM, DRAM must be continually
refreshed in order to maintain the data. This is done by placing the memory on a refresh circuit
that rewrites the data several hundred times per second. DRAM is used for most system memory
because it is cheap and small.
22. What is the difference between SRAM and DRAM?
Ans: The primary difference between SRAM and DRAM is the life of the data they store. SRAM
retains its contents as long as electrical power is supplied to the chip. If the power is turned off, its
contents are lost. On the other hand, DRAM must be continuously refreshed after about every 15 micro-
seconds. This is true even when power is supplied constantly. SRAM chips are not as dense as DRAM
chips, that is, the total number of cells in the SRAM chip is less than that on DRAM chip. SRAM is
beneficial because it is fast, has low latency (the time lag between a request and the action being per-
formed), and need not be refreshed. However, it is large and expensive, requires more power to operate
and produces a lot of heat. In contrast, DRAM is simple, small and space efficient. It may be slower
and may have a longer latency than SRAM, but it is still very useful. Typical access time of SRAM is
25 nanoseconds, whereas of DRAM 60 nanoseconds. SRAM is useful for low amount of memory. Any-
thing over 4 MB is very bulky. SRAM is good for internal memory in processors, and cache, but DRAM
is best for system’s main memory. DRAM is used where its small size and power efficiency outweigh
its slowness as compared to SRAM.
23. Explain in brief various types of ROM.
Ans: Memories in the ROM family are distinguished by the methods used to write data on them and
the number of times they can be rewritten. This classification reflects the evolution of ROM devices
from hard-wired to programmable to erasable-and-programmable. One common feature of all these
devices is their ability to retain data and programs even during a power failure. ROMs are of different
types which are as follows:
Masked ROM: The very first ROMs, known as masked ROMs, were hard-wired devices that con-
tained a pre-programmed set of data or instructions. The contents of such ROMs had to be specified
before chip production so the actual data could be used to arrange the transistors inside the chip.
Programmable ROM (PROM): Creating a ROM chip from scratch is a time-consuming and an
expensive process. For this reason, developers created a type of ROM known as Programmable
Read-only Memory (PROM), which can be programmed. Blank PROM chips can be bought eco-
nomically and coded by the users with the help of a special device known as ‘PROM-programmer’.
However, once a PROM has been programmed, its contents can never be changed. As a result,
PROM is also known as ‘one-time programmable’ (‘OTP’) device. Like other ROMs, PROM is
also non-volatile. However, it is more fragile than other ROMs as a jolt of static electricity can
easily cause fuses in the PROM to burn out, thus changing the bit pattern from 1 to 0. Nevertheless,
blank PROMs are economical and are great for prototyping the data for a ROM before committing
to the costly ROM fabrication process.
Erasable programmable ROM (EPROM): This type of ROM is programmed in exactly the same
manner as a PROM. However, unlike PROM, an EPROM can be erased and reprogrammed repeat-
edly. It can be erased by simply exposing the device to a strong source of ultraviolet light for a certain
M01_ITL-ESL4791_01_SE_C01.indd 22 12/22/2012 4:52:22 PM
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset