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

Lect 10

The document discusses the major components of the central processing unit (CPU) including registers, arithmetic logic unit (ALU), control unit, and memory. It describes how registers are connected through a common bus system and how the control unit directs information flow through the CPU components to perform operations.

Uploaded by

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

Lect 10

The document discusses the major components of the central processing unit (CPU) including registers, arithmetic logic unit (ALU), control unit, and memory. It describes how registers are connected through a common bus system and how the control unit directs information flow through the CPU components to perform operations.

Uploaded by

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

Introduction: Central Processing Unit

• The part of the computer that


performs the bulk of data processing
operations is called the central Register
processing unit and is referred to as set
CPU.

• The registers set stores intermediate Control


data used during the execution of the
instructions

• The ALU performs the required micro


operations for executing the ALU
instructions.

• The Control unit supervises the


transfer of information among the
registers and instructs the ALU as to Major Components of CPU
which operation to perform.
GENERAL REGISTER ORGANIZATION
• Memory locations are needed for storing • What is BUS
pointers, Return addresses etc.
• Dig tal computers has many registers and path
must be provided to transfer information from
• Referring to memory locations for such one register to another.
applications is time consuming because memory
access is most time consuming operation in
computer. • No. of wires will be excessive if separate lines
are used between each register. Most efficient
way is to have Common bus system.
• So, it is more convenient and efficient to store
these intermediate values in processor registers
• Bus structure consists of a set of common lines,
one for each bit of registers, thru which binary
• When large number of registers are included in information is transferred one at a time.
the CPU it is efficient to connect them through
common bus system.
• Ctrl signals determine which register is selected
by the bus during each particular register
• Because registers communicate with each other transfer
not only for direct data transfers, but also while
performing various microoperations
Input
Clock

R1
R2
R3
R4
R5
R6
R7
Load
(7 lines)
SELA { MUX MUX } SELB

3x8
A bus B bus
decoder

SELD
OPR ALU

Page 243
Output
Morris mano
• General Register Organization:—
• When a large number of registers are included in the
CPU, it is most efficient to connect them through a
common bus system. The registers communicate
with each other not only for direct data transfers, but
also while performing various micro-operations.
Hence it is necessary to provide a common unit that
can perform all the arithmetic, logic and shift micro-
operation in the processor.
• A Bus organization for seven CPU registers:—
• Reference Diagram: Page Number 243 by M Morris Mano

• The output of each register is connected to true multiplexer (mux) to form the two buses A &
B. The selection lines in each multiplexer select one register or the input data for the
particular bus. The A and B buses forms the input to a common ALU. The operation selected
in the ALU determines the arithmetic or logic micro-operation that is to be performed. The
result of the micro-operation is available for output and also goes into the inputs of the
registers. The register that receives the information from the output bus is selected by a
decoder. The decoder activates one of the register load inputs, thus providing a transfer both
between the data in the output bus and the inputs of the selected destination register.

• The control unit that operates the CPU bus system directs the information flow through the
registers and ALU by selecting the various components in the systems.
• R1  R2 + R3
• (1) MUX A selection (SEC A): to place the content of R2 into bus A
• (2) MUX B selection (sec B): to place the content of R3 into bus B
• (3) ALU operation selection (OPR): to provide the arithmetic addition (A + B)
• (4) Decoder destination selection (SEC D): to transfer the content of the output bus into
R1
• These form the control selection variables are generated in the control unit and must be
available at the beginning of a clock cycle.
ALU

• Arithmetic:
• Addition, Subtraction, Multiplication, Division
• Logic:
• Comparisons
Control Unit

• Reads & Interprets Program Instructions


• Directs the Operation of the Processor
• Controls the flow of programs and data into
and out of memory
• CU consists of two decoders, a counter and a number of ctrl
logic gates.

• An instruction read from memory is placed in instruction


register (IR) where it is divided into three parts:
• I bit
• Opcode
• 0-11 bits ----

• Operation code in bits 12 thru 14 are decoded with a 3*8


decoder
Central Processing Unit
• Machine Cycle • Fetch
• Fetch • Calls an instruction into memory
• Decode
• Execute • Decode
• Store • Figures out what the instruction
is trying to do

• Execute
• Does the decoded instruction
• Add 2+2

• Store
• Puts the answer 4 into memory
for use by another instruction
Memory
• Memory unit is needed for • Most common auxiliary memory
storing programs and data. is magnetic disks and magnetic
tapes. They are used for storing
• Memory units that communicate programs, large data files, and
directly with CPU is called MAIN other backup information.
MEMORY
• Only programs and data that are
• Devices that provide backup currently needed by the
storage is called auxiliary processor will reside in main
memory memory

• All other information is stored in


auxiliary memory and transferred
to main memory when needed
• Auxiliary • Main memory Cache memory
memory
• Slow • Small but relatively Smaller and faster
• High Capacity faster than
auxiliary memory
Memory hierarchy in computer system
Main memory
AUXILIARY MEMORY occupies the central
position by being
Slow magnetic Main able to
tapes communicate
used to store
Magnetic Memory directly with the
removable files disk I/O Processor CPU and with
auxiliary memory
through /]/o
processor
Used as backup
storage

When programs are not residing


in the main memory and needed
by the cpu they are brought in
from auxiliary memory.
CPU Cache
Programs not currently needed in Memory
main memory are transferred to
auxiliary memory to provide
space for currently used
programs and data.
CACHE MEMORY
• a special very high speed memory called is sometimes used to increase the speed of the
processing by making current programs and data available to the CPU at the rapid rate.

• The cache memory is employed in computer systems to compensate the speed differential
between main memory access time and logic.

• CPU logic is usually faster than main memory access time, with the result that processing
speed is limited primarily by the speed of the main memory.

