Memory Unit:
A Memory Unit is a collection of storage cells together with associated circuits needed to
transfer information in and out of storage.
Word
The memory stores binary information(1's and 0's) 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.
Byte
A group of 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 4
bytes.
The capacity of memories in commercial computers is usually stated as the total number of bytes
that can be stored.
Internal Structure of a Memory Unit:
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, staring
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.
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) is equal to 210
● M(Mega) is equal to 220
● G(Giga) is equal to 230
Two major types of memories are used in computer systems:
1. Random Access Memory(RAM)
2. Read Only Memory(ROM).
1. Random Access Memory(RAM):
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.
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 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 particular word chosen among the 2k available inside
the memory. The two control inputs specify the direction of transfer desired.
RAM: Write and Read Operations
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.
2. Apply the data bits that must be stored in memory into the data input lines.
3. Activate the write input.
The memory unit will then take the bits presently available in the input data lines and store them
in the 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.
2. Read Only Memory(ROM)
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 required 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 below, a ROM has k address input lines to select one of 2k = m words of
memory, and n input 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.
ROM is constructed internally with decoders and a set of OR gates. There is no need for
providing storage capabilities as in RAM, since the values of the bits in the ROM are
permanently fixed.
Different Types of ROM
The required paths in a ROM may be programmed in three different ways.
1. The first, mask programming, is done by the semiconductor company during the last
fabrication process of the unit. This procedure is costly because the vendor charges the
customer a special fee for custom masking the particular ROM. For this reason, mask
programming is economical only if a large quantity of the same ROM configuration is to
be ordered.
2. For small quantities it is more economical to use a second type of ROM called
a Programmable Read Only Memory(PROM). The hardware procedure for
programming ROMs or PROMs is irreversible, and once programmed, the fixed pattern
is permanent and cannot be altered. Once a bit pattern has been established, the unit must
be discarded if the bit pattern is to be changed.
3. A third type of ROM available is called Erasable PROM or EPROM. The EPROM can
be restructured to the initial value even though its fuses have been blown previously.
Certain PROMs can be erased with electrical signals instead of ultraviolet light. These
PROMs are called Electrically Erasable PROM or EEPROM. Flash memory is a form
of EEPROM in which a block of bytes can be erased in a very short duration.
Example applications of EEPROM devices are:
● Storing current time and date in a machine.
● Storing port statuses.
Example of Flash memory device applications are:
● Storing messages in a mobile phone.
● Storing photographs in a digital camera.