- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

In this program we will see how to find the average of n numbers in a given series.

Write 8086 Assembly language program to find the average of n numbers stored in a given series starts from memory offset 501. The size of the series is stored at memory offset 500.

To do this task we are initializing the Source Index (SI) register to the starting address of the series. We are also taking the series size into CL. The CL will be used as counter. To store add we are using AL register. Initially set AL to 0. In each iteration we are taking the number from the memory and add them one by one. After addition we are dividing the number with the size of the series to get the average.

Here we are taking the numbers (CF, 24, 2C, 51, 3E. 45) = 1F3. And average is 53

Address | Data |
---|---|

… | … |

500 | 06 |

501 | CF |

502 | 24 |

503 | 2C |

504 | 51 |

505 | 3E |

506 | 45 |

… | … |

Address | Data |
---|---|

… | … |

600 | 53 |

… | … |

- Related Questions & Answers
- 8086 program to generate AP series of n numbers
- 8086 program to generate G.P. series of n numbers
- 8086 program to determine cubes of numbers in an array of n numbers
- 8086 program to determine squares of numbers in an array of n numbers
- Average of Squares of n Natural Numbers?
- 8086 program to determine largest number in an array of n numbers
- PHP program to find the average of the first n natural numbers that are even
- Average of first n even natural numbers?
- Average of first n odd naturals numbers?
- 8086 program to find sum of Even numbers in a given series
- 8086 program to find sum of odd numbers in a given series
- Java program to find the average of given numbers using arrays
- Java program to find the sum of n natural numbers
- 8086 program to multiply two 8-bit numbers
- 8086 program to multiply two 16-bit numbers

Advertisements