1.

What are the 3 types of Instruction ?Explain with example ?

Answer»

Instruction can be categorized in 3 parts: 

1) One-byte instruction/ one word instruction 

2) Two-byte instruction/two word instruction 

3) Three-byte instruction/three word instruction

ONE BYTE INSTRUCTION: 

This type of instruction requires one memory location. The 8 bit or 1 byte instruction code is called as opcodes that uniquely identifies the instruction. If the instruction is one byte then the timing diagram has only one machine cycle i.e. opcode fetch cycle. it has only one opcode. 

EX- CMA; MOV A,B; ADD C; SUB D; RLC .

TWO BYTE INSTRUCTION:

In this kind of instruction, the first byte is for the opcode and the second byte is for the operand or the code associated with the memory address. such instructions are stored in two consecutive memory locations. if the instruction is two byte, then it requires two machine cycle. The first machine cycle is for opcode fetch and the second machine cycle is either for memory read/memory write i/o read or i/o write. 

EX: MVI B,62; ADI 58; ORI 43; IN 89.

THREE BYTE INSTRUCTION: 

In this type of instruction, the first byte is for opcode and the second and third byte is for an operand code associated with the memory address. Such instructions are stored in 3 consecutive memory locations. If the instruction is of three bytes, then it requires three machine cycles. The first machine cycle is for opcode fetch and the second and third machine cycle is either for memory read/memory write I/O read or I/O write. 

EX: LDA 8062; LXI H, 8057; JMP 7809.



Discussion

No Comment Found

Related InterviewSolutions