SlideShare a Scribd company logo
1 of 36
Download to read offline
Central Processor Organization
Prof. K ADISESHA (Ph. D)
Computer Architecture
Introduction
to
CPU Organization
Introduction
Register Organization
Program Control
Instruction Formats
Addressing Modes
2
CPU Organization
Prof. K. Adisesha (Ph. D)
Data Transfer and
Manipulation
Introduction
Prof. K. Adisesha (Ph. D) 3
MAJOR COMPONENTS OF CPU:
The CPU of a computer is made up of following Components:
➢ Storage Components
❖ Registers
❖ Flags
➢ Execution (Processing) Components
❖ Arithmetic Logic Unit(ALU)
❖ Arithmetic calculations, Logical computations, Shifts/Rotates
➢ Transfer Components
❖ Bus
➢ Control Components
❖ Control Unit
Register
File ALU
Control Unit
REGISTERS
Prof. K. Adisesha (Ph. D) 4
REGISTERS:
It is necessary and efficient to store data and address in processor registers, which can
be accessed easily by processor.
➢ In Basic Computer, there is only one general purpose register, the Accumulator (AC)
➢ In modern CPUs, there are many general purpose registers
➢ It is advantageous to have many registers
❖ Transfer between registers within the processor are relatively fast
❖ Going “off the processor” to access memory is much slower
BUS Organization
Prof. K. Adisesha (Ph. D) 5
BUS System Organization:
A bus structure consists of a set of common lines, one for each bit of a register, through
with information is transferred one at a time .
➢ A digital computer has many registers,
the bus provides to transfer information
from one register to another
➢ Bus organization for seven CPU register
is shown:
SELA SELB SELD OPR
3 3 3 5
Control Word
➢ There are 14 binary selection input and
their combination value specified a control
word
Operation of Control Unit
Prof. K. Adisesha (Ph. D) 6
The control unit :
Directs the information flow through ALU by
- Selecting various Components in the system
- Selecting the Function of ALU
➢ Example: R1 R2 + R3 Binary
Code SELA SELB SELD
000 Input Input None
001 R1 R1 R1
010 R2 R2 R2
011 R3 R3 R3
100 R4 R4 R4
101 R5 R5 R5
110 R6 R6 R6
111 R7 R7 R7
Encoding of register selection fields
Control Word SELA SELB SELD OPR
3 3 3 5
Encoding of register selection fields
Arithmetic Logic Unit
Prof. K. Adisesha (Ph. D) 7
The Arithmetic Logic unit (ALU) :
The ALU provides arithmetic and logic operations.
➢ The microoperations encountered in digital computers are classified into four
categories:
❖ Register transfer microoperations: transfer binary information between registers
❖ Arithmetic microoperations: performs arithmetic operations on numeric data
stored in registers.
❖ Logic microoperations: perform bit manipulation operations on non-numeric data
stored in registers.
❖ Shift microoperations: perform shift operations on data stored in registers.
Arithmetic Logic Unit
Prof. K. Adisesha (Ph. D) 8
The Arithmetic Logic unit (ALU) :
ALU CONTROL.
➢ Encoding of ALU operations:
OPR
Select Operation Symbol
00000 Transfer A TSFA
00001 Increment A INCA
00010 ADD A + B ADD
00101 Subtract A - B SUB
00110 Decrement A DECA
01000 AND A and B AND
01010 OR A and B OR
01100 XOR A and B XOR
01110 Complement A COMA
10000 Shift right A SHRA
11000 Shift left A SHLA
Arithmetic Logic Unit
Prof. K. Adisesha (Ph. D) 9
The Arithmetic Logic unit (ALU) :
ALU CONTROL.
➢ Examples of ALU Microoperations:
CPU Organization
Prof. K. Adisesha (Ph. D) 10
Types of CPU Organization
Most computers fall into any one types of organization or some computers combine the
features from more than one organization structure.
➢ The CPU organization in digital computers are classified into three categories:
❖ Single Accumulator Organization: All operations are performed with an implied
accumulator register.
❖ General Register Organization: General register type computers employ two or three
address fields in their instruction format.
❖ Stack Organization: Computers with stack organization have push and POP instructions
which requires an address filed..
CPU Organization
Prof. K. Adisesha (Ph. D) 11
In general, most processors are organized in one of 3 ways
• Single register (Accumulator) organization
❖Basic Computer is a good example
❖Accumulator is the only general purpose register
❖Example: ADD X /* AC  AC + M[X] */
• General register organization
❖Used by most modern computer processors
❖Any of the registers can be used as the source or destination for computer operations
❖Example: ADD R1, R2, R3 /* R1  R2 + R3 */
ADD R1, R2 /* R1  R1 + R2 */
• Stack organization
❖All operations are done using the hardware stack
❖For example, an OR instruction will pop the two top elements from the stack, do a logical OR on them,
and push the result on the stack
❖Example: PUSH X /* TOS  M[X] */
Instruction Format
Prof. K. Adisesha (Ph. D) 12
Instruction Fields:
A computer has verity of instruction code formats where the control unit in CPU interprets
each instruction to process the instruction.
➢ The most common field in instruction formats are:
❖ OP-code field - specifies the operation to be performed
❖ Address field - designates memory address(es) or a processor register(s)
❖ Mode field - determines how the address field is to be interpreted (to get effective address
or the operand)
➢ The number of address fields in the instruction format depends on the internal organization of
CPU
Instruction Format
Prof. K. Adisesha (Ph. D) 13
Types of Computer Instructions:
A computer instruction formats may be of fixed or varying length depending on internal
organization of its registers.
➢ Types of Computers instruction formats are:
❖ Four address instruction-
❖ Three address instruction-
❖ Two address instruction-
❖ One address instruction-
❖ Zero address instruction-
Instruction Format
Prof. K. Adisesha (Ph. D) 14
• Three-Address Instructions
The instruction specifies three address. In these fields, either a processor register or a memory operand can be
specified
Program to evaluate X = (A + B) * (C + D) :
ADD R1, A, B /* R1  M[A] + M[B] */
ADD R2, C, D /* R2  M[C] + M[D] */
MUL X, R1, R2 /* M[X]  R1 * R2 */
- Results in short programs
- Instruction becomes long (many bits)
• Two-Address Instructions
There are most commonly used in commercial computers. Each address field can specify either a processor register
or Memory word
Program to evaluate X = (A + B) * (C + D) :
MOV R1, A /* R1  M[A] */
ADD R1, B /* R1  R1 + M[A] */
MOV R2, C /* R2  M[C] */
ADD R2, D /* R2  R2 + M[D] */
MUL R1, R2 /* R1  R1 * R2 */
MOV X, R1 /* M[X]  R1 */
Instruction Format
Prof. K. Adisesha (Ph. D) 15
• One-Address Instructions
- Use an implied AC register for all data manipulation
Program to evaluate X = (A + B) * (C + D) :
• Zero-Address Instructions
Can be found in a stack-organized computer
Program to evaluate X = (A + B) * (C + D) :
LOAD A /* AC  M[A] */
ADD B /* AC  AC + M[B] */
STORE T /* M[T]  AC */
LOAD C /* AC  M[C] */
ADD D /* AC  AC + M[D] */
MUL T /* AC  AC * M[T] */
STORE X /* M[X]  AC */
PUSH A /* TOS  A */
PUSH B /* TOS  B */
ADD /* TOS  (A + B) */
PUSH C /* TOS  C */
PUSH D /* TOS  D */
ADD /* TOS  (C + D) */
MUL /* TOS  (C + D) * (A + B) */
POP X /* M[X]  TOS */
Addressing Modes
Prof. K. Adisesha (Ph. D) 16
Addressing Modes:
Specifies a rule for interpreting or modifying the address field of the instruction (before the
operand is actually referenced).
➢ Variety of addressing modes
❖ To give programming flexibility to the user
❖ To use the bits in the address field of the instruction efficiently
➢ Types Of Addressing Modes:
❖ Implied Mode
❖ Immediate Mode
❖ Register Mode
❖ Register Indirect Mode
❖ Autoincrement or Autodecrement Mode
❖ Direct Address Mode
❖ Indirect Addressing Mode
❖ Relative Addressing Modes
Addressing Modes
Prof. K. Adisesha (Ph. D) 17
Types of Addressing Modes:
➢ Implied Mode:
❖ Address of the operands are specified implicitly in the definition of the instruction
- No need to specify address in the instruction
- EA = AC, or EA = Stack [SP]
❖ Examples from Basic Computer
CLA, CME, INP
➢ Immediate Mode:
❖ Instead of specifying the address of the operand, operand itself is specified
• No need to specify address in the instruction
• However, operand itself needs to be specified sometimes, require more bits than the
address
• Fast to acquire an operand
Addressing Modes
Prof. K. Adisesha (Ph. D) 18
Register Mode
Address specified in the instruction is the register address
▪ Designated operand need to be in a register
▪ Shorter address than the memory address
▪ Saving address field in the instruction
▪ Faster to acquire an operand than the memory addressing
▪ EA = IR(R) (IR(R): Register field of IR)
Register Indirect Mode
Instruction specifies a register which contains the memory address of the operand
▪ Saving instruction bits since register address is shorter than the memory address
▪ Slower to acquire an operand than both the register addressing or memory addressing
▪ EA = [IR(R)] ([x]: Content of x)
Autoincrement or Autodecrement Mode
When the address in the register is used to access memory, the value in the register is
incremented or decremented by 1 automatically
ADDRESSING MODES
Prof. K. Adisesha (Ph. D) 19
Direct Address Mode
Instruction specifies the memory address which can be used directly to access the memory
▪ Faster than the other memory addressing modes
▪ Too many bits are needed to specify the address for a large physical memory space
▪ EA = IR(addr) (IR(addr): address field of IR)
Indirect Addressing Mode
The address field of an instruction specifies the address of a memory location that contains
the address of the operand
▪ When the abbreviated address is used large physical memory can be addressed with a
relatively small number of bits
▪ Slow to acquire an operand because of an additional memory access
▪ EA = M[IR(address)]
Addressing Modes
Prof. K. Adisesha (Ph. D) 20
Relative Addressing Modes
The Address fields of an instruction specifies the part of the address (abbreviated address)
which can be used along with a designated register to calculate the address of the operand
▪ Address field of the instruction is short
▪ Large physical memory can be accessed with a small number of address bits
▪ EA = f(IR(address), R), R is sometimes implied
3 different Relative Addressing Modes depending on R;
➢ PC Relative Addressing Mode (R = PC)
▪ EA = PC + IR(address)
➢ Indexed Addressing Mode (R = IX, where IX: Index Register)
▪ EA = IX + IR(address)
➢ Base Register Addressing Mode
▪ (R = BAR, where BAR: Base Address Register)
▪ EA = BAR + IR(address)
Addressing Modes
Prof. K. Adisesha (Ph. D) 21
Addressing Modes
- Examples -
DATA TRANSFER INSTRUCTIONS
Prof. K. Adisesha (Ph. D) 22
Data Transfer Instructions
- Examples -
Data Manipulation Instructions
Prof. K. Adisesha (Ph. D) 23
Three Basic Types Data Manipulation Instructions:
➢ Arithmetic instructions
➢ Logical and bit manipulation instructions
➢ Shift instructions
- Examples -
Flag, Processor Status Word
Prof. K. Adisesha (Ph. D) 24
Flag, Processor Status Word (PSW):
In Basic Computer, the processor had several (status) flags – 1 bit value that indicated
various information about the processor’s state – E, FGI, FGO, I, IEN, R.
➢ In some processors, flags like these are often combined into a register – the processor status
register (PSR); sometimes called a processor status word (PSW)
➢ Common flags in PSW are
❖ C (Carry): Set to 1 if the carry out of the ALU is 1
❖ S (Sign): The MSB bit of the ALU’s output
❖ Z (Zero): Set to 1 if the ALU’s output is all 0’s
❖ V (Overflow): Set to 1 if there is an overflow
Program Control
Prof. K. Adisesha (Ph. D) 25
Program Control Instructions :
A computer when executes an program control instruction formats may change the address
value in the program counter and cause the program flow control.
➢ Types of Program Control instruction are:
❖ Branch instruction-
❖ Jump instruction-
❖ Skip instruction-
❖ Subroutines instruction-
❖ Comparison instruction-
❖ Test instruction-
Program Control
Prof. K. Adisesha (Ph. D) 26
Branch Instructions :
The Branch instruction causes a transfer changes the address value in program counter and
causes the change in program flow control.
➢ The branch instruction is usually a one address instruction.
➢ Branch and Jump instructions are:
❖ Conditional instruction-
❖ Unconditional instruction-
Program Control
Prof. K. Adisesha (Ph. D) 27
Subroutine Instruction :
A subroutine is a self contained sequence of instructions that performs a given computational
task. A subroutine is called to perform its function at various points in the main program.
➢ The instructions that transfer the Program control to subroutine are:
❖ Call Subroutine-
❖ Jump to Subroutine-
❖ Branch Subroutine-
❖ Branch and Save Address-
➢ Two Most Important Operations are Implied:
❖ Branch to the beginning of the Subroutine
- Same as the Branch or Conditional Branch
❖ Save the Return Address to get the address of the location
in the Calling Program upon exit from the Subroutine
Program Interrupt
Prof. K. Adisesha (Ph. D) 28
Interrupt Procedure:
The interrupt is usually initiated by an internal or an external signal rather than from the
execution of an instruction (except for the software interrupt).
➢ The address of the interrupt service program is determined by the hardware rather than from
the address field of an instruction
➢ An interrupt procedure usually stores all the information necessary to define the state of CPU
rather than storing only the PC.
➢ Types of Interrupts
❖ External interrupts
❖ Internal interrupts (traps)
❖ Software Interrupts
Program Interrupt
Prof. K. Adisesha (Ph. D) 29
Types of Interrupts:
➢ External interrupts: External Interrupts initiated from the outside of CPU and Memory
▪ I/O Device → Data transfer request or Data transfer complete
▪ Timing Device → Timeout
▪ Power Failure
▪ Operator
➢ Internal interrupts (traps): Internal Interrupts are caused by the currently running program
▪ Register, Stack Overflow
▪ Divide by zero
▪ OP-code Violation
▪ Protection Violation
➢ Software Interrupts: Both External and Internal Interrupts are initiated by the computer HW.
▪ Software Interrupts are initiated by the executing an instruction.
▪ Supervisor Call → Switching from a user mode to the supervisor mode, Allows to execute a
certain class of operations which are not allowed in the user mode
Program Interrupt
Prof. K. Adisesha (Ph. D) 30
Types of Interrupts:
➢ External interrupts: External Interrupts initiated from the outside of CPU and Memory
▪ I/O Device → Data transfer request or Data transfer complete
▪ Timing Device → Timeout
▪ Power Failure
▪ Operator
➢ Internal interrupts (traps): Internal Interrupts are caused by the currently running program
▪ Register, Stack Overflow
▪ Divide by zero
▪ OP-code Violation
▪ Protection Violation
➢ Software Interrupts: Both External and Internal Interrupts are initiated by the computer HW.
▪ Software Interrupts are initiated by the executing an instruction.
▪ Supervisor Call → Switching from a user mode to the supervisor mode, Allows to execute a
certain class of operations which are not allowed in the user mode
Microprocessor Organization
Prof. K. Adisesha (Ph. D) 31
Microprocessor Organization:
It is a computer processor that incorporates all the functions of CPU on a single IC
(Integrated Circuit) or at the most a few ICs.
➢ Microprocessor performs three basic things while executing the instruction:
❖ It performs some basic operations like addition, subtraction, multiplication, division and
some logical operations using its Arithmetic and Logical Unit (ALU).
❖ Data in Microprocessor can move from one location to another.
❖ It has a Program Counter (PC) register that stores the address of next instruction based
on the value of PC, Microprocessor jumps from one location to another and takes
decision.
A typical Microprocessor structure
Microprocessor Organization
Prof. K. Adisesha (Ph. D) 32
Types of Processor Architecture:
➢ IBM System/360: In 1964 was real beginning of modern computer architecture
➢ Distinction between Architecture and Implementation:
❖ Complex Instruction Set Computer (CISC):
▪ CISC is a computer architecture where instructions are such that a single instruction can
execute multiple low level operations like loading from memory, storing into memory or an
arithmetic operation etc.
▪ It has multiple addressing nodes within single instruction. CISC makes use of very few
registers.
❖ Reduced Instruction Set Computer (RISC):
▪ RISC is a computer architecture where instruction are simple and designed to get executed
quickly.
▪ Instructions get completed in one clock cycle this is because of the optimization of instructions
and pipelining.
▪ RISC makes use of multiple registers to avoid large interactions with memory. It has few
addressing nodes.
Microprocessor Organization
Prof. K. Adisesha (Ph. D) 33
Complex Instruction Set Computer (CISC):
These computers with many instructions and addressing modes came to be known as Complex
Instruction Set Computers (CISC)
➢ One goal for CISC machines was to have a machine language instruction to match each high-
level language statement type.
➢ The large number of instructions and addressing modes led CISC machines to have variable
length instruction formats.
➢ Variable length instructions greatly complicate the fetch and decode problem for a processor.
➢ The problems with CISC computers are:
❖ The complexity of the design may slow down the processor,
❖ The complexity of the design may result in costly errors in the processor design and
implementation,
❖ Many of the instructions and addressing modes are used rarely.
Microprocessor Organization
Prof. K. Adisesha (Ph. D) 34
Reduced Instruction Set Computer (RISC)
In the late ‘70s and early ‘80s, Reduced Instruction Set Computers (RISC) were proposed as
an alternative of the CISC style of processors.
➢ The underlying idea behind RISC processors is to simplify the instruction set and reduce
instruction execution time
➢ By having all instructions the same length, reading them in is easy and fast to decode.
➢ RISC processors often feature:
❖ Few instructions
❖ Few addressing modes
❖ Only load and store instructions access memory
❖ All other operations are done using on-processor registers
❖ Fixed length instructions
❖ Single cycle execution of instructions
❖ The control unit is hardwired, not microprogrammed
Microprocessor Organization
Prof. K. Adisesha (Ph. D) 35
Difference between CISC & RISC Architecture
Discussion
Prof. K. Adisesha (Ph. D) 36
Queries ?
Prof. K. Adisesha
9449081542

More Related Content

What's hot

Architecture of 8085
Architecture of 8085Architecture of 8085
Architecture of 8085Sumit Swain
 
8085 Architecture
8085 Architecture8085 Architecture
8085 Architecturedeval patel
 
Microprocessor 8085
Microprocessor 8085Microprocessor 8085
Microprocessor 8085Dhaval Barot
 
Architecture of 8085
Architecture of 8085Architecture of 8085
Architecture of 8085ShivamSood22
 
T imingdiagram
T imingdiagramT imingdiagram
T imingdiagrampuja00
 
Microprocessor 8085 architecture ppt. april 2013
Microprocessor 8085 architecture ppt. april 2013Microprocessor 8085 architecture ppt. april 2013
Microprocessor 8085 architecture ppt. april 2013harshalata
 
Microprocessors and microcontrollers
Microprocessors and microcontrollersMicroprocessors and microcontrollers
Microprocessors and microcontrollersgomathy S
 
Architecture OF 8085
Architecture OF 8085Architecture OF 8085
Architecture OF 8085muneer.k
 
Register Organisation of 8086 Microprocessor
Register Organisation of 8086 MicroprocessorRegister Organisation of 8086 Microprocessor
Register Organisation of 8086 MicroprocessorNikhil Kumar
 
8085-microprocessor
8085-microprocessor8085-microprocessor
8085-microprocessorATTO RATHORE
 
Computer Organization and 8085 microprocessor notes
Computer Organization and 8085 microprocessor notesComputer Organization and 8085 microprocessor notes
Computer Organization and 8085 microprocessor notesLakshmi Sarvani Videla
 
8085 microprocessor
8085 microprocessor8085 microprocessor
8085 microprocessorApar Pramod
 
MICROPROCESSOR INPUT OUTPUT OPERATIONS
MICROPROCESSOR INPUT OUTPUT OPERATIONSMICROPROCESSOR INPUT OUTPUT OPERATIONS
MICROPROCESSOR INPUT OUTPUT OPERATIONSGeorge Thomas
 

What's hot (20)

Architecture of 8085
Architecture of 8085Architecture of 8085
Architecture of 8085
 
microprocessor
 microprocessor microprocessor
microprocessor
 
8085 Architecture
8085 Architecture8085 Architecture
8085 Architecture
 
Microprocessor 8085
Microprocessor 8085Microprocessor 8085
Microprocessor 8085
 
8085 microprocessor
8085 microprocessor8085 microprocessor
8085 microprocessor
 
Architecture of 8085
Architecture of 8085Architecture of 8085
Architecture of 8085
 
microprocessor 8085
microprocessor 8085microprocessor 8085
microprocessor 8085
 
8085 architecture
8085 architecture8085 architecture
8085 architecture
 
8085 microprocessor notes
8085 microprocessor notes8085 microprocessor notes
8085 microprocessor notes
 
T imingdiagram
T imingdiagramT imingdiagram
T imingdiagram
 
Microprocessor 8085 architecture ppt. april 2013
Microprocessor 8085 architecture ppt. april 2013Microprocessor 8085 architecture ppt. april 2013
Microprocessor 8085 architecture ppt. april 2013
 
Microprocessors and microcontrollers
Microprocessors and microcontrollersMicroprocessors and microcontrollers
Microprocessors and microcontrollers
 
Architecture OF 8085
Architecture OF 8085Architecture OF 8085
Architecture OF 8085
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Register Organisation of 8086 Microprocessor
Register Organisation of 8086 MicroprocessorRegister Organisation of 8086 Microprocessor
Register Organisation of 8086 Microprocessor
 
8085-microprocessor
8085-microprocessor8085-microprocessor
8085-microprocessor
 
Computer Organization and 8085 microprocessor notes
Computer Organization and 8085 microprocessor notesComputer Organization and 8085 microprocessor notes
Computer Organization and 8085 microprocessor notes
 
8085 microprocessor
8085 microprocessor8085 microprocessor
8085 microprocessor
 
8085 Architecture
8085 Architecture8085 Architecture
8085 Architecture
 
MICROPROCESSOR INPUT OUTPUT OPERATIONS
MICROPROCESSOR INPUT OUTPUT OPERATIONSMICROPROCESSOR INPUT OUTPUT OPERATIONS
MICROPROCESSOR INPUT OUTPUT OPERATIONS
 

Similar to Central processor organization

Computer Organisation and Architecture
Computer Organisation and ArchitectureComputer Organisation and Architecture
Computer Organisation and ArchitectureSubhasis Dash
 
CPU Register Organization.ppt
CPU Register Organization.pptCPU Register Organization.ppt
CPU Register Organization.pptprathamgunj
 
Ch8_CENTRAL PROCESSING UNIT Registers ALU
Ch8_CENTRAL PROCESSING UNIT Registers ALUCh8_CENTRAL PROCESSING UNIT Registers ALU
Ch8_CENTRAL PROCESSING UNIT Registers ALURNShukla7
 
central processing unit and pipeline
central processing unit and pipelinecentral processing unit and pipeline
central processing unit and pipelineRai University
 
Mca i-u-4 central processing unit and pipeline
Mca i-u-4 central processing unit and pipelineMca i-u-4 central processing unit and pipeline
Mca i-u-4 central processing unit and pipelineRai University
 
Bca 2nd sem-u-4 central processing unit and pipeline
Bca 2nd sem-u-4 central processing unit and pipelineBca 2nd sem-u-4 central processing unit and pipeline
Bca 2nd sem-u-4 central processing unit and pipelineRai University
 
B.sc cs-ii-u-4 central processing unit and pipeline
B.sc cs-ii-u-4 central processing unit and pipelineB.sc cs-ii-u-4 central processing unit and pipeline
B.sc cs-ii-u-4 central processing unit and pipelineRai University
 
central processing unit.ppt
central processing unit.pptcentral processing unit.ppt
central processing unit.pptssuserd27779
 
Chapter8.ppt
Chapter8.pptChapter8.ppt
Chapter8.pptAllwin19
 
Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...
Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...
Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...preethi3173
 
pdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.pptpdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.pptSaurabhPorwal14
 

Similar to Central processor organization (20)

Computer Organisation and Architecture
Computer Organisation and ArchitectureComputer Organisation and Architecture
Computer Organisation and Architecture
 
CPU Register Organization.ppt
CPU Register Organization.pptCPU Register Organization.ppt
CPU Register Organization.ppt
 
Ch8_CENTRAL PROCESSING UNIT Registers ALU
Ch8_CENTRAL PROCESSING UNIT Registers ALUCh8_CENTRAL PROCESSING UNIT Registers ALU
Ch8_CENTRAL PROCESSING UNIT Registers ALU
 
Cpu unit
Cpu unitCpu unit
Cpu unit
 
COA_mod2.ppt
COA_mod2.pptCOA_mod2.ppt
COA_mod2.ppt
 
central processing unit and pipeline
central processing unit and pipelinecentral processing unit and pipeline
central processing unit and pipeline
 
Mca i-u-4 central processing unit and pipeline
Mca i-u-4 central processing unit and pipelineMca i-u-4 central processing unit and pipeline
Mca i-u-4 central processing unit and pipeline
 
UNIT-3.pptx
UNIT-3.pptxUNIT-3.pptx
UNIT-3.pptx
 
Bca 2nd sem-u-4 central processing unit and pipeline
Bca 2nd sem-u-4 central processing unit and pipelineBca 2nd sem-u-4 central processing unit and pipeline
Bca 2nd sem-u-4 central processing unit and pipeline
 
B.sc cs-ii-u-4 central processing unit and pipeline
B.sc cs-ii-u-4 central processing unit and pipelineB.sc cs-ii-u-4 central processing unit and pipeline
B.sc cs-ii-u-4 central processing unit and pipeline
 
Chapter8.ppt
Chapter8.pptChapter8.ppt
Chapter8.ppt
 
Chapter3.ppt
Chapter3.pptChapter3.ppt
Chapter3.ppt
 
CAO_Unit-3.ppt
CAO_Unit-3.pptCAO_Unit-3.ppt
CAO_Unit-3.ppt
 
central processing unit.ppt
central processing unit.pptcentral processing unit.ppt
central processing unit.ppt
 
unit-3-L1.ppt
unit-3-L1.pptunit-3-L1.ppt
unit-3-L1.ppt
 
