Saturday, February 18, 2012

Im learning about the fetch execute cycle in computing and want to know if anyone can help me?

1. "Fetch the instruction" from memory.

2. "Decode" the instruction.

3. "Read the effective address" from memory if the instruction has an indirect address.

4. "Execute" the instruction. From the instruction register, the data forming the instruction is decoded by the control unit. It then passes the decoded information as a sequence of control signals to the relevant function units of the CPU to perform the actions required by the instruction such as reading values from registers, passing them to the Arithmetic logic unit (ALU) to add them together and writing the result back to a register. A condition signal is sent back to the control unit by the ALU if it is involved.

5. "Store" in memory any results generated by the operation, or send the results to an output device. The PC is either incremented to address the next instruction or updated to a different address where the next instruction will be fetched.



Can anyone help explain stages 3 and 4 in simple terms?



Thanks|||3. The memory is outside the registers but within the controlled/restricted memory space of the program whether it be accessed via the stack pointer in the stack register or through the heap.



4. Is just letting you know it is running the decoded microcode associated with whatever command you are running and the return values are being stored in the registers for future reference to those stored values or values pointed to from these registers.|||In step 3, the memory address is read.



The address may be explicitly stated (e.g. "Memory address FF34A") or it may be indirectly stated. (Memory address "FF34A plus 2 bytes, which is FF34C") This is often used in arrays, where the first element of the array is listed in memory and each subsequent element is an offset from that memory address.



In step 4, the instruction is executed.



Depending on what kind of instruction it is has a large effect on how the processor handles it. It might be an instruction that says "Write this data in this memory spot." It might be told to perform some kind of arithmetic action (The ALU compares two registers and puts the result in a special "result register")



If the ALU got used (any instruction that requires actual computation and not just juggling data around) it will send back the result as well as a condition signal. The condition signal just says either "everything went fine" or "something went wrong when we tried to perform this action"



Hope this helps.|||3. Instructions often consist of an operator like ADD or CMP plus a memory address from which data is to be used or stored in. Memory addresses aren't always absolute, they can be relative to the program counter or they can be intended to be combined with other register values in some way. The effective address is the memory address that results.



4. This just says that the circuitry is used to perform whatever action is required on the data then the data is written back to a register.
  • yamaha atv
  • mini countryman
  • No comments:

    Post a Comment