Question: COMPUTER ARCHITECTURE Stack Accumulator Register (register-memory) Register (load-store) Push A Load A Load R1, A Load R1, A Push B Add B Add R3, R1,

COMPUTER ARCHITECTURE

Stack

Accumulator

Register (register-memory)

Register (load-store)

Push A

Load A

Load R1, A

Load R1, A

Push B

Add B

Add R3, R1, B

Load R2, B

Add

Store C

Store R3, C

Add R3, R1, R2

Pop C

Store R3, C

Figure A.2 The code sequence for C = A + B for four classes of instruction sets. Note that the ADD instruction has implicit operands for stack and accumulator architectures and explicit operands for register architectures. It is assumed that A, B, and C all belong in memory and that the values of A and B cannot be destroyed.

For the following assume that integer values A, B, C, D, E, and F reside in memory. Also assume that instruction operation codes are represented in 8 bits, memory addresses are 64 bits, and register addresses are 6 bits.

a. For each instruction set architectures shown in Figure A.2, how many addresses, or names, appear in each instruction for the code to computer C = A + B, and what is the total code size?

b. Some of the instruction set architectures in Figure A.2 destroy operands in the course of computation. This loss of data values from processor internal storage has performance consequences. For each architecture in Figure A.2, write the code sequence to compute:

C = A+B

D = A-E

F = C+D

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!