Computer Architecture
Instruction
J. Rama
AP-SS/ECE
KIT, Coimbatore.
OUTLINE
• Definition of Instruction
• Instruction Format
• Instruction set Operations
• Types of Operands
Define Instruction
• Is a word giving order to a computer processor by a
computer program is called Instruction.
• Its Vocabulary is called Instruction set.
Format of an Instruction
An Instruction contains two fields: Operation code
(OPCODE) and Operands
Example: Consider an instruction
add a, b, c
Opcode Operands
This instruction instructs to perform addition
OPERATION with OPERANDS “b” and “c”.
Also loads the result in “a”.
Instruction Set Operations
• Data Transfer Operation
• Arithmetic Operation
• Logical Operation
• Input Output Operation
• System Control Operation
• Program Control Operation
Examples of Instruction set
• Data Transfer Instruction
• MOVE, LOAD
• Arithmetic Instructions
• ADD, SUB, MUL, DIV
• Logical Instructions
• OR, AND, SHIFT, ROTATE
Examples of Instruction set Contd.,
• Input Output Instructions
• IN, OUT
• System Control Instructions
• Program Control Instructions
• Unconditional Branching
• Conditional
• Sub-routine call
• Interrupt handling
Operands
• Specifies data that is to be operating on or
manipulated, the data itself.
Types of Operands
• Register Operand
eg.,
• Memory Operand
eg., lw $t0,8($s3) # Temporary reg $t0 gets A{8}
• Immediate or Constant Operand
eg., addi $s3,$s3,4 # $s3 = $s3 + 4
add a, b, c
sub d, a, e
Classification of Instruction set
There are two types:
Complex Instruction Set Computer (CISC)
Reduced Instruction Set Computer (RISC)
CISC
• Contains more number of instructions
• to compute complex instructions in the most
efficient way, it was later found that many small,
short instructions could compute complex
instructions more efficiently.
RISC
• Contains less number of instructions
• Frequently used in programs
• The performance of RISC processors is often two to
four times than that of CISC processors because of
simplified instruction set.
• This architecture uses less chip space due to reduced
instruction set.
Instruction Cycle
• Basic operation cycle of a computer is
 Fetch
 Decode
Execute
• Simply FDX
• This cycle is repeated continuously by CPU, from bootup
to shut down the computer.
THANK
YOU

Computer architecture

  • 1.
  • 2.
    OUTLINE • Definition ofInstruction • Instruction Format • Instruction set Operations • Types of Operands
  • 3.
    Define Instruction • Isa word giving order to a computer processor by a computer program is called Instruction. • Its Vocabulary is called Instruction set.
  • 4.
    Format of anInstruction An Instruction contains two fields: Operation code (OPCODE) and Operands Example: Consider an instruction add a, b, c Opcode Operands This instruction instructs to perform addition OPERATION with OPERANDS “b” and “c”. Also loads the result in “a”.
  • 5.
    Instruction Set Operations •Data Transfer Operation • Arithmetic Operation • Logical Operation • Input Output Operation • System Control Operation • Program Control Operation
  • 6.
    Examples of Instructionset • Data Transfer Instruction • MOVE, LOAD • Arithmetic Instructions • ADD, SUB, MUL, DIV • Logical Instructions • OR, AND, SHIFT, ROTATE
  • 7.
    Examples of Instructionset Contd., • Input Output Instructions • IN, OUT • System Control Instructions • Program Control Instructions • Unconditional Branching • Conditional • Sub-routine call • Interrupt handling
  • 8.
    Operands • Specifies datathat is to be operating on or manipulated, the data itself.
  • 9.
    Types of Operands •Register Operand eg., • Memory Operand eg., lw $t0,8($s3) # Temporary reg $t0 gets A{8} • Immediate or Constant Operand eg., addi $s3,$s3,4 # $s3 = $s3 + 4 add a, b, c sub d, a, e
  • 10.
    Classification of Instructionset There are two types: Complex Instruction Set Computer (CISC) Reduced Instruction Set Computer (RISC)
  • 11.
    CISC • Contains morenumber of instructions • to compute complex instructions in the most efficient way, it was later found that many small, short instructions could compute complex instructions more efficiently.
  • 12.
    RISC • Contains lessnumber of instructions • Frequently used in programs • The performance of RISC processors is often two to four times than that of CISC processors because of simplified instruction set. • This architecture uses less chip space due to reduced instruction set.
  • 13.
    Instruction Cycle • Basicoperation cycle of a computer is  Fetch  Decode Execute • Simply FDX • This cycle is repeated continuously by CPU, from bootup to shut down the computer.
  • 14.