• A Technique used to compensate for the mismatch in operating speeds is to employ an


extremely fast, small cache between the CPU and main memory whose access time is close
to processor logic clock cycle time.

• The cache is used for storing segments of programs currently being executed in the CPU and
temporary data frequently needed in the present calculations

• By doing this the performance rate of the computer also increases


Main Memory / Primary Memory units

• RAM (Random Access Memory)


• ROM (Read-only Memory)

• – They work in different ways and perform distinct functions


• – CPU Registers
• – Cache Memory

• • Also termed as ‘auxiliary’ or ‘backup’ storage, it is typically used as a


• supplement to main storage. It is much cheaper than the main storage and
• stores large amount of data and instructions permanently. Hardware devices
• like magnetic tapes and disks fall under this category.
Secondary Memory/Auxiliary Memory

• Also termed as ‘auxiliary’ or ‘backup’ storage,


it is typically used as a supplement to main
storage.
• It is much cheaper than the main storage and
stores large amount of data and instructions
permanently.
• Hardware devices like magnetic tapes and
disks fall under this category
Random Access Memory
• RAM or Random Access Memory is the central • Types of RAM
storage unit in a computer system.
1. STATIC RAM
2. DYNAMIC RAM
• It is the place in a computer where the
operating system, application programs and the
data in current use are kept temporarily so that • STATIC RAM: CONSISTS OF INTERNAL FLIP FLOPS
they can be accessed by the computer’s THAT STORES THE BINARY INFORMATION . The
processor. stored information remains valid as long as the
power is applied to the unit.
• The more RAM a computer has, the more data a
computer can manipulate.
• DYNAMIC RAM: stores the binary information in
• Random access memory, also called the the form of electric charges that are applied to
Read/Write memory, is the temporary memory the capacitors. (capacitors are attached to
of a computer. transistors) The capacitors are provided by the
inside the chip by the MOS (metal oxide
transistor) transistors. The stored charge on the
• It is said to be ‘volatile’ since its contents are capacitors tend to discharge with time and the
accessible only as long as the computer is on. capacitors must be periodically recharged by
refreshing the dynamic memory.
• The contents of RAM are cleared once the
computer is turned off. • Static memory is easy to use.
ROM
• ROM or Read Only Memory is a • Read-only memories can be
special type of memory which can manufacturer-programmed or user-
only be read and contents of programmed.
which are not lost even when the
computer is switched off. • PROM
• While manufacturer-programmed
• It typically contains ROMs have data burnt into the
manufacturer’s instructions. circuitry, user programmed ROMs can
have the user load and then store
read-only programs.
• Among other things, ROM also
stores an initial program called the
‘bootstrap loader’ whose function
is to start the computer software • EPROM
operating, once the power is • Information once stored on the ROM
turned on. or PROM chip cannot be altered.
However, another type of memory
called EPROM (Erasable PROM) allows
• Contents of ROM remains a user to erase the information stored
unchanged after the power is on the chip and reprogram it with new
turned off and on again. information.
ROM Types

• PROM
• EPROM
• EEPROM

• Each type has unique characteristics, but they are all types
of memory with two things in common:
• Data stored in these chips is nonvolatile -- it is not lost when
power is removed.
• Data stored in these chips is either unchangeable or requires
a special operation to change (unlike RAM, which can be
changed as easily as it is read).
• ROM chips are fundamentally different from
RAM chips. While RAM uses transistors to turn
on or off access to a capacitor at each
intersection, ROM uses a diode
AUXILIARY MEMORY

• RAM is volatile memory • The memory is specifically


having a limited storage meaning the RAM. This
capacity. keeps the information for a
Secondary/auxiliary storage shorter period of time
is storage other than the (usually volatile), is faster
RAM. and more expensive.

• These include devices that • By Storage we mean the


are peripheral and are Hard disk. Here the
connected and controlled information is retained
by the computer to enable longer (nonvolatile), It’s
permanent storage of Slower and Cheaper
programs and data.
Auxiliary Storage Devices-Magnetic Tape, Floppy Disk, Hard Disk.

• The Magnetic Storage Exploits duality of magnetism and


electricity. It converts electrical signals into magnetic charges,
captures magnetic charge on a storagemedium and then later
regenerates electrical current from stored magnetic
charge.Polarity of magnetic charge represents bit values zero
and one.

• Magnetic Disk
• The Magnetic Disk is Flat, circular platter with metallic coating
that is rotated beneath read/write heads. It is a Random
access device; read/write head can be moved to any location
on the platter.
Floppy Disk

• These are small removable disks


that are plastic coated with
magnetic recording material.
Floppy disks are typically 3.5″ in
size (diameter) and can hold 1.44
MB of data. This portable storage
device is a rewritable media and
can be reused a number of times.

• Floppy disks are commonly used


to move files between different
computers. The main
disadvantage of floppy disks is
that they can be damaged easily
and, therefore, are not very
reliable.
HARD DISK

• Another form of auxiliary storage is a


hard disk. A hard disk consists of one
or more rigid metal plates coated
with a metal oxide material that
allows data to be magnetically
recorded on the surface of the
platters.

• The hard disk platters spin at a high


rate of speed, typically 5400 to 7200
revolutions per minute (RPM).

• Storage capacities of hard disks for


personal computers range from 10
GB to 120 GB (one billion bytes are
called a gigabyte).
Optical Drives

• CD's (Compact Disk)


• Their storage:
• ~ 700 MB storage
• Their Types:
• – CD-ROM (read only)
• – CD-R: (record) to a CD
• – CD-RW: can write and erase CD to reuse it (re-
writable)
• – DVD(Digital Video Disk)
Assignment
• Explain CPU and its architecture.
• Explain memory hierarchy.

You might also like