1 of 26

Digital System�Lecture - 08

2 of 26

Memory Unit

  • A memory unit is a device to which binary information is transferred for storage and from which information is retrieved when needed for processing.
  • A memory unit stores binary information in groups of bits called words.
  • The internal structure of memory unit is specified by the number of words it contains and the number of bits in each word.

2

3 of 26

Memory Unit

  • The memory unit is an essential component in any digital computer since it is needed for storing programs and data.
  • Not all accumulated information is needed by the CPU at the same time.
  • Therefore, it is more economical to use low-cost storage devices to serve as a backup for storing the information that is not currently used by CPU

3

4 of 26

Memory Unit Classification

  • Memory is primarily of two types

  • Internal Memory − cache memory and primary/main memory

  • External Memory − magnetic disk / optical disk etc.

4

5 of 26

Memory Unit Classification

5

6 of 26

Semiconductor Memory Types

6

7 of 26

RAM

  • A RAM constitutes the internal memory of the CPU for storing data, program and program result. It is read/write memory. It is called random access memory (RAM).
  • Since access time in RAM is independent of the address to the word that is, each storage location inside the memory is as easy to reach as other location & takes the same amount of time. We can reach into the memory at random & extremely fast but can also be quite expensive.
  • RAM is volatile, i.e. data stored in it is lost when we switch off the computer or if there is a power failure. Hence, a backup uninterruptible power system (UPS) is often used with computers. RAM is small, both in terms of its physical size and in the amount of data it can hold.

7

8 of 26

RAM

  • The block diagram of RAM chip is given below.

8

9 of 26

Static RAM (SRAM)

  • The SRAM memories consist of circuits capable of retaining the stored information as long as the power is applied. That means this type of memory requires constant power. SRAM memories are used to build Cache Memory.
  • Because of the extra space in the matrix, SRAM uses more chips than DRAM for the same amount of storage space, thus making the manufacturing costs higher.
  • Static RAM is used as cache memory needs to be very fast and small.

9

10 of 26

SRAM Memory Cell

  • Static memories(SRAM) are memories that consist of circuits capable of retaining their state as long as power is on. Thus this type of memory is called volatile memory. The below figure shows a cell diagram of SRAM. A latch is formed by two inverters connected as shown in the figure. Two transistors T1 and T2 are used for connecting the latch with two-bit lines. The purpose of these transistors is to act as switches that can be opened or closed under the control of the word line, which is controlled by the address decoder. When the word line is at 0-level, the transistors are turned off and the latch remains its information.

10

11 of 26

SRAM Memory Cell

  • For Read operation, the word line is activated by the address input to the address decoder. The activated word line closes both the transistors (switches) T1 and T2. Then the bit values at points A and B can transmit to their respective bit lines. The sense/write circuit at the end of the bit lines sends the output to the processor.
  • For Write operation, the address provided to the decoder activates the word line to close both the switches. Then the bit value that is to be written into the cell is provided through the sense/write circuit and the signals in bit lines are then stored in the cell.

11

12 of 26

Dynamic RAM (DRAM)

  • DRAM, unlike SRAM, must be continually refreshed in order for it 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. All DRAMs are made up of memory cells. These cells are composed of one capacitor and one transistor.

12

13 of 26

Difference between SRAM and DRAM

13

14 of 26

ROM

  • ROM stands for Read Only Memory. The memory from which we can only read but cannot write on it. This type of memory is non-volatile. The information is stored permanently in such memories during manufacture.
  • A ROM, stores such instruction as are required to start computer when electricity is first turned on, this operation is referred to as bootstrap. ROM chip are not only used in the computer but also in other electronic items like washing machine and microwave oven.

14

15 of 26

MROM (Masked ROM)

  • The very first ROMs were hard-wired devices that contained a pre-programmed set of data or instructions. These kind of ROMs are known as masked ROMs. It is inexpensive ROM.

15

16 of 26

PROM (Programmable Read Only Memory)

  • PROM is read-only memory that can be modified only once by a user. The user buys a blank PROM and enters the desired contents using a PROM programmer. Inside the PROM chip there are small fuses which are burnt open during programming. It can be programmed only once and is not erasable.

16

17 of 26

EPROM (Erasable and Programmable Read Only Memory)

  • The EPROM can be erased by exposing it to ultra-violet light for a duration of upto 40 minutes. Usually, an EPROM eraser achieves this function. During programming an electrical charge is trapped in an insulated gate region. The charge is retained for more than ten years because the charge has no leakage path. For erasing this charge, ultra-violet light is passed through a quartz crystal window (lid). This exposure to ultra-violet light dissipates the charge. During normal use the quartz lid is sealed with a sticker.

17

18 of 26

EEPROM (Electrically Erasable and Programmable Read Only Memory)

  • The EEPROM is programmed and erased electrically. It can be erased and reprogrammed about ten thousand times. Both erasing and programming take about 4 to 10 ms (millisecond). In EEPROM, any location can be selectively erased and programmed. EEPROMs can be erased one byte at a time, rather than erasing the entire chip. Hence, the process of re-programming is flexible but slow.

18

19 of 26

Difference between ROM and RAM

19

20 of 26

Serial Access Memory

  • Sequential access means the system must search the storage device from the beginning of the memory address until it finds the required piece of data. Memory device which supports such access is called a Sequential Access Memory or Serial Access Memory. Magnetic tape is an example of serial access memory.

20

21 of 26

Direct Access Memory

  • Direct access memory or Random Access Memory, refers to conditions in which a system can go directly to the information that the user wants. Memory device which supports such access is called a Direct Access Memory. Magnetic disks, optical disks are examples of direct access memory.

21

22 of 26

Cache Memory

  • Cache memory is a very high speed semiconductor memory which can speed up CPU. It acts as a buffer between the CPU and main memory. It is used to hold those parts of data and program which are most frequently used by CPU. The parts of data and programs, are transferred from disk to cache memory by operating system, from where CPU can access them.

22

23 of 26

Cache Memory

  • Advantages
    • 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 of time.
    • It stores data for temporary use.
  • Disadvantages
    • Cache memory has limited capacity.
    • It is very expensive.

23

24 of 26

Auxiliary Memory

  • Auxiliary memory is much larger in size than main memory but is slower.
  • It normally stores system programs, instruction and data files. It is also known as secondary memory.
  • It can also be used as an overflow/virtual memory in case the main memory capacity has been exceeded.
  • Secondary memories cannot be accessed directly by a processor.
  • First the data/information of auxiliary memory is transferred to the main memory and then that information can be accessed by the CPU.

24

25 of 26

Characteristics of Auxiliary Memory

  • Non-volatile memory − Data is not lost when power is cut off.
  • Reusable − The data stays in the secondary storage on permanent basis until it is not overwritten or deleted by the user.
  • Reliable − Data in secondary storage is safe because of high physical stability of secondary storage device.
  • Convenience − With the help of a computer software, authorised people can locate and access the data quickly.
  • Capacity − Secondary storage can store large volumes of data in sets of multiple disks.
  • Cost − It is much lesser expensive to store data on a tape or disk than primary memory.

25

26 of 26

Thanks!

Any questions?

You can find me at:

  • minhazularefin21@gmail.com

26