- 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

# 8086 program to determine cubes of numbers in an array of n numbers

In this program we will see how to find the cubes of n numbers stored in an array.

## Problem Statement

Write 8086 Assembly language program to calculate cubes of each numbers stored in an array of size n. The array size is stored at location offset 600, and Numbers are stored at 601 onwards.

## Discussion

To solve this problem, we are taking the size of the array into the CL register, and make CH = 00H for counting. Now from each location take the number into accumulator, to make cube, we have to multiply it three times. so we are storing the number temporarily into another register, then multiply AL with AL, and then AL and the value again from that stored location. Thus the cube is generated. After that it is again stored into memory location.

## Input

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

… | … |

600 | 05 |

601 | 02 |

602 | 03 |

603 | 05 |

604 | 01 |

605 | 04 |

… | … |

## Flow Diagram

## Program

## Output

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

… | … |

601 | 08 |

602 | 1B |

603 | 7D |

604 | 01 |

605 | 40 |

… | … |

- Related Questions & Answers
- 8086 program to determine squares of numbers in an array of n numbers
- 8086 program to determine largest number in an array of n numbers
- 8086 program to find average of n numbers
- 8086 program to generate AP series of n numbers
- 8086 program to generate G.P. series of n numbers
- PHP program to find the sum of cubes of the first n natural numbers
- 8085 program to search a number in an array of n numbers
- 8086 program to determine product of corresponding elements of two array elements
- PHP program to find the sum of cubes of natural numbers that are odd
- 8086 program to determine modulus of first array elements corresponding to another array elements
- Summing cubes of natural numbers within a range in JavaScript
- 8086 program to determine subtraction of corresponding elements of two arrays
- 8086 program to determine sum of corresponding elements of two arrays
- 8086 program to find sum of Even numbers in a given series
- 8086 program to find sum of odd numbers in a given series

Advertisements