0% found this document useful (0 votes)
25 views

Instruction Code: Addressing Modes

Computer instructions are binary codes that determine a sequence of micro-operations. They contain operation codes and addresses. Operation codes specify the operation, while addresses determine the registers or memory areas used. There are three main parts of an instruction format - opcodes, addressing modes, and addresses. Opcodes represent basic operations like addition. Addressing modes define how a target address is specified, such as directly or indirectly through a pointer. Addresses can be represented directly or indirectly as an operand or its location in memory.

Uploaded by

gyan prakash
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Instruction Code: Addressing Modes

Computer instructions are binary codes that determine a sequence of micro-operations. They contain operation codes and addresses. Operation codes specify the operation, while addresses determine the registers or memory areas used. There are three main parts of an instruction format - opcodes, addressing modes, and addresses. Opcodes represent basic operations like addition. Addressing modes define how a target address is specified, such as directly or indirectly through a pointer. Addresses can be represented directly or indirectly as an operand or its location in memory.

Uploaded by

gyan prakash
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Instruction Code

A computer instruction is a binary code that determines the micro-operations in a


sequence for a computer. They are saved in the memory along with the information.
Each computer has its specific group of instructions.
They can be categorized into two elements as Operation codes (Opcodes) and
Address. Opcodes specify the operation for specific instructions. An address
determines the registers or the areas that can be used for that operation. Operands are
definite elements of computer instruction that show what information is to be operated
on.
It consists of 12 bits of memory that are required to define the address as the memory
includes 4096 words. The 15th bit of the instruction determines the addressing mode
(where direct addressing corresponds to 0, indirect addressing corresponds to 1).
Therefore, the instruction format includes 12 bits of address and 1 bit for the addressing
mode, 3 bits are left for Opcodes.
The following block diagram shows the instruction format for a basic computer.

There are three parts of the Instruction Format which are as follows −

Addressing Modes
Instructions that define the address of a definite memory location are known as memory
reference instructions. The method in which a target address or effective address is
recognized within the instruction is known as addressing mode.
The address field for instruction can be represented in two different ways are as follows

 Direct Addressing − It uses the address of the operand.


 Indirect Addressing − It facilitates the address as a pointer to the operand.
The address of the operand or the target address is called the effective address.
Effective Address (EA) − It defines the address that can be executed as a target
address for a branch type instruction or the address that can be used directly to create
an operand for a computation type instruction, without creating any changes.
Opcodes
An opcode is a collection of bits that represents the basic operations including add,
subtract, multiply, complement, and shift. The total number of operations provided
through the computer determines the number of bits needed for the opcode. The
minimum bits accessible to the opcode should be n for 2n operations. These operations
are implemented on information that is saved in processor registers or memory.

Address
The address is represented as the location where a specific instruction is constructed in
the memory. The address bits of an instruction code is used as an operand and not as
an address. In such methods, the instruction has an immediate operand. If the second
part has an address, the instruction is referred to have a direct address.
There is another possibility in the second part including the address of the operand.
This is referred to as an indirect address. In the instruction code, one bit can signify if
the direct or indirect address is executed.
The figure shows a diagram showing direct and indirect addresses.

You might also like