Question

CMPE 263-SPRING 2019-HW-3 Hint. For all the codes required, run them in the Basic Computer Simula...

CMPE 263-SPRING 2019-HW-3

Hint. For all the codes required, run them in the Basic Computer Simulator with two print screens, one shows code, registers, memory involved before run, and the second after run. Without them, the mark will reduce to ½.

Q1.Write a program loop using a pointer and a counter that get the negative of the contents of memory locations 300through 30F.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Program to add two 128 bit data:-

class Add
{
public static void main (String args[])
{
Add operator + (const Add & rhs)
{
int High;
int Low,
Add Sum;
sum.High = High + rhs.High;
sum.Low = Low + rhs.Low;

// now check for overflow of low 64 bits and add a carry to high
if (sum.Low < Low)
++Sum.High;
return Sum;
}
Add operator-(const Add & rhs)
{
Add diff;
diff.High= High- rhs.High;
diff.Low = Low - rhs.Low;
// now check for underflow condition of low 64 bits and subtract carry to high
if (diff.Low> Low)
--diff.High;
return diff;
}

private:
INT64 High;
UINT64 Low;
};

Add a comment
Know the answer?
Add Answer to:
CMPE 263-SPRING 2019-HW-3 Hint. For all the codes required, run them in the Basic Computer Simula...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • CMPE 263-SPRING 2019-HW-3 Hint. For all the codes required, run them in the Basic Computer Simula...

    CMPE 263-SPRING 2019-HW-3 Hint. For all the codes required, run them in the Basic Computer Simulator with two print screens, one shows code, registers, memory involved before run, and the second after run. Without them, the mark will reduce to ½. Q3. Assume in locations A and B resides two 8 bit signed magnitudenumbers. Write an assembly subroutine code to multiply them and saves the result in C location. Start your code from 100. The code should be general for...

  • CMPE 263-SPRING 2019-HW-3 Hint. For all the codes required, run them in the Basic Computer Simulator...

    CMPE 263-SPRING 2019-HW-3 Hint. For all the codes required, run them in the Basic Computer Simulator with two print screens, one shows code, registers, memory involved before run, and the second after run. Without them, the mark will reduce to ½. Q2. Write a subroutine code to divide two positive numbers by repeated subtraction method. For example, to divide 100 over 8 by subtracting 8 from 100 until the reminder be less than 8, then count the times of the...

  • i need help with a mips program to to covert roman numerals to real numbers Lab 4: Roman Numeral Conversion Part A: Due...

    i need help with a mips program to to covert roman numerals to real numbers Lab 4: Roman Numeral Conversion Part A: Due Sunday, 19 May 2019, 11:59 PM Due Friday, 24 May 2019, 11:59 PM Part B: Minimum Submission Requirements Ensure that your Lab4 folder contains the following files (note the capitalization convention): o Diagram.pdf o Lab4. asm O README.txt Commit and push your repository Lab Objective In this lab, you will develop a more detailed understanding of how...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT