Computer - Memory
1.3 Computer Memory
A computer system needs
memory to store the data and instructions for processing. Whenever we talk
about the “memory” of a computer system, we usually talk about the main or
primary memory. The secondary memory (also called storage device) is used to
store data, instructions and results permanently and for future use.
1.3.1 Units of Memory
A computer system uses binary numbers to store
and process data. The binary digits 0 and 1, which are the basic units of
memory, are called bits. Further, these bits are grouped together to form
words. A 4-bit word is called a Nibble. Examples of nibble are 1001, 1010,
0010, etc. A two nibble word, i.e., 8-bit word is called a byte, for example,
01000110, 01111100, 10000001, etc.
Like any other standard
unit, bytes are grouped together to make bigger chunks or units of memory.
Table 1.1 shows different measurement units for digital data stored in computer
memories.
1.3.2
Types of Memory
Human beings memories
many things over a lifetime, and recall from memory to make a decision or take
some action. However, we cannot rely on our memory completely, so we make notes
and store important data and information using other mediums such as notebook,
manual, journal, document etc. for a long-term storage. Similarly, computers
have two types of memories namely —primary memory and secondary memory.
(A) Primary Memory
The primary memory is
an essential component of a computer system. Program and data are loaded into
the primary memory before processing. The CPU interacts directly with the
primary memory to perform read/ write operation. It is of two types viz. i)
Random access memory (RAM), and ii) Read only memory (ROM).
RAM is volatile i.e. as
long as the power is supplied to the computer, it retains the data in it. But as
soon as the power supply is turned off, all the contents of RAM are wiped out.
It is used to store data temporarily while the computer is working. Whenever
the computer is started or a software application is launched, the required
program and data are loaded into RAM for processing. RAM is usually referred to
as main memory and it is faster than the secondary memory or storage devices.
On the
other hand, ROM is non-volatile, means its contents are not lost even when the
power is turned off. It is used as a small but faster permanent storage for the
contents which are rarely changed. For example, the startup program (boot
loader) that loads the operating system into RAM is stored in a ROM.
(B) Cache Memory
RAM is faster than
secondary storage, but not as fast as a computer processor. So, because of RAM,
a CPU may have to slow down. To speed up the operations of the CPU, a very high-speed
memory is placed between the CPU and the primary memory known as cache. It
stores the copies of the data from frequently accessed primary memory
locations, thus, reducing the average time required to access data from primary
memory. When the CPU needs to access memory, it first examines the cache. In
case the requirement is met, it is read from the cache, otherwise the primary
memory is accessed.
(C) Secondary Memory
Primary memory has
limited storage capacity and is either volatile (RAM) or read-only (ROM). Thus,
a computer system needs auxiliary or secondary memory to permanently store the
data or instructions for future use. The secondary memory is non-volatile and
has larger storage capacity than primary memory. It is slower and cheaper than
the main memory. But, it cannot be accessed directly by the CPU. Contents of
secondary storage need to be first brought into the main memory for the CPU to
access. Examples of secondary memory devices include Hard Disk Drive (HDD), CD/
DVD, Memory Card, etc., as shown in Figure 1.7.
However, these days, there are secondary
storage devices like Solid-State Drive (SSD) which support very fast data
transfer speed as compared to earlier HDDs. Also, data transfer between
computers have become easier and simpler due to the availability of small sized
and portable flash/pen drives.
Comments
Post a Comment