0% found this document useful (0 votes)
9 views

Memory Unit 5

Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Memory Unit 5

Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 8

Memory Unit

 A memory unit is a collection of storage cells together with associated circuits needed to
transfer information in and out of storage.

 The memory stores binary information in groups of bits called words. A word in
memory is an entity of bits that move in and out of storage as a unit.

 A memory word is a group of 1's and 0's and may represent a number, an instruction
code, one or more alphanumeric characters, or any other binary-coded information.

 A group of byte eight bits is called a byte. Most computer memories use words whose
number of bits is a multiple of 8. Thus a 16-bit word contains two bytes, and a 32-bit
word is made up of four bytes. The capacity of memories in commercial computers is
usually stated as the total number of bytes that can be stored.

 The internal structure of a memory unit is specified by the number of words it contains
and the number of bits in each word. Special input lines called address lines select one
particular word.

 Each word in memory is assigned an identification number, called an address, starting


from 0 and continuing with 1, 2, 3, up to 2k - 1 where k is the number of address lines.
The selection of a specific word inside the memory is done by applying the k-bit binary
address to the address lines.

 A decoder inside the memory accepts this address and opens the paths needed to select
the bits of the specified word. Computer memories may range from 1024 words,
requiring an address of 10 bits, to 232 words, requiring 32 address bits.

 It is customary to refer to the number of words (or bytes) in a memory with one of the
letters K (kilo), M (mega), or G (giga). K is equal to 210, M is equal to 220, and G is equal
to 230. Thus 64K = 216, 2M= 221, and 4G = 232.

 Two major types of memories are used in computer systems: randomaccess memory
(RAM) and read-only memory (ROM).
Random-Access Memory

 In random-access memory (RAM) the memory cells can be accessed for information
transfer from any desired random location.

 That is, the process of locating a word in memory is the same and requires an equal
amount of time no matter where the cells are located physically in memory: thus the
name "random access."

 Communication between a memory and its environment is achieved through data input
and output lines, address selection lines, and control lines that specify the direction of
transfer.

 A block diagram of a RAM unit is shown in Fig. below. The n data input lines provide
the information to be stored in memory, and the n data output lines supply the
information coming out of memory.

 The k address lines provide a binary number of k bits that specify a particular word
chosen among the 2k available inside the memory. The two control inputs specify the
direction of transfer desired.

 The two operations that a random-access memory can perform are the write and read
operations.

 The write signal specifies a transfer-in operation and the read signal specifies a transfer-
out operation. On accepting one of these control signals, the internal circuits inside the
memory provide the desired function.

 The steps that must be taken for the purpose of transferring a new word to be stored
into memory are as follows:

1. Apply the binary address of the desired word into the address lines
1. Apply the data bits that must be stored in memory into the data input lines.

2. Activate the write input.

 The memory unit will then take the bits presently available in the input data lines and store
them in the word specified by the address lines. The steps that must be taken for the purpose of
transferring a stored word out of memory are as follows:

 1. Apply the binary address of the desired word into the address lines.
2. Activate the read input.

 The memory unit will then take the bits from the word that has been selected by the address
and apply them into the output data lines. The content of the selected word does not change after
reading.

Read-Only Memory
 As the name implies, a read-only memory (ROM) is a memory unit that performs the
read operation only; it does not have a write capability.

 This implies that the binary information stored in a ROM is made permanent during
the hardware production of the unit and cannot be altered by writing different words into
it.

 Whereas a RAM is a general-purpose device whose contents can be altered during the
computational process, a ROM is restricted to reading words that are permanently stored
within the unit.

 The binary information to be stored, specified by the designer, is then embedded in the
unit to form the reqttired interconnection pattern.

 ROMs come with special internal electronic fuses that can be "programmed" for a
specific configuration. Once the pattern is established, it stays within the unit even when
power is turned off and on again.

 An m x n ROM is an array of binary cells organized into m words of n bits each.

 As shown in the block diagram of Fig. above, a ROM has k address input lines to select