7. CPU_Unit3 (1).pdf
7. CPU_Unit3 (1).pdf7. CPU_Unit3 (1).pdf
7. CPU_Unit3 (1).pdf
 
Chapter8.ppt
Chapter8.pptChapter8.ppt
Chapter8.ppt
 
Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...
Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...
Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...
 
pdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.pptpdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.ppt
 
Patt patelch04
Patt patelch04Patt patelch04
Patt patelch04
 

More from Prof. Dr. K. Adisesha

Software Engineering notes by K. Adisesha.pdf
Software Engineering notes by K. Adisesha.pdfSoftware Engineering notes by K. Adisesha.pdf
Software Engineering notes by K. Adisesha.pdfProf. Dr. K. Adisesha
 
Software Engineering-Unit 1 by Adisesha.pdf
Software Engineering-Unit 1 by Adisesha.pdfSoftware Engineering-Unit 1 by Adisesha.pdf
Software Engineering-Unit 1 by Adisesha.pdfProf. Dr. K. Adisesha
 
Software Engineering-Unit 2 "Requirement Engineering" by Adi.pdf
Software Engineering-Unit 2 "Requirement Engineering" by Adi.pdfSoftware Engineering-Unit 2 "Requirement Engineering" by Adi.pdf
Software Engineering-Unit 2 "Requirement Engineering" by Adi.pdfProf. Dr. K. Adisesha
 
Software Engineering-Unit 3 "System Modelling" by Adi.pdf
Software Engineering-Unit 3 "System Modelling" by Adi.pdfSoftware Engineering-Unit 3 "System Modelling" by Adi.pdf
Software Engineering-Unit 3 "System Modelling" by Adi.pdfProf. Dr. K. Adisesha
 
Software Engineering-Unit 4 "Architectural Design" by Adi.pdf
Software Engineering-Unit 4 "Architectural Design" by Adi.pdfSoftware Engineering-Unit 4 "Architectural Design" by Adi.pdf
Software Engineering-Unit 4 "Architectural Design" by Adi.pdfProf. Dr. K. Adisesha
 
Software Engineering-Unit 5 "Software Testing"by Adi.pdf
Software Engineering-Unit 5 "Software Testing"by Adi.pdfSoftware Engineering-Unit 5 "Software Testing"by Adi.pdf
Software Engineering-Unit 5 "Software Testing"by Adi.pdfProf. Dr. K. Adisesha
 
Computer Networks Notes by -Dr. K. Adisesha
Computer Networks Notes by -Dr. K. AdiseshaComputer Networks Notes by -Dr. K. Adisesha
Computer Networks Notes by -Dr. K. AdiseshaProf. Dr. K. Adisesha
 
CCN Unit-1&2 Data Communication &Networking by K. Adiaesha
CCN Unit-1&2 Data Communication &Networking by K. AdiaeshaCCN Unit-1&2 Data Communication &Networking by K. Adiaesha
CCN Unit-1&2 Data Communication &Networking by K. AdiaeshaProf. Dr. K. Adisesha
 
CCN Unit-3 Data Link Layer by Dr. K. Adisesha
CCN Unit-3 Data Link Layer by Dr. K. AdiseshaCCN Unit-3 Data Link Layer by Dr. K. Adisesha
CCN Unit-3 Data Link Layer by Dr. K. AdiseshaProf. Dr. K. Adisesha
 
CCN Unit-4 Network Layer by Dr. K. Adisesha
CCN Unit-4 Network Layer by Dr. K. AdiseshaCCN Unit-4 Network Layer by Dr. K. Adisesha
CCN Unit-4 Network Layer by Dr. K. AdiseshaProf. Dr. K. Adisesha
 
CCN Unit-5 Transport & Application Layer by Adi.pdf
CCN Unit-5 Transport & Application Layer by Adi.pdfCCN Unit-5 Transport & Application Layer by Adi.pdf
CCN Unit-5 Transport & Application Layer by Adi.pdfProf. Dr. K. Adisesha
 

More from Prof. Dr. K. Adisesha (20)

Software Engineering notes by K. Adisesha.pdf
Software Engineering notes by K. Adisesha.pdfSoftware Engineering notes by K. Adisesha.pdf
Software Engineering notes by K. Adisesha.pdf
 
Software Engineering-Unit 1 by Adisesha.pdf
Software Engineering-Unit 1 by Adisesha.pdfSoftware Engineering-Unit 1 by Adisesha.pdf
Software Engineering-Unit 1 by Adisesha.pdf
 
Software Engineering-Unit 2 "Requirement Engineering" by Adi.pdf
Software Engineering-Unit 2 "Requirement Engineering" by Adi.pdfSoftware Engineering-Unit 2 "Requirement Engineering" by Adi.pdf
Software Engineering-Unit 2 "Requirement Engineering" by Adi.pdf
 
Software Engineering-Unit 3 "System Modelling" by Adi.pdf
Software Engineering-Unit 3 "System Modelling" by Adi.pdfSoftware Engineering-Unit 3 "System Modelling" by Adi.pdf
Software Engineering-Unit 3 "System Modelling" by Adi.pdf
 
Software Engineering-Unit 4 "Architectural Design" by Adi.pdf
Software Engineering-Unit 4 "Architectural Design" by Adi.pdfSoftware Engineering-Unit 4 "Architectural Design" by Adi.pdf
Software Engineering-Unit 4 "Architectural Design" by Adi.pdf
 
Software Engineering-Unit 5 "Software Testing"by Adi.pdf
Software Engineering-Unit 5 "Software Testing"by Adi.pdfSoftware Engineering-Unit 5 "Software Testing"by Adi.pdf
Software Engineering-Unit 5 "Software Testing"by Adi.pdf
 
Computer Networks Notes by -Dr. K. Adisesha
Computer Networks Notes by -Dr. K. AdiseshaComputer Networks Notes by -Dr. K. Adisesha
Computer Networks Notes by -Dr. K. Adisesha
 
CCN Unit-1&2 Data Communication &Networking by K. Adiaesha
CCN Unit-1&2 Data Communication &Networking by K. AdiaeshaCCN Unit-1&2 Data Communication &Networking by K. Adiaesha
CCN Unit-1&2 Data Communication &Networking by K. Adiaesha
 
CCN Unit-3 Data Link Layer by Dr. K. Adisesha
CCN Unit-3 Data Link Layer by Dr. K. AdiseshaCCN Unit-3 Data Link Layer by Dr. K. Adisesha
CCN Unit-3 Data Link Layer by Dr. K. Adisesha
 
CCN Unit-4 Network Layer by Dr. K. Adisesha
CCN Unit-4 Network Layer by Dr. K. AdiseshaCCN Unit-4 Network Layer by Dr. K. Adisesha
CCN Unit-4 Network Layer by Dr. K. Adisesha
 
CCN Unit-5 Transport & Application Layer by Adi.pdf
CCN Unit-5 Transport & Application Layer by Adi.pdfCCN Unit-5 Transport & Application Layer by Adi.pdf
CCN Unit-5 Transport & Application Layer by Adi.pdf
 
Introduction to Computers.pdf
Introduction to Computers.pdfIntroduction to Computers.pdf
Introduction to Computers.pdf
 
R_Programming.pdf
R_Programming.pdfR_Programming.pdf
R_Programming.pdf
 
Scholarship.pdf
Scholarship.pdfScholarship.pdf
Scholarship.pdf
 
Operating System-2 by Adi.pdf
Operating System-2 by Adi.pdfOperating System-2 by Adi.pdf
Operating System-2 by Adi.pdf
 
Operating System-1 by Adi.pdf
Operating System-1 by Adi.pdfOperating System-1 by Adi.pdf
Operating System-1 by Adi.pdf
 
Operating System-adi.pdf
Operating System-adi.pdfOperating System-adi.pdf
Operating System-adi.pdf
 
Data_structure using C-Adi.pdf
Data_structure using C-Adi.pdfData_structure using C-Adi.pdf
Data_structure using C-Adi.pdf
 
JAVA PPT -2 BY ADI.pdf
JAVA PPT -2 BY ADI.pdfJAVA PPT -2 BY ADI.pdf
JAVA PPT -2 BY ADI.pdf
 
JAVA PPT -5 BY ADI.pdf
JAVA PPT -5 BY ADI.pdfJAVA PPT -5 BY ADI.pdf
JAVA PPT -5 BY ADI.pdf
 

Recently uploaded

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 

Recently uploaded (20)

Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 

