The document discusses different types of instruction codes used in computers. It explains that instruction codes contain operation codes and operands. The operation code specifies the operation to be performed, like addition, subtraction, etc. The operands specify the data on which the operation will be performed, which can be stored in memory or registers. The document outlines three main types of instruction codes - memory reference instructions, register reference instructions, and input-output instructions. It describes the format of each type of instruction and how they are interpreted by the computer.
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