one of 2k = m words of memory, and n output lines, one for each bit of the word.
 An integrated circuit ROM may also have one or more enable inputs for expanding a
number of packages into a ROM with larger capacity.

 The ROM does not need a read-control line since at any given time, the output lines
automatically provide the n bits of the word selected by the address value.

 Because the outputs are a function of only the present inputs (the address lines), a
ROM is classified as a combinational circuit.

 In fact, a ROM is constructed internally with decoders and a set of OR gates.

 There is no need for providing storage capabilities as in a RAM, since the values of
the bits in the ROM are permanently fixed.

 ROMs find a wide range of applications in the design of digital systems. Basically, a
ROM generates an input--<>utput relation specified by a truth table.

 As such, it can implement any combinational circuit with k inputs and n outputs.
When employed in a computer system as a memory unit, the ROM is used for storing
fixed programs that are not to be altered and for tables of constants that are not subject to
change.

 ROM is also employed in the design of control units for digital computers. As such, they
are used to store coded information that represents the sequence of internal control
variables needed for enabling the various operations in the computer.

 A control unit that utilizes a ROM to store binary control information is called a
microprogrammed control unit.

Memory Hierarchy Design

1. Registers
Registers are small, high-speed memory units located in the CPU. They are used to store the
most frequently used data and instructions. Registers have the fastest access time and the
smallest storage capacity, typically ranging from 16 to 64 bits.

2. Cache Memory

Cache memory is a small, fast memory unit located close to the CPU. It stores frequently used
data and instructions that have been recently accessed from the main memory. Cache memory is
designed to minimize the time it takes to access data by providing the CPU with quick access to
frequently used data.

3. Main Memory

Main memory, also known as RAM (Random Access Memory), is the primary memory of a
computer system. It has a larger storage capacity than cache memory, but it is slower. Main
memory is used to store data and instructions that are currently in use by the CPU.

Types of Main Memory


 Static RAM: Static RAM stores the binary information in flip flops and information remains valid
until power is supplied. It has a faster access time and is used in implementing cache memory.
 Dynamic RAM: It stores the binary information as a charge on the capacitor. It requires
refreshing circuitry to maintain the charge on the capacitors after a few milliseconds. It contains
more memory cells per unit area as compared to SRAM.

4. Secondary Storage

Secondary storage, such as hard disk drives (HDD) and solid-state drives (SSD), is a non-volatile
memory unit that has a larger storage capacity than main memory. It is used to store data and
instructions that are not currently in use by the CPU. Secondary storage has the slowest access
time and is typically the least expensive type of memory in the memory hierarchy.

5. Magnetic Disk

Magnetic Disks are simply circular plates that are fabricated with either a metal or a plastic or a
magnetized material. The Magnetic disks work at a high speed inside the computer and these are
frequently used.

6. Magnetic Tape

Magnetic Tape is simply a magnetic recording device that is covered with a plastic film. It is
generally used for the backup of data. In the case of a magnetic tape, the access time for a
computer is a little slower and therefore, it requires some amount of time for accessing the strip.
Characteristics of Memory Hierarchy
 Capacity: It is the global volume of information the memory can store. As we move from top to
bottom in the Hierarchy, the capacity increases.
 Access Time: It is the time interval between the read/write request and the availability of the
data. As we move from top to bottom in the Hierarchy, the access time increases.

 Performance: Earlier when the computer system was designed without a Memory Hierarchy
design, the speed gap increased between the CPU registers and Main Memory due to a large
difference in access time. This results in lower performance of the system and thus,
enhancement was required. This enhancement was made in the form of Memory Hierarchy
Design because of which the performance of the system increases. One of the most significant
ways to increase system performance is minimizing how far down the memory hierarchy one
has to go to manipulate data.

 Cost Per Bit: As we move from bottom to top in the Hierarchy, the cost per bit increases i.e.
Internal Memory is costlier than External Memory.

Advantages of Memory Hierarchy


 It helps in removing some destruction, and managing the memory in a better way.
 It helps in spreading the data all over the computer system.

 It saves the consumer’s price and time.

You might also like