Central processor organization

  • 1. Central Processor Organization Prof. K ADISESHA (Ph. D) Computer Architecture
  • 2. Introduction to CPU Organization Introduction Register Organization Program Control Instruction Formats Addressing Modes 2 CPU Organization Prof. K. Adisesha (Ph. D) Data Transfer and Manipulation
  • 3. Introduction Prof. K. Adisesha (Ph. D) 3 MAJOR COMPONENTS OF CPU: The CPU of a computer is made up of following Components: ➢ Storage Components ❖ Registers ❖ Flags ➢ Execution (Processing) Components ❖ Arithmetic Logic Unit(ALU) ❖ Arithmetic calculations, Logical computations, Shifts/Rotates ➢ Transfer Components ❖ Bus ➢ Control Components ❖ Control Unit Register File ALU Control Unit
  • 4. REGISTERS Prof. K. Adisesha (Ph. D) 4 REGISTERS: It is necessary and efficient to store data and address in processor registers, which can be accessed easily by processor. ➢ In Basic Computer, there is only one general purpose register, the Accumulator (AC) ➢ In modern CPUs, there are many general purpose registers ➢ It is advantageous to have many registers ❖ Transfer between registers within the processor are relatively fast ❖ Going “off the processor” to access memory is much slower
  • 5. BUS Organization Prof. K. Adisesha (Ph. D) 5 BUS System Organization: A bus structure consists of a set of common lines, one for each bit of a register, through with information is transferred one at a time . ➢ A digital computer has many registers, the bus provides to transfer information from one register to another ➢ Bus organization for seven CPU register is shown: SELA SELB SELD OPR 3 3 3 5 Control Word ➢ There are 14 binary selection input and their combination value specified a control word
  • 6. Operation of Control Unit Prof. K. Adisesha (Ph. D) 6 The control unit : Directs the information flow through ALU by - Selecting various Components in the system - Selecting the Function of ALU ➢ Example: R1 R2 + R3 Binary Code SELA SELB SELD 000 Input Input None 001 R1 R1 R1 010 R2 R2 R2 011 R3 R3 R3 100 R4 R4 R4 101 R5 R5 R5 110 R6 R6 R6 111 R7 R7 R7 Encoding of register selection fields Control Word SELA SELB SELD OPR 3 3 3 5 Encoding of register selection fields
  • 7. Arithmetic Logic Unit Prof. K. Adisesha (Ph. D) 7 The Arithmetic Logic unit (ALU) : The ALU provides arithmetic and logic operations. ➢ The microoperations encountered in digital computers are classified into four categories: ❖ Register transfer microoperations: transfer binary information between registers ❖ Arithmetic microoperations: performs arithmetic operations on numeric data stored in registers. ❖ Logic microoperations: perform bit manipulation operations on non-numeric data stored in registers. ❖ Shift microoperations: perform shift operations on data stored in registers.
  • 8. Arithmetic Logic Unit Prof. K. Adisesha (Ph. D) 8 The Arithmetic Logic unit (ALU) : ALU CONTROL. ➢ Encoding of ALU operations: OPR Select Operation Symbol 00000 Transfer A TSFA 00001 Increment A INCA 00010 ADD A + B ADD 00101 Subtract A - B SUB 00110 Decrement A DECA 01000 AND A and B AND 01010 OR A and B OR 01100 XOR A and B XOR 01110 Complement A COMA 10000 Shift right A SHRA 11000 Shift left A SHLA
  • 9. Arithmetic Logic Unit Prof. K. Adisesha (Ph. D) 9 The Arithmetic Logic unit (ALU) : ALU CONTROL. ➢ Examples of ALU Microoperations:
  • 10. CPU Organization Prof. K. Adisesha (Ph. D) 10 Types of CPU Organization Most computers fall into any one types of organization or some computers combine the features from more than one organization structure. ➢ The CPU organization in digital computers are classified into three categories: ❖ Single Accumulator Organization: All operations are performed with an implied accumulator register. ❖ General Register Organization: General register type computers employ two or three address fields in their instruction format. ❖ Stack Organization: Computers with stack organization have push and POP instructions which requires an address filed..
  • 11. CPU Organization Prof. K. Adisesha (Ph. D) 11 In general, most processors are organized in one of 3 ways • Single register (Accumulator) organization ❖Basic Computer is a good example ❖Accumulator is the only general purpose register ❖Example: ADD X /* AC  AC + M[X] */ • General register organization ❖Used by most modern computer processors ❖Any of the registers can be used as the source or destination for computer operations ❖Example: ADD R1, R2, R3 /* R1  R2 + R3 */ ADD R1, R2 /* R1  R1 + R2 */ • Stack organization ❖All operations are done using the hardware stack ❖For example, an OR instruction will pop the two top elements from the stack, do a logical OR on them, and push the result on the stack ❖Example: PUSH X /* TOS  M[X] */
  • 12. Instruction Format Prof. K. Adisesha (Ph. D) 12 Instruction Fields: A computer has verity of instruction code formats where the control unit in CPU interprets each instruction to process the instruction. ➢ The most common field in instruction formats are: ❖ OP-code field - specifies the operation to be performed ❖ Address field - designates memory address(es) or a processor register(s) ❖ Mode field - determines how the address field is to be interpreted (to get effective address or the operand) ➢ The number of address fields in the instruction format depends on the internal organization of CPU
  • 13. Instruction Format Prof. K. Adisesha (Ph. D) 13 Types of Computer Instructions: A computer instruction formats may be of fixed or varying length depending on internal organization of its registers. ➢ Types of Computers instruction formats are: ❖ Four address instruction- ❖ Three address instruction- ❖ Two address instruction- ❖ One address instruction- ❖ Zero address instruction-
  • 14. Instruction Format Prof. K. Adisesha (Ph. D) 14 • Three-Address Instructions The instruction specifies three address. In these fields, either a processor register or a memory operand can be specified Program to evaluate X = (A + B) * (C + D) : ADD R1, A, B /* R1  M[A] + M[B] */ ADD R2, C, D /* R2  M[C] + M[D] */ MUL X, R1, R2 /* M[X]  R1 * R2 */ - Results in short programs - Instruction becomes long (many bits) • Two-Address Instructions There are most commonly used in commercial computers. Each address field can specify either a processor register or Memory word Program to evaluate X = (A + B) * (C + D) : MOV R1, A /* R1  M[A] */ ADD R1, B /* R1  R1 + M[A] */ MOV R2, C /* R2  M[C] */ ADD R2, D /* R2  R2 + M[D] */ MUL R1, R2 /* R1  R1 * R2 */ MOV X, R1 /* M[X]  R1 */
  • 15. Instruction Format Prof. K. Adisesha (Ph. D) 15 • One-Address Instructions - Use an implied AC register for all data manipulation Program to evaluate X = (A + B) * (C + D) : • Zero-Address Instructions Can be found in a stack-organized computer Program to evaluate X = (A + B) * (C + D) : LOAD A /* AC  M[A] */ ADD B /* AC  AC + M[B] */ STORE T /* M[T]  AC */ LOAD C /* AC  M[C] */ ADD D /* AC  AC + M[D] */ MUL T /* AC  AC * M[T] */ STORE X /* M[X]  AC */ PUSH A /* TOS  A */ PUSH B /* TOS  B */ ADD /* TOS  (A + B) */ PUSH C /* TOS  C */ PUSH D /* TOS  D */ ADD /* TOS  (C + D) */ MUL /* TOS  (C + D) * (A + B) */ POP X /* M[X]  TOS */
  • 16. Addressing Modes Prof. K. Adisesha (Ph. D) 16 Addressing Modes: Specifies a rule for interpreting or modifying the address field of the instruction (before the operand is actually referenced). ➢ Variety of addressing modes ❖ To give programming flexibility to the user ❖ To use the bits in the address field of the instruction efficiently ➢ Types Of Addressing Modes: ❖ Implied Mode ❖ Immediate Mode ❖ Register Mode ❖ Register Indirect Mode ❖ Autoincrement or Autodecrement Mode ❖ Direct Address Mode ❖ Indirect Addressing Mode ❖ Relative Addressing Modes
  • 17. Addressing Modes Prof. K. Adisesha (Ph. D) 17 Types of Addressing Modes: ➢ Implied Mode: ❖ Address of the operands are specified implicitly in the definition of the instruction - No need to specify address in the instruction - EA = AC, or EA = Stack [SP] ❖ Examples from Basic Computer CLA, CME, INP ➢ Immediate Mode: ❖ Instead of specifying the address of the operand, operand itself is specified • No need to specify address in the instruction • However, operand itself needs to be specified sometimes, require more bits than the address • Fast to acquire an operand
  • 18. Addressing Modes Prof. K. Adisesha (Ph. D) 18 Register Mode Address specified in the instruction is the register address ▪ Designated operand need to be in a register ▪ Shorter address than the memory address ▪ Saving address field in the instruction ▪ Faster to acquire an operand than the memory addressing ▪ EA = IR(R) (IR(R): Register field of IR) Register Indirect Mode Instruction specifies a register which contains the memory address of the operand ▪ Saving instruction bits since register address is shorter than the memory address ▪ Slower to acquire an operand than both the register addressing or memory addressing ▪ EA = [IR(R)] ([x]: Content of x) Autoincrement or Autodecrement Mode When the address in the register is used to access memory, the value in the register is incremented or decremented by 1 automatically
  • 19. ADDRESSING MODES Prof. K. Adisesha (Ph. D) 19 Direct Address Mode Instruction specifies the memory address which can be used directly to access the memory ▪ Faster than the other memory addressing modes ▪ Too many bits are needed to specify the address for a large physical memory space ▪ EA = IR(addr) (IR(addr): address field of IR) Indirect Addressing Mode The address field of an instruction specifies the address of a memory location that contains the address of the operand ▪ When the abbreviated address is used large physical memory can be addressed with a relatively small number of bits ▪ Slow to acquire an operand because of an additional memory access ▪ EA = M[IR(address)]
  • 20. Addressing Modes Prof. K. Adisesha (Ph. D) 20 Relative Addressing Modes The Address fields of an instruction specifies the part of the address (abbreviated address) which can be used along with a designated register to calculate the address of the operand ▪ Address field of the instruction is short ▪ Large physical memory can be accessed with a small number of address bits ▪ EA = f(IR(address), R), R is sometimes implied 3 different Relative Addressing Modes depending on R; ➢ PC Relative Addressing Mode (R = PC) ▪ EA = PC + IR(address) ➢ Indexed Addressing Mode (R = IX, where IX: Index Register) ▪ EA = IX + IR(address) ➢ Base Register Addressing Mode ▪ (R = BAR, where BAR: Base Address Register) ▪ EA = BAR + IR(address)
  • 21. Addressing Modes Prof. K. Adisesha (Ph. D) 21 Addressing Modes - Examples -
  • 22. DATA TRANSFER INSTRUCTIONS Prof. K. Adisesha (Ph. D) 22 Data Transfer Instructions - Examples -
  • 23. Data Manipulation Instructions Prof. K. Adisesha (Ph. D) 23 Three Basic Types Data Manipulation Instructions: ➢ Arithmetic instructions ➢ Logical and bit manipulation instructions ➢ Shift instructions - Examples -
  • 24. Flag, Processor Status Word Prof. K. Adisesha (Ph. D) 24 Flag, Processor Status Word (PSW): In Basic Computer, the processor had several (status) flags – 1 bit value that indicated various information about the processor’s state – E, FGI, FGO, I, IEN, R. ➢ In some processors, flags like these are often combined into a register – the processor status register (PSR); sometimes called a processor status word (PSW) ➢ Common flags in PSW are ❖ C (Carry): Set to 1 if the carry out of the ALU is 1 ❖ S (Sign): The MSB bit of the ALU’s output ❖ Z (Zero): Set to 1 if the ALU’s output is all 0’s ❖ V (Overflow): Set to 1 if there is an overflow
  • 25. Program Control Prof. K. Adisesha (Ph. D) 25 Program Control Instructions : A computer when executes an program control instruction formats may change the address value in the program counter and cause the program flow control. ➢ Types of Program Control instruction are: ❖ Branch instruction- ❖ Jump instruction- ❖ Skip instruction- ❖ Subroutines instruction- ❖ Comparison instruction- ❖ Test instruction-
  • 26. Program Control Prof. K. Adisesha (Ph. D) 26 Branch Instructions : The Branch instruction causes a transfer changes the address value in program counter and causes the change in program flow control. ➢ The branch instruction is usually a one address instruction. ➢ Branch and Jump instructions are: ❖ Conditional instruction- ❖ Unconditional instruction-
  • 27. Program Control Prof. K. Adisesha (Ph. D) 27 Subroutine Instruction : A subroutine is a self contained sequence of instructions that performs a given computational task. A subroutine is called to perform its function at various points in the main program. ➢ The instructions that transfer the Program control to subroutine are: ❖ Call Subroutine- ❖ Jump to Subroutine- ❖ Branch Subroutine- ❖ Branch and Save Address- ➢ Two Most Important Operations are Implied: ❖ Branch to the beginning of the Subroutine - Same as the Branch or Conditional Branch ❖ Save the Return Address to get the address of the location in the Calling Program upon exit from the Subroutine
  • 28. Program Interrupt Prof. K. Adisesha (Ph. D) 28 Interrupt Procedure: The interrupt is usually initiated by an internal or an external signal rather than from the execution of an instruction (except for the software interrupt). ➢ The address of the interrupt service program is determined by the hardware rather than from the address field of an instruction ➢ An interrupt procedure usually stores all the information necessary to define the state of CPU rather than storing only the PC. ➢ Types of Interrupts ❖ External interrupts ❖ Internal interrupts (traps) ❖ Software Interrupts
  • 29. Program Interrupt Prof. K. Adisesha (Ph. D) 29 Types of Interrupts: ➢ External interrupts: External Interrupts initiated from the outside of CPU and Memory ▪ I/O Device → Data transfer request or Data transfer complete ▪ Timing Device → Timeout ▪ Power Failure ▪ Operator ➢ Internal interrupts (traps): Internal Interrupts are caused by the currently running program ▪ Register, Stack Overflow ▪ Divide by zero ▪ OP-code Violation ▪ Protection Violation ➢ Software Interrupts: Both External and Internal Interrupts are initiated by the computer HW. ▪ Software Interrupts are initiated by the executing an instruction. ▪ Supervisor Call → Switching from a user mode to the supervisor mode, Allows to execute a certain class of operations which are not allowed in the user mode
  • 30. Program Interrupt Prof. K. Adisesha (Ph. D) 30 Types of Interrupts: ➢ External interrupts: External Interrupts initiated from the outside of CPU and Memory ▪ I/O Device → Data transfer request or Data transfer complete ▪ Timing Device → Timeout ▪ Power Failure ▪ Operator ➢ Internal interrupts (traps): Internal Interrupts are caused by the currently running program ▪ Register, Stack Overflow ▪ Divide by zero ▪ OP-code Violation ▪ Protection Violation ➢ Software Interrupts: Both External and Internal Interrupts are initiated by the computer HW. ▪ Software Interrupts are initiated by the executing an instruction. ▪ Supervisor Call → Switching from a user mode to the supervisor mode, Allows to execute a certain class of operations which are not allowed in the user mode
  • 31. Microprocessor Organization Prof. K. Adisesha (Ph. D) 31 Microprocessor Organization: It is a computer processor that incorporates all the functions of CPU on a single IC (Integrated Circuit) or at the most a few ICs. ➢ Microprocessor performs three basic things while executing the instruction: ❖ It performs some basic operations like addition, subtraction, multiplication, division and some logical operations using its Arithmetic and Logical Unit (ALU). ❖ Data in Microprocessor can move from one location to another. ❖ It has a Program Counter (PC) register that stores the address of next instruction based on the value of PC, Microprocessor jumps from one location to another and takes decision. A typical Microprocessor structure
  • 32. Microprocessor Organization Prof. K. Adisesha (Ph. D) 32 Types of Processor Architecture: ➢ IBM System/360: In 1964 was real beginning of modern computer architecture ➢ Distinction between Architecture and Implementation: ❖ Complex Instruction Set Computer (CISC): ▪ CISC is a computer architecture where instructions are such that a single instruction can execute multiple low level operations like loading from memory, storing into memory or an arithmetic operation etc. ▪ It has multiple addressing nodes within single instruction. CISC makes use of very few registers. ❖ Reduced Instruction Set Computer (RISC): ▪ RISC is a computer architecture where instruction are simple and designed to get executed quickly. ▪ Instructions get completed in one clock cycle this is because of the optimization of instructions and pipelining. ▪ RISC makes use of multiple registers to avoid large interactions with memory. It has few addressing nodes.
  • 33. Microprocessor Organization Prof. K. Adisesha (Ph. D) 33 Complex Instruction Set Computer (CISC): These computers with many instructions and addressing modes came to be known as Complex Instruction Set Computers (CISC) ➢ One goal for CISC machines was to have a machine language instruction to match each high- level language statement type. ➢ The large number of instructions and addressing modes led CISC machines to have variable length instruction formats. ➢ Variable length instructions greatly complicate the fetch and decode problem for a processor. ➢ The problems with CISC computers are: ❖ The complexity of the design may slow down the processor, ❖ The complexity of the design may result in costly errors in the processor design and implementation, ❖ Many of the instructions and addressing modes are used rarely.
  • 34. Microprocessor Organization Prof. K. Adisesha (Ph. D) 34 Reduced Instruction Set Computer (RISC) In the late ‘70s and early ‘80s, Reduced Instruction Set Computers (RISC) were proposed as an alternative of the CISC style of processors. ➢ The underlying idea behind RISC processors is to simplify the instruction set and reduce instruction execution time ➢ By having all instructions the same length, reading them in is easy and fast to decode. ➢ RISC processors often feature: ❖ Few instructions ❖ Few addressing modes ❖ Only load and store instructions access memory ❖ All other operations are done using on-processor registers ❖ Fixed length instructions ❖ Single cycle execution of instructions ❖ The control unit is hardwired, not microprogrammed
  • 35. Microprocessor Organization Prof. K. Adisesha (Ph. D) 35 Difference between CISC & RISC Architecture
  • 36. Discussion Prof. K. Adisesha (Ph. D) 36 Queries ? Prof. K. Adisesha 9449081542