Question: Using ARM: QUESTION 1: Write an assembly language function to compute the sum of the first N numbers between 0 and N. N is passed
Using ARM:
QUESTION 1: Write an assembly language function to compute the sum of the first N numbers between 0 and N. N is passed as an argument to the function. The function will be called as shown below
int sumofFirstNNumbers(int N)
QUESTION 2: Write an assembly language function to accept two integer arguments N1 and N2 and compute the sum of all even numbers between them. An Even number is evently divisible by 2. Please remember , you can divide a number by two by shifting the number to the right. Similarly you can multiply a number by two by shifting the number to the left.
You can then test if a number is even by :
if ((number >> 1)<<1) = = number then the number is even. Otherwise the number is odd.
The function will be called :
int sumofEvenNumbers(int N1, int N2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
