answersLogoWhite

0

Sum of n numbers using 8085?

Updated: 8/11/2023
User Avatar

Wiki User

11y ago

Best Answer

Xra a [(making the accumulator zero) or you can also write

mvi a,00 but will probably take more t-states]

lxi h dooo(can be any other address)give the range(n)

mov b,m

mvi c,01

again: add c

inr c

dcr b

jnz again [loop]

inx h

mov m,a

hlt

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Sum of n numbers using 8085?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

To find LCM of n numbers using 8085 programs?

sample program in sum of the series using the formula for s=n/2[2a+{n-1}d] in 8085


Program to find sum of n numbers using recursion function?

int sum(n) { if (n==0) return 0; else return n+sum(n-1); }


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


C program to find sum of n number using for loop?

#include<stdio.h> void main() { long long int sum=0,n,i,b; printf("How many numbers do you want to add?\n"); scanf("%lld",&n); printf("Enter those %lld numbers\n",n); for(i=0;i<n;i++) { scanf("%lld",&b); sum=sum+b; } printf("Sum of all the numbers you entered is %lld",sum); getch(); }


How do you get the sum of consecutive cubed numbers?

The sum of the first n cubed numbers is: [n*(n+1)/2]2 which is the same as the square of the sum of the first n numbers.


How do you find the average of n numbers?

The average of n numbers = (sum of n numbers) / (count of n numbers).


C program for displaying perfect numbers using nested loop?

for (n=1; n<1000; ++n) { for (sum=0, k=1; k<=n/2; ++k) if (n%k==0) sum += k; if (sum==n) printf ("%d\n", n); }


What is the c plus plus program for printing sum to n natural numbers?

main() { int i, n, sum=0; cout<<"Enter the limit"; cin>>n; for(i=0;i<=n;i++) sum=sum+i; cout<<"sum of "<<n<<" natural numbers ="<<sum; getch(); }


What is the sum of the 100th row of pascals triangle?

Sum of numbers in a nth row can be determined using the formula 2^n. For the 100th row, the sum of numbers is found to be 2^100=1.2676506x10^30.


Find the mean of n natural numbers?

Mean = (sum of the n numbers)/n


How do you calculate the sum of all numbers from 1 through 61?

The sum of the first "n" numbers is equal to n(n+1)/2.


What is formula to find sum of n even numbers?

There is no formula that will sum n even numbers without further qualifications: for example, n even numbers in a sequence.