Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions