📌  相关文章
📜  三地址指令与一地址指令的区别

📅  最后修改于: 2021-09-12 11:22:28             🧑  作者: 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.