A microprocessor has an increment memory direct instruction, which adds 1 to the value in memory location. The instruction has five stages: fetch opcode (four bus clock cycles); fetch operand address (four bus clock cycles); fetch operand (five bus clock cycles); add 1 to operand (three bus clock cycles) and, store operand (two bus clock cycles). How many bus clock cycles are required to execute the instruction
According to the data given,
Fetch opcode : four bus clock cycles,
fetch operand address : four bus clock cycles,
fetch operand : five bus clock cycles,
add 1 to operand : three bus clock cycles,
store operand : two bus clock cycles.
So, the total number of cycles taken to execute the instruction are 4 + 4 + 5 + 3 + 2 = 18 bus clock cycles.
If you have any doubt or query, let me know in the comment. If the solution helps, then do give an upVote to the answer.
Get Answers For Free
Most questions answered within 1 hours.