SlideShare a Scribd company logo
5
Most read
7
Most read
8
Most read
Instruction Codes
   Type of Instruction Codes
                    Overview




    Unit 3 - Instruction Codes

                 Abhineet Anand

      Computer Science and Engg. Department
University of Petroleum and Energy Studies, Dehradun


              November 26, 2012




            Abhineet Anand     Unit 3 - Instruction Codes
Instruction Codes   Introduction
               Type of Instruction Codes   Operation Code
                                Overview   Operands


Instruction Codes



     A Computer instruction is binary code that specifies a
     sequence of micro operation for the Computer.
     The Computer reads each instruction from memory and
     places it in a control register.
     The control then interprets the binary code of the
     instruction and proceeds to execute it by issuing a
     sequence of micro operations.




                        Abhineet Anand     Unit 3 - Instruction Codes
Instruction Codes   Introduction
               Type of Instruction Codes   Operation Code
                                Overview   Operands


Instruction Codes


     An instruction code is a group of bits that instruct the
     computer to perform a specific task.
     It is usually divided into parts, each having its own
     particular interpretation.
     They are:
         Operation Code, and
         Operands.
     The most basic part of an instruction code is its operation
     part.



                        Abhineet Anand     Unit 3 - Instruction Codes
Instruction Codes   Introduction
                Type of Instruction Codes   Operation Code
                                 Overview   Operands


Operation Code


     The Operation Code (OpCode) of an instruction is a group
     of bits that define each operation such add, subtract,
     multiply, shift, and complement.
     It must consist of at least n bits for a given 2n distinct
     operations.
     Suppose we are having 64 (26 ) operation then the length
     of OpCode will be 6.
     The control unit decode the OpCode and do the required
     operation.



                         Abhineet Anand     Unit 3 - Instruction Codes
Instruction Codes   Introduction
             Type of Instruction Codes   Operation Code
                              Overview   Operands


Operands

    The Operation must be performed on some data stored in
    processor register or in memory.
    Every Computer has its own particular instruction code
    format.
    The Simplest way to organize a computer is to have an
    instruction code format with two parts.
    The first part specifies the operation to be performed and
    the second specifies an address.




                      Abhineet Anand     Unit 3 - Instruction Codes
Type of Instruction Codes
                       Instruction Codes
                                           Memory - Reference Instruction
               Type of Instruction Codes
                                           Register - Reference Instruction
                                Overview
                                           Input - Output Instruction


Instruction Codes



     The Basic Computer has three instruction code formats.
     The OpCode part of the instruction contains three bits and
     the meaning of the remaining 13 bits depends on the
     operation code encountered.
     The three instruction code formats are:
         Memory - Reference Instruction
         Register - reference Instruction
         Input - Output Operation




                        Abhineet Anand     Unit 3 - Instruction Codes
Type of Instruction Codes
                        Instruction Codes
                                            Memory - Reference Instruction
                Type of Instruction Codes
                                            Register - Reference Instruction
                                 Overview
                                            Input - Output Instruction


Memory - Reference Instruction


     A Memory-Reference instruction uses 12 bits to specify an
     address and one bit to specify the addressing mode I.
     I is equal to 0 for direct address and to 1 for indirect
     address.




                         Abhineet Anand     Unit 3 - Instruction Codes
Type of Instruction Codes
                       Instruction Codes
                                           Memory - Reference Instruction
               Type of Instruction Codes
                                           Register - Reference Instruction
                                Overview
                                           Input - Output Instruction


Register - Reference Instruction

     The Register - Reference instruction are recognized by the
     operation code 111 with 0 in the leftmost bit (bit 15) of the
     instruction.
     It specifies an operation on or a test of the AC register.
     An operand from memory is not needed, so the other 12
     bits are used to specify the operation or test to be
     executed.




                        Abhineet Anand     Unit 3 - Instruction Codes
Type of Instruction Codes
                        Instruction Codes
                                            Memory - Reference Instruction
                Type of Instruction Codes
                                            Register - Reference Instruction
                                 Overview
                                            Input - Output Instruction


