Lecture 4
Lecture 4
There are two kinds of computer memory: primary and secondary. Primary memory is accessible directly by
the processing unit. RAM is an example of primary memory. As soon as the computer is switched off the contents
of the primary memory is lost. You can store and retrieve data much faster with primary memory compared to
secondary memory. Secondary memory such as floppy disks, magnetic disk, etc., is located outside the computer.
Primary memory is more expensive than secondary memory. Because of this the size of primary memory is less than
that of secondary memory. We will discuss about secondary memory later on.
Computer memory is used to store two things: i) instructions to execute a program and ii) data. When the
computer is doing any job, the data that have to be processed are stored in the primary memory. This data may
come from an input device like keyboard or from a secondary storage device like a floppy disk.
As program or the set of instructions is kept in primary memory, the computer is able to follow instantly
the set of instructions. For example, when you book ticket from railway reservation counter, the computer has to
follow the same steps: take the request, check the availability of seats, calculate fare, wait for money to be paid,
store the reservation and get the ticket printed out. The Programme containing these steps is kept in memory of
the computer and is followed for each request.
But inside the computer, the steps followed are quite different from what we see on the monitor or screen.
In computer’s memory both programs and data are stored in the binary form. You have already been introduced
with decimal number system that is the numbers 1 to 9 and 0. The binary system has only two values 0 and 1. These
are called bits. As human beings we all understand decimal system but the computer can only understand binary
system. It is because a large number of integrated circuits inside the computer can be considered as switches,
which can be made ON, or OFF. If a switch is ON it is considered 1 and if it is OFF it is 0. A number of switches in
different states will give you a message like this: 110101....10. So the computer takes input in the form of 0 and 1
and gives output in the form 0 and 1 only. Is it not absurd if the computer gives outputs as 0’s & 1’s only? But you
do not have to worry about. Every number in binary system can be converted to decimal system and vice versa; for
example, 1010 meaning decimal 10. Therefore it is the computer that takes information or data in decimal form
from you, convert it in to binary form, process it producing output in binary form and again convert the output to
decimal form.
The primary memory as you know in the computer is in the form of IC’s (Integrated Circuits). These
circuits are called Random Access Memory (RAM). Each of RAM’s locations stores one byte of information. (One
byte is equal to 8 bits). A bit is an acronym for binary digit, which stands for one binary piece of information. This
can be either 0 or 1. You will know more about RAM later. The Primary or internal storage section is made up of
several small storage locations (ICs) called cells. Each of these cells can store a fixed number of bits called word
length.
Each cell has a unique number assigned to it called the address of the cell and it is used to identify the
cells. The address starts at 0 and goes up to (N-1). You should know that the memory is like a large cabinet
containing as many drawers as there are addresses on memory. Each drawer contains a word and the address is
written on outside of the drawer.
Capacity of Primary Memory
You know that each cell of memory contains one character or 1 byte of data. So the capacity is defined in terms of
byte or words. Thus 64 kilobyte (KB) memory is capable of storing 64 _ 1024 = 32,768 bytes. (1 kilobyte is 1024
bytes). A memory size ranges from few kilobytes in small systems to several thousand kilobytes in large mainframe
and super computer. In your personal computer you will find memory capacity in the range of 64 KB, 4 MB, 8 MB
and even 16 MB (MB = Million bytes).
The following terms related to memory of a computer are discussed below:
1. Random Access Memory (RAM): The primary storage is referred to as random access memory (RAM)
because it is possible to randomly select and use any location of the memory directly store and retrieve
data. It takes same time to any address of the memory as the first address. It is also called
read/write memory. The storage of data and instructions inside the primary storage is temporary. It
disappears from RAM as soon as the power to the computer is switched off. The memories, which loose
their content on failure of power supply, are known as volatile memories .So now we can say that RAM
is volatile memory. Random Access Memory (RAM) is the main 'working' memory used by the computer.
When the operating system loads from disk when you first switch on the computer, it is copied into
RAM. The original IBM PC could only use up to 640 KB of memory (just over half a megabyte), whereas
a modern computer can effectively house as much RAM as you can afford to buy. Commonly modern
computers are supplied with over 128 MB of RAM. As a rough rule, a Microsoft Windows based
computer will operate faster if you install more RAM. When adverts refer to a computer having 128
Mbytes of memory, it is this RAM which they are talking about.
2. Read Only Memory (ROM): There is another memory in computer, which is called Read Only Memory
(ROM). Again it is the ICs inside the PC that form the ROM. The storage of program and data in the
ROM is permanent. The ROM stores some standard processing programs supplied by the manufacturers
to operate the personal computer. The ROM can only be read by the CPU but it cannot be changed. The
basic input/output program is stored in the ROM that examines and initializes various equipment
attached to the PC when the switch is made ON. The memories, which do not loose their content on
failure of power supply, are known as non-volatile memories. ROM is non-volatile memory.
2. PROM There is another type of primary memory in computer, which is called Programmable Read Only
Memory (PROM). You know that it is not possible to modify or erase programs stored in ROM, but it is
possible for you to store your program in PROM chip. Once the programs are written it cannot be
changed and remain intact even if power is switched off. Therefore programs or instructions written in
PROM or ROM cannot be erased or changed.
3. EPROM: This stands for Erasable Programmable Read Only Memory, which over come the problem of
PROM & ROM. EPROM chip can be programmed time and again by erasing the information stored earlier
in it. Information stored in EPROM exposing the chip for some time ultraviolet light and it erases chip
is reprogrammed using a special programming facility. When the EPROM is in use information can only
be read.
4. Cache Memory: The speed of CPU is extremely high compared to the access time of main memory.
Therefore the performance of CPU decreases due to the slow speed of main memory. To decrease the
mismatch in operating speed, a small memory chip is attached between CPU and Main memory whose
access time is very close to the processing speed of CPU. It is called CACHE memory. CACHE memories
are accessed much faster than conventional RAM. It is used to store programs or data currently being
executed or temporary data frequently used by the CPU. So each memory makes main memory to be
faster and larger than it really is. It is also very expensive to have bigger size of cache memory and its
size is normally kept small.
5. Registers: The CPU processes data and instructions with high speed; there is also movement of data
between various units of computer. It is necessary to transfer the processed data with high speed. So
the computer uses a number of special memory units called registers. They are not part of the main
memory but they store data or information temporarily and pass it on as directed by the control unit.
6. What is the ROM-BIOS?
The 'Read Only Memory Basic Input Output System' chip is a chip located on the computer's system
(mother) board, which contains software. This software performs a variety of tasks. When you first
switch on the computer the ROM-BIOS software performs a self-diagnostic to check that the
computer is working OK. This software then loads your operating system from the disk into the RAM.
7. What is flash BIOS?
Most modern computers are actually supplied with a flash BIOS rather than a ROM-BIOS. This chip
contains exactly the same type of in-built software, but has the advantage that the software on the
chip can be upgraded. This upgrade is achieved by simply running a small program supplied by the
computer manufacturer.
· Basic Units of Data Storage : It is important to realize that the term digital computer refers to the fact that
ultimately the computer works in what is called binary.
Humans work in tens (because we have 10 fingers).
To use the jargon humans work in base 10.
A digital computer uses the numbers 0 and 1 (or on and off if you prefer). When we talk about computer storage,
either the amount of memory (RAM) or the hard disk capacity we are talking about numbers which are multiples of
0 or 1.
· Bit: All computers work on a binary numbering system, i.e. they process data in ones or zeros. This 1 or 0 level of
storage is called a bit. Often hardware is specified as a 32-bit Computer, which means that the hardware can
process 32 bits at a time. Software is also described as 16 bit, 32 bit or 64 bit software.
· Byte: A byte consists of eight bits.
· Kilobyte: A kilobyte (KB) consists of 1024 bytes.
· Megabyte: A megabyte (MB) consists of 1024 kilobytes, approximately 1,000,000 bytes.
· Gigabyte: A gigabyte (GB) consists of 1024 megabytes, approximately 1,000,000,000 bytes.
· Terabyte: A terabyte (TB) consists of approximately 1,000,000,000,000 bytes.