Compute Memory
Compute Memory
The computer’s memory stores data and instructions required during the
processing of data, and output results. Storage may be required for a limited
period of time, instantly, or, for an extended period of time. Different types
of memories, each having its own unique features, are available for use in a
computer. The cache memory, registers, and RAM are fast memories and
store the data and instructions temporarily during the processing of data and
instructions. The Secondary Memory such as magnetic disks and optical
disks has large storage capacities and store the data and instructions
permanently, but are slow memory devices. The memories are organized in
the computer in a manner to achieve high levels of performance at the
minimum cost. In this lecture, we discuss different types of memories, their
characteristics and their use in the computer.
MEMORY REPRESENTATION
The computer memory stores different kinds of data like input data, output
data, intermediate results, etc., and the instructions. Binary digit or bit is the
basic unit of memory. A bit is a single binary digit, i.e., 0 or 1. A bit is the
smallest unit of representation of data in a computer. However, the data is
handled by the computer as a combination of bits. A group of 8 bits form a
byte. One byte is the smallest unit of data that is handled by the computer.
One byte (8 bit) can store 28 = 256 different combinations of bits, and thus
can be used to represent 256 different symbols. In a byte, the different
combinations of bits fall in the range 00000000 to 11111111. A group of
bytes can be further combined to form a word. A word can be a group of 2, 4
or 8 bytes.
1 bit = 0 or 1
1 Byte (B) = 8 bits
1 Kilobyte (KB) = 210 = 1024 bytes
1 Megabyte (MB) = 220 = 1024KB
1 Gigabyte (GB) = 230 = 1024 MB = 1024 *1024 KB
1 Terabyte (TB) = 240 = 1024 GB = 1024 * 1024 *1024 KB
CHARACTERISTICS OF MEMORIES
Volatility
Volatile {RAM}
Non-volatile {ROM, Flash memory}
Mutability
Read/Write {RAM, HDD, SSD, RAM, Cache, Registers…}
Read Only {Optical ROM (CD/DVD…), Semiconductor ROM}
Accessibility
Random Access {RAM, Cache}
Direct Access {HDD, Optical Disks}
Sequential Access {Magnetic Tapes
MEMORY HIERARCHY
The Internal Memory and External Memory are the two broad categories
of memory used in the computer. The Internal Memory consists of the CPU
registers, cache memory and primary memory. The internal memory is used
by the CPU to perform the computing tasks. The External Memory is also
called the secondary memory. The secondary memory is used to store the
large amount of data and the software.
INTERNAL MEMORY
The key features of internal memory are:
1. Limited storage capacity.
2. Temporary storage.
3. Fast access.
4. High cost.
SECONDARY MEMORY
The key features of secondary memory storage devices are:
1. Very high storage capacity.
2. Permanent storage (non-volatile), unless erased by user.
3. Relatively slower access.
4. Stores data and instructions that are not currently being used by CPU but
may be required later for processing.
5. Cheapest among all memory.
To get the fastest speed of memory with largest capacity and least cost, the
fast memory is located close to the processor. The secondary memory, which
is not as fast, is used to store information permanently, and is placed
farthest from the processor.
The speed of memories is dependent on the kind of technology used for the
memory. The registers, cache memory and primary memory are
semiconductor memories. They do not have any moving parts and are
fast memories. The secondary memory is magnetic or optical memory
has moving parts and has slow speed.
Computer Memory Hierarchy Diagram
CPU REGISTERS
Registers are very high-speed storage areas located inside the CPU. After
CPU gets the data and instructions from the cache or RAM, the data and
instructions are moved to the registers for processing. Registers are
manipulated directly by the control unit of CPU during instruction execution.
That is why registers are often referred to as the CPU’s working memory.
Since CPU uses registers for the processing of data, the number of registers
in a CPU and the size of each register affect the power and speed of a CPU.
The more the number of registers (ten to hundreds) and bigger the size of
each register (8 bits to 64 bits), the better it is.
Computer Registers
Data Register(DR) : hold the operand(Data) read from memory
Accumulator Register(AC) : general purpose processing register
Instruction Register(IR) : hold the instruction read from memory
Temporary Register(TR) : hold a temporary data during processing
Address Register(AR) : hold a memory address, 12 bit width
Program Counter(PC) :
o hold the address of the next instruction to be read from memory after
the current instruction is executed
o Instruction words are read and executed in sequence unless a branch
instruction is encountered
o A branch instruction calls for a transfer to a nonconsecutive instruction
in the program
o The address part of a branch instruction is transferred to PC to become
the address of the next instruction
Input Register(INPR) : receive an 8-bit character from an input device
Output Register(OUTR) : hold an 8-bit character for an output device
Cache memory is placed in between the CPU and the RAM. Cache memory is
a fast memory, faster than the RAM. When the CPU needs an instruction or
data during processing, it first looks in the cache. If the information is
present in the cache, it is called a cache hit, and the data or instruction is
retrieved from the cache. If the information is not present in cache, then it is
called a cache miss and the information is then retrieved from RAM.
Advantages
The advantages of cache memory are as follows:
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
The disadvantages of cache memory are as follows:
Cache memory has limited capacity.
It is very expensive.
COMPUTER CORE MEMORY
In CRT television sets and computer monitors, the entire front area of the
tube is scanned repeatedly and systematically in a fixed pattern called a
raster. In color devices, an image is produced by controlling the intensity of
each of three electron beams, one for each additive primary color (red,
green, and blue) with a video signal as a reference. In modern CRT monitors
and televisions the beams are bent by magnetic deflection, using a
deflection yoke. Electrostatic deflection is commonly used in oscilloscopes.
The rear of a 14-inch color cathode-ray tube showing its deflection coils and
electron guns
Typical 1950s United States monochrome television set
Snapshot of a CRT television showing the line of light being drawn from left
to right in a raster pattern
A CRT is a glass envelope which is deep (i.e., long from front screen face to
rear end), heavy, and fragile. The interior is evacuated to 0.01 pascals
(1×10−7 atm) to 0.1 micropascals (1×10−12 atm) or less, to facilitate the free
flight of electrons from the gun(s) to the tube's face without scattering due
to collisions with air molecules. As such, handling a CRT carries the risk of
violent implosion that can hurl glass at great velocity. The face is typically
made of thick lead glass or special barium-strontium glass to be shatter-
resistant and to block most X-ray emissions. CRTs make up most of the
weight of CRT TVs and computer monitors.
Since the mid-late 2000's, CRTs have been superseded by flat-panel display
technologies such as LCD, plasma display, and OLED displays which are
cheaper to manufacture and run, as well as significantly lighter and less
bulky. Flat-panel displays can also be made in very large sizes whereas 40 in
(100 cm) to 45 in (110 cm) was about the largest size of a CRT.