Input - Output Instruction


      An Input- Output Instruction does not need a reference to
      memory and recognized by the operation code 111 with a
      1 in the left most bit of the instruction.
      The remaining 12 bits are used to specify the type of
      input-output operation or test performed.




                         Abhineet Anand     Unit 3 - Instruction Codes
Instruction Codes
                                          How to know type of instruction.
              Type of Instruction Codes
                                          Table of Instruction.
                               Overview


OverView



    The type of instruction is recognized from four bits in
    position 12 through 15 of the instruction.
    If the three opcode in position 12 to 14 are not equal to
    111, the instruction is a memory-reference type.
    If these bit position is equal to 111 and 15th position is 0,
    the instruction is a register-reference type otherwise it is
    Input- output type.




                       Abhineet Anand     Unit 3 - Instruction Codes
Instruction Codes
                                      How to know type of instruction.
          Type of Instruction Codes
                                      Table of Instruction.
                           Overview




Becuase of three bits use in the operation code, its seems
that the computer is restricted to a maximum of eight
distinct operations.
However, by using other 12 bits, the total number of
instruction can exceed eight.
In fact, the total number of instruction chosen for the basic
computer is equal to 25.




                   Abhineet Anand     Unit 3 - Instruction Codes
Instruction Codes
                                            How to know type of instruction.
                Type of Instruction Codes
                                            Table of Instruction.
                                 Overview


Table of Instruction.
  The symbol designation is a three-letter word and represents
  an abbreviation intended for programmers and users.
  Memory Reference Instructions




                         Abhineet Anand     Unit 3 - Instruction Codes
Instruction Codes
                                           How to know type of instruction.
               Type of Instruction Codes
                                           Table of Instruction.
                                Overview


Table of Instruction
  Register Reference Instructions




                        Abhineet Anand     Unit 3 - Instruction Codes
Instruction Codes
                            How to know type of instruction.
Type of Instruction Codes
                            Table of Instruction.
                 Overview




             THANK YOU




         Abhineet Anand     Unit 3 - Instruction Codes

More Related Content

PPS
Virtual memory
PPTX
Instruction codes
PPTX
Register organization, stack
PPTX
General register organization (computer organization)
PPTX
Instruction Cycle in Computer Organization.pptx
PPTX
Addressing modes
PPTX
bus and memory tranfer (computer organaization)
PPTX
Cache Memory
Virtual memory
Instruction codes
Register organization, stack
General register organization (computer organization)
Instruction Cycle in Computer Organization.pptx
Addressing modes
bus and memory tranfer (computer organaization)
Cache Memory

What's hot (20)

PPTX
instruction cycle ppt
PPTX
Instruction Execution Cycle
PPTX
Modes of transfer
PPT
Instruction cycle
PPTX
Input Output Organization
PPT
Data transfer and manipulation
PPT
Input output organization
PPTX
Instruction cycle with interrupts
PPTX
Computer architecture instruction formats
PPS
Interrupts
PPTX
Timing and control
PPTX
instruction format and addressing modes
PPTX
Register Reference Instructions | Computer Science
PPS
Computer instructions
PPTX
INSTRUCTION LEVEL PARALLALISM
PPS
Timing and-control-unit
PPTX
Data transfer and manipulation
PPTX
Control unit
PPTX
Operating system memory management
PPTX
Addressing modes
instruction cycle ppt
Instruction Execution Cycle
Modes of transfer
Instruction cycle
Input Output Organization
Data transfer and manipulation
Input output organization
Instruction cycle with interrupts
Computer architecture instruction formats
Interrupts
Timing and control
instruction format and addressing modes
Register Reference Instructions | Computer Science
Computer instructions
INSTRUCTION LEVEL PARALLALISM
Timing and-control-unit
Data transfer and manipulation
Control unit
Operating system memory management
Addressing modes
Ad

Viewers also liked (20)

