Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the following code, we have omitted the definitions of constants M and N: #define M #define N int arith ( int x , int

In the following code, we have omitted the definitions of constants M and N:
#define M
#define N
int arith(int x, int y){
int result =0;
result = x*M + y/N;
return result;
}
We compiled this code for particular values of M and N. The compiler optimized the multiplication and division using the methods discussed in Chaper 2.3. The following is a translation of the generated machine code back into C:
int optarith(int x, int y){
int t = x;
x <<=6;
x -= t*1;
if (y <0) y +=15;

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

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

More Books

Students also viewed these Databases questions

Question

What is conservative approach ?

Answered: 1 week ago

Question

What are the basic financial decisions ?

Answered: 1 week ago

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago