Computer Instructions

Sarathi E

Computer Instructions

Computer instructions are a series of machine language commands that a specific processor can interpret and execute. The computer carries out tasks based on these given instructions.
An instruction consists of different groups known as fields. These fields include:
The operation code (Opcode) field, which indicates the specific operation to be executed.
The Address field, which holds the location of the operand, such as a register or memory address.
The Mode field, which determines how the operand will be accessed.
 

A basic computer uses three different instruction code formats, which are:

  1. Memory - reference instruction
  2. Register - reference instruction
  3. input - reference instruction
Memory - reference instruction



In a Memory-reference instruction, 12 bits are allocated to specify an address, while one bit, labeled 'I', is used to indicate the addressing mode.

Register - reference instruction


Register-reference instructions are identified by the Opcode 111, with the leftmost bit (bit 15) of the instruction set to 0.
A Register-reference instruction defines an operation to be performed on, or a test of, the AC (Accumulator) register.

Input- Output instruction


Similar to the Register-reference instruction, an Input-Output instruction doesn't require a memory reference and is identified by the Opcode 111, with the leftmost bit set to 1. The remaining 12 bits specify the type of input-output operation or test to be execute

Note

The three operation code bits in positions 12 through 14 must be 111. If they are not, the instruction is classified as a memory-reference type, and the bit in position 15 indicates the addressing mode I.
When the three operation code bits are 111, the control unit checks the bit in position 15. If this bit is 0, the instruction is a register-reference type. If the bit is 1, the instruction is an input-output type.

Instruction Set Completeness

A set of instructions is considered complete if the computer has a sufficient number of instructions in each of the following categories:
  • Arithmetic, logical, and shift instructions.
  • Instructions for transferring information between memory and processor registers.
  • Instructions that control the program flow, along with those that check status conditions.
  • Input and Output instructions.
Arithmetic, logic, and shift instructions offer computational capabilities for handling the types of data the user may need.
A large amount of binary information is stored in the memory unit, but all computations are performed in processor registers. Therefore, it is essential to have the ability to transfer information between these two units.
Program control instructions, such as branch instructions, are used to alter the sequence in which the program is executed.
Input and Output instructions serve as an interface between the computer and the user. They handle the transfer of programs and data into memory, as well as the delivery of computation results back to the user.






 
Our website uses cookies to enhance your experience. Learn More
Accept !

GocourseAI

close
send