PPT
Instruction codes and computer registers
PPT
Types of instructions
PPTX
Computer instruction
PPT
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
PPT
Instruction format
PDF
What is CPU Register? Type of CPU Register.
PPT
Memory reference instruction
PDF
Instruction cycle
PDF
Basic Computer Organization and Design
PDF
Logic microoperations
PPT
Assembly Language Lecture 1
PPTX
Logical and shift micro operations
PPTX
Part I:Introduction to assembly language
PPT
Assembly Language Basics
PPT
Assembly Language Lecture 2
PPT
Shift Register
PPT
Digital 9 16
PPTX
digital Counter
PPTX
Cpu registers
Instruction codes and computer registers
Types of instructions
Computer instruction
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Instruction format
What is CPU Register? Type of CPU Register.
Memory reference instruction
Instruction cycle
Basic Computer Organization and Design
Logic microoperations
Assembly Language Lecture 1
Logical and shift micro operations
Part I:Introduction to assembly language
Assembly Language Basics
Assembly Language Lecture 2
Shift Register
Digital 9 16
digital Counter
Cpu registers
Ad

Similar to Instruction code (20)

PDF
Instruction code
PDF
Instruction code
PPTX
Instruction Codes.pptx
PDF
cse211 power point presentation for engineering
PPT
Computer Architecture & Organization
PPTX
Unit IV Fundamentals of Computer Organization.pptx
PPTX
Processor Basics
PDF
CO Unit 3.pdf (Important chapter of coa)
PDF
Chapter 3 computer organization and artpdf
PPTX
Addresing modes
PPTX
instruction format.pptx
PPTX
instruction codes
PPTX
Introduction to Addressing modes in computer memory.pptx
PPTX
UNDERSTANDING ADDRESSING MODES1 IN THE CPU.pptx
PPTX
CSA PPT UNIT 1.pptx
PPTX
Computer organizations and assembly language
PPT
Computer Architecture notes by Beenish Lecture 4.ppt
PPTX
CSe_Cumilla Bangladesh_Country CSE CSE213_5.ppt
PPTX
Basic Computer Organization and Design
PPT
Computer Organization and Architecture.
Instruction code
Instruction code
Instruction Codes.pptx
cse211 power point presentation for engineering
Computer Architecture & Organization
Unit IV Fundamentals of Computer Organization.pptx
Processor Basics
CO Unit 3.pdf (Important chapter of coa)
Chapter 3 computer organization and artpdf
Addresing modes
instruction format.pptx
instruction codes
Introduction to Addressing modes in computer memory.pptx
UNDERSTANDING ADDRESSING MODES1 IN THE CPU.pptx
CSA PPT UNIT 1.pptx
Computer organizations and assembly language
Computer Architecture notes by Beenish Lecture 4.ppt
CSe_Cumilla Bangladesh_Country CSE CSE213_5.ppt
Basic Computer Organization and Design
Computer Organization and Architecture.

More from Dr. Abhineet Anand (12)

PDF
Software Engineering Introduction
PDF
Function in C
PPTX
Key concept
PDF
C language preliminaries
PDF
Finite automata
PDF
Introduction
PDF
Micro program
PDF
Memory organization
PDF
Instruction, interrupts & io processing
Software Engineering Introduction
Function in C
Key concept
C language preliminaries
Finite automata
Introduction
Micro program
Memory organization
Instruction, interrupts & io processing

