Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the following segment of C code, c = (a + b) * a; e = (b + c) * d; f = c +

Given the following segment of C code, c = (a + b) * a; e = (b + c) * d; f = c + e;

Based on the following assumptions on information size: - opcode: 8 bits - each data (operand) item: 16 bits - each register specifer: 4 bits - each address: 16 bits

for each of the following "memory-aligned" machines (a) an 16-bit (0,3)-GPR architecture (b) an 16-bit (1,2)-GPR architecture (c) an 16-bit (3,3)-GPR architecture

recompile the code into the most memory-access-efficient assembly code (write "same" if it is not changed). The effciency is in terms of the total size of memory accesses including the instruction accesses and operand accesses (reads and writes). Calculate the number of total memory accesses in terms of bytes for each of the machines. Note: round to the next larger integer for byte number calculation.

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

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

What are the six main categories of nonverbal signals? [LO-5]

Answered: 1 week ago