11-11-2017, 11:08 AM
CS501 Advanced Computer Architecture
Assignment 1 Solution
Fall 2017
QUESTION No. 1
Write the code/instructions to implement the expression A = (B – C) + 15(D - 45) on 3, 2, 1, and 0-address machines
QUESTION NO. 2
Assume opcodes occupy one byte, addresses occupy three bytes, and data values also occupy three bytes. Don’t mix it with code size of instruction.
Solution:
Download attached file for the complete solution of CS501 Assignment 1.
Assignment 1 Solution
Fall 2017
QUESTION No. 1
Write the code/instructions to implement the expression A = (B – C) + 15(D - 45) on 3, 2, 1, and 0-address machines
QUESTION NO. 2
Compute the total memory traffic in bytes for both instruction fetch and instruction execution for the code that implements the expression evaluation for the four machines in question # 1.
Note: Assume opcodes occupy one byte, addresses occupy three bytes, and data values also occupy three bytes. Don’t mix it with code size of instruction.
Solution:
Download attached file for the complete solution of CS501 Assignment 1.