Question: Show the code to perform the computation X = A + (B + C) * D + E using microprocessors which use the instruction

Show the code to perform the computation X = A + (B + C) * D + E using microprocessors which use the instruction formats shown below. Each microprocessor has ADD and MUL instructions in its instruction set. Do not modify the values of A, B, C, D and E. If necessary, use temporary location T to store intermediate results. a) 3-operand instructions b) 2-operand instructions c) 1-operand instructions d) 0-operand instructions For your code in the previous problem, microprocessors require the following amounts of time to fetch, decode and execute each instruction. Which microprocessor calculates X the fastest? Microprocessor Microprocessor #0 Instruction Type 0-operand instructions Time per instruction 48 ns Microprocessor #1 1-operand instructions 60 ns Microprocessor #2 2-operand instructions 80 ns Microprocessor #3 3-operand instructions 120 ns
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
