Understand instruction formats for different addressing modes and implement an instruction lifecycle.
1. Define instruction formats for immediate, direct, register, and indirect addressing.
2. Simulate instruction fetch-decode-execute-write back cycle.
In register addressing mode, the operand is stored in one of the processor's registers. The instruction specifies which register contains the operand, and the CPU directly accesses the data from that register.
Key Points:
1. Operand Location: The operand is in the CPU's register, not in memory.
2. Instruction Length: The instruction specifies only the register, resulting in shorter instruction size.
3. Execution Speed: Accessing data from registers is faster compared to accessing data from memory.
4. Hardware Dependency: The number of available registers limits this addressing mode.
5. Common Usage: Used for operations requiring fast and repeated access to data.
This addressing mode is efficient for performing arithmetic or logical operations where operands are stored in registers.