Question: Write a program to evaluate the arithmetic statement: Using a general register computer with one address instructions. Using a general register computer with zero address

  1. Write a program to evaluate the arithmetic statement:

  1. Using a general register computer with one address instructions.
  2. Using a general register computer with zero address operation instructions.

  1. In the problem, assume that A, B, C, D, E reside in memory. Also assume that opcodes are 8 bits, memory addresses are 64 bits, and register addresses are 6 bits. Translate the following sequence of statements into assembly code for 0-address, 1-address, 2-address, 3-address architectures:

C = A + B;

D = A E;

Some architectures destroy a source/destination operand during computation. You may have to add some extra instructions due to the destruction of an operand. In each case, give a count of such extra instructions needed and mark them. Also find the total size of code in bytes in each case.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!