Memory Devices 

Before we can do our calculation, we need to store the data we have entered into the computer or it will be lost, so we need some device that can remember the data, hence we have to have a memory device. We should be able to perform two major operations on this device:

  1. store data (called a write operation) and
  2. Get (or fetch) a stored piece of data (called a read operation).

Nowadays, Computers have many types of memory devices:

Random-Access Memory (RAM)

Usually called the main memory
Used to store the information used by the computer
It can be read and written to
It does not store information permanently (when it is powered off, the stored information are gone); volatile memory
Information stored in it can be accessed in any order at equal time periods (hence the name random access)
Information is accessed by an address that specifies the exact location of the piece of information in the RAM.

ROM (Read-Only-Memory)

A read-only-memory, i.e. it stores information permanently; non-volatile
Again has random access of stored information
ROM is usually used to store the information required by the computer to start-up
Recent types of ROMs that are used in PCs (personal Computers) are also called FLASH or CMOS.

Cache

A very fast type of RAM that is used to store information that is most frequently or recently used by the computer
Recent computers have 2-levels of cache; the first level is faster but smaller in size (usually called internal cache), and the second level is slower but larger in size (external cache).

Registers

Fastest storage elements
Similar to Cache, are used to store temporary data or most frequently used data
Information is stored in named locations (not addressed locations)
Information is accessed by specifying the name of the register where they exist
There are two main types of registers in computer systems:
  1. General Purpose Registers that are accessible to the programmers of the computer
  2. Special Purpose Registers that are only used by the computer itself and can not be accessed by the programmer directly.
State-of-the-art computers contain large number of registers that are usually organized into one dimensional arrays called register files .

Fig. m010112.1 shows the relative performance/cost of the three types of memory.

Fig. m010112.1 Relative Performance/Cost of different memory devices