Because of different in speeds of cpu the system bus and the memory circut
In the context of the 8085 microprocessor, the ADD instruction takes 1 machine cycle to execute, as it operates directly on the accumulator and the specified register. On the other hand, the LHLD (Load H and L Direct) instruction requires 3 machine cycles, as it involves reading data from a specified memory address into the L and H registers.
Memory that requires power to maintain it is "volatile memory" and includes RAM. RAM is random access memory, and, to keep it simple, the data put in RAM by the microprocessor is lost when power to the RAM is interrupted. That's like when the machine is shut down or loses power. Data stored in RAM "disappears" if the memory is not "kept alive" by the power supply. RAM is not designed to "hold" data when the machine powers off. Computers don't rely on RAM to "remember" what is in it at shut down. When the machine boots up next work cycle, RAM is reloaded with what the microprocessor wants in it to support operations.
an instruction cycle may consist of a number of machine cycles.
Registers are storage locations internal the the processor. CPU instructions operate on these values directly. On RISC processors, all data must be moved into a register before it can be operated. On CISC (Intel) chips, there are a few operations that can load data from RAM, process it, and save the result back out, but the fastest operations work directly with registers. Also, there are registers that are set aside for certain tasks, these generally include a program counter, stack, and flags. Each register also has a size that determines the maximum amount of data that can be processed at a time. The registers on Pentium chips, for example, are 32 bits. Finally, there are generally only a few registers available on a processer. Intel chips, for example, have 6 general purpose registers, and several specialized registers including a base register, stack register, flags register, program counter, and some addressing registers. Memory, or RAM, is located external to the CPU. Generally speaking, data has to be loaded into a CPU register from memory before the CPU can process it, RAM is much slower than registers, there is a lot more RAM than registers, and generally memory can be addressed on a byte boundaries, where registers may not be able to access all the bytes in a register. To summarize: in general, registers are temporary storage in the CPU that holds the data the processor is currently working on, while RAM holds the program instructions and the data the program requires. Hopefuly this helps, --Eric Tolman
Fetch Execute Cycle A more complete form of the Instruction Fetch Execute Cycle can be broken down into the following steps: 1. Fetch Cycle 2. Decode Cycle 3. Execute Cycle 4. Interrupt Cycle 1. Fetch Cycle The fetch cycle begins with retrieving the address stored in the Program Counter (PC). The address stored in the PC is some valid address in the memory holding the instruction to be executed. (In case this address does not exist we would end up causing an interrupt or exception).The Central Processing Unit completes this step by fetching the instruction stored at this address from the memory and transferring this instruction to a special register - Instruction Register (IR) to hold the instruction to be executed. The program counter is incremented to point to the next address from which the new instruction is to be fetched. 2. Decode Cycle The decode cycle is used for interpreting the instruction that was fetched in the Fetch Cycle. The operands are retrieved from the addresses if the need be. 3. Execute Cycle This cycle as the name suggests, simply executes the instruction that was fetched and decoded
Register to register addressing mode is faster because you don't have to do an extra memory access cycle or more.Register to register addressing mode is faster because:Registers are part of and are directly accessibility by the CPU assembly.They electronics that make up a register use more expensive but faster circuitry.Since it does not require memory access, the steps and time involved in memory address decoding and memory access are skipped.
Fetch
In the 8085 microprocessor, the opcode fetch machine cycle is not sufficient on its own for executing the MOV MA instruction. While the opcode fetch cycle is responsible for retrieving the instruction from memory, additional machine cycles are required to perform the data transfer or execution of the instruction. Specifically, the MOV MA instruction involves both an opcode fetch cycle and a memory access cycle to complete the operation. Therefore, multiple machine cycles are necessary for executing this instruction effectively.
The program counter in the processor holds the address of the next instruction needed from main memory. The program counter copies its contents into the memory address register. The memory address register then sends the address along the address bus to main memory and the contents of the memory location specified by the address are sent along the data bus to the memory buffer register. The contents of the memory buffer register are then copied to the current instruction register where they are decoded and executed.
it is defined by access time and cycle time
The program counter in the processor holds the address of the next instruction needed from main memory. The program counter copies its contents into the memory address register. The memory address register then sends the address along the address bus to main memory and the contents of the memory location specified by the address are sent along the data bus to the memory buffer register. The contents of the memory buffer register are then copied to the current instruction register where they are decoded and executed.
fetch
It will require 4 machine cycles, 1.opcode fetch 2.memory read 3. memory read 4. memory write
In an instruction cycle with indirect addressing, the CPU fetches the instruction, decodes it to determine the memory address of the operand stored in a register, fetches the operand from the memory location pointed to by the register, and executes the instruction using the operand. Finally, the CPU stores the result back in memory if needed. This extra step of fetching the operand based on the indirect memory address adds complexity to the instruction cycle.
Fetch cycle is defined as a part of instruction cycle in which data is fetched from the memory pointed by Holds the address of a memory block to be read from or written to) and stores the data in MDR( a two-way register that holds data fetched from memory (and ready for the CPU to process) or data waiting to be stored in memory) for further processing. Instruction cycle= Fetch cycle+ Execute cycle
During the fetch-decode-execute cycle, the Memory Address Register (MAR) holds the address of the memory location from which data is to be fetched or to which data is to be written. In the fetch phase, the MAR is loaded with the address of the next instruction to be executed. The Memory Data Register (MDR) then temporarily holds the data fetched from memory or the data to be written to memory. As the cycle progresses, the contents of the MAR and MDR are updated based on the memory operations required for executing the instruction.
The STA (Store Accumulator) instruction typically requires one machine cycle to execute, as it directly stores the value from the accumulator into the specified memory address. However, the total number of cycles may vary depending on the specific architecture and its memory access timing. In many systems, it could take one cycle for the instruction fetch and another for the memory write, totaling two cycles. Always refer to the specific architecture documentation for precise details.