📌  相关文章
📜  3地址指令和1地址指令之间的区别

📅  最后修改于: 2021-06-28 09:15:42             🧑  作者: Mango

先决条件–指令格式
1.三地址指令:
三地址指令是机器指令的一种格式。它具有一个操作码和三个地址字段。

2.一站式指令:
单地址指令也是一种格式。它只有两个字段。一个用于操作码,另一个用于操作数。

三地址指令和一地址指令之间的区别:

Three-Address Instruction One-Address Instruction
It has four fields. It has only two fields.
It has one field for opcode and three fields for address. It also has one field for opcode but there is only one field for address.
It has long instruction length. It has shorter instruction.
There may be three memory accesses needed for an instruction. There is a single memory access needed for an instruction.
It is slower accessing location inside processor than memory. It is faster accessing location inside processor than memory.
It disadvantage i.e. three memory access is eliminated by two-address memory. It eliminated two memory access.
There are three location for operand and result. There is only one location for operand and result.