Following successive register updates

A test board contains two registers, R and S. A register is a small storage location inside the processor. Its ALU reads operands and produces results.


Initially, R contains 6 and S contains 4. The board completes the following actions in order. Each action reads the current values before writing its result, and only the named destination changes. Assume every result fits in its register.

  1. Replace R with R + S.
  2. Replace S with 3 × R.
  3. Replace R with S − R.
  4. Replace S with S + R.

Complete the table with the exact integer contents of both registers immediately after each action.


Registers R and S supply operands to an arithmetic logic unit that produces a computed result.


SnapshotRS
After action 1
After action 2
After action 3
After action 4

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Functional Units Questions: