Prerequisite – Instruction Formats
1. Three-Address Instructions:
Three-address instruction is a format of machine instruction. It has one opcode and three address fields.
2. One-Address Instructions:
One-Address instruction is also a format. It has only two fields. One for opcode and other for operand.
Difference between Three-Address Instruction and One-Address Instruction:
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. |
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.