A digital computer understands instruction written in binary codes also known as machine code ( 0 or 1). That is the reason why non-analog computers are called as digital computers, as they only understand the instruction in 0 or 1.
According to the word length of the Intel 8085, there are three types of instructions:
- 1-Byte instruction
- 2-Byte instruction
- 3-Byte instruction
One-Byte instruction: Also known as 8-bits instruction. In one-byte instruction, there is only the opcode. The Operand is specified in the Opcode itself.
Example: MOV A, C. Machine CODE: 78 The operand and the opcode are specified in the 8 bits or 1 byte.
Two-byte instructions: In 2-byte instruction the one byte is used to specify the Opcode (Operation code) and the second byte is used for an operand which can be DATA or an 8-bit address.
Example: MVI B,05 (Move the data 05H to register B). Machine CODE = 06, 05.
The 8bits (1 byte) will be occupied by the Opcode (MVI B) and other 8bits are used by the data (05). So in total it requires the 16bits.
Three-Byte instruction: In 3-byte instruction the first byte is used by an Opcode while the 2nd and 3rd bytes are either 16-bit data or 16-bit address. In total, it is consist of 32 bits.
Example: LXI H, 8500 (load 8500H to H-L registers pair). Machine CODE = 21,00,85.