Instruction code

  • 1. Instruction Codes Type of Instruction Codes Overview Unit 3 - Instruction Codes Abhineet Anand Computer Science and Engg. Department University of Petroleum and Energy Studies, Dehradun November 26, 2012 Abhineet Anand Unit 3 - Instruction Codes
  • 2. Instruction Codes Introduction Type of Instruction Codes Operation Code Overview Operands Instruction Codes A Computer instruction is binary code that specifies a sequence of micro operation for the Computer. The Computer reads each instruction from memory and places it in a control register. The control then interprets the binary code of the instruction and proceeds to execute it by issuing a sequence of micro operations. Abhineet Anand Unit 3 - Instruction Codes
  • 3. Instruction Codes Introduction Type of Instruction Codes Operation Code Overview Operands Instruction Codes An instruction code is a group of bits that instruct the computer to perform a specific task. It is usually divided into parts, each having its own particular interpretation. They are: Operation Code, and Operands. The most basic part of an instruction code is its operation part. Abhineet Anand Unit 3 - Instruction Codes
  • 4. Instruction Codes Introduction Type of Instruction Codes Operation Code Overview Operands Operation Code The Operation Code (OpCode) of an instruction is a group of bits that define each operation such add, subtract, multiply, shift, and complement. It must consist of at least n bits for a given 2n distinct operations. Suppose we are having 64 (26 ) operation then the length of OpCode will be 6. The control unit decode the OpCode and do the required operation. Abhineet Anand Unit 3 - Instruction Codes
  • 5. Instruction Codes Introduction Type of Instruction Codes Operation Code Overview Operands Operands The Operation must be performed on some data stored in processor register or in memory. Every Computer has its own particular instruction code format. The Simplest way to organize a computer is to have an instruction code format with two parts. The first part specifies the operation to be performed and the second specifies an address. Abhineet Anand Unit 3 - Instruction Codes
  • 6. Type of Instruction Codes Instruction Codes Memory - Reference Instruction Type of Instruction Codes Register - Reference Instruction Overview Input - Output Instruction Instruction Codes The Basic Computer has three instruction code formats. The OpCode part of the instruction contains three bits and the meaning of the remaining 13 bits depends on the operation code encountered. The three instruction code formats are: Memory - Reference Instruction Register - reference Instruction Input - Output Operation Abhineet Anand Unit 3 - Instruction Codes
  • 7. Type of Instruction Codes Instruction Codes Memory - Reference Instruction Type of Instruction Codes Register - Reference Instruction Overview Input - Output Instruction Memory - Reference Instruction A Memory-Reference instruction uses 12 bits to specify an address and one bit to specify the addressing mode I. I is equal to 0 for direct address and to 1 for indirect address. Abhineet Anand Unit 3 - Instruction Codes
  • 8. Type of Instruction Codes Instruction Codes Memory - Reference Instruction Type of Instruction Codes Register - Reference Instruction Overview Input - Output Instruction Register - Reference Instruction The Register - Reference instruction are recognized by the operation code 111 with 0 in the leftmost bit (bit 15) of the instruction. It specifies an operation on or a test of the AC register. An operand from memory is not needed, so the other 12 bits are used to specify the operation or test to be executed. Abhineet Anand Unit 3 - Instruction Codes
  • 9. Type of Instruction Codes Instruction Codes Memory - Reference Instruction Type of Instruction Codes Register - Reference Instruction Overview Input - Output Instruction Input - Output Instruction An Input- Output Instruction does not need a reference to memory and recognized by the operation code 111 with a 1 in the left most bit of the instruction. The remaining 12 bits are used to specify the type of input-output operation or test performed. Abhineet Anand Unit 3 - Instruction Codes
  • 10. Instruction Codes How to know type of instruction. Type of Instruction Codes Table of Instruction. Overview OverView The type of instruction is recognized from four bits in position 12 through 15 of the instruction. If the three opcode in position 12 to 14 are not equal to 111, the instruction is a memory-reference type. If these bit position is equal to 111 and 15th position is 0, the instruction is a register-reference type otherwise it is Input- output type. Abhineet Anand Unit 3 - Instruction Codes
  • 11. Instruction Codes How to know type of instruction. Type of Instruction Codes Table of Instruction. Overview Becuase of three bits use in the operation code, its seems that the computer is restricted to a maximum of eight distinct operations. However, by using other 12 bits, the total number of instruction can exceed eight. In fact, the total number of instruction chosen for the basic computer is equal to 25. Abhineet Anand Unit 3 - Instruction Codes
  • 12. Instruction Codes How to know type of instruction. Type of Instruction Codes Table of Instruction. Overview Table of Instruction. The symbol designation is a three-letter word and represents an abbreviation intended for programmers and users. Memory Reference Instructions Abhineet Anand Unit 3 - Instruction Codes
  • 13. Instruction Codes How to know type of instruction. Type of Instruction Codes Table of Instruction. Overview Table of Instruction Register Reference Instructions Abhineet Anand Unit 3 - Instruction Codes
  • 14. Instruction Codes How to know type of instruction. Type of Instruction Codes Table of Instruction. Overview THANK YOU Abhineet Anand Unit 3 - Instruction Codes