8051 ascending order

Status
Not open for further replies.

4electros

New Member
I need to ask about the mechanism of generating ascending number code,the numbers are taken from a block starting from address 30h and its length stored in address 31h.it's required to put those numbers in ascending order in a block of numbers starting (for example) from address 60h.

any clue will be appreciated.
 
You are refering to a sorting algorithm. The two which might be applicable in your case are the Bubble Sort and the Insertion Sort. Google them and get millions of hits
 
Sorting is complexity of Algorithm. But, it is your solution.

Wow! Syria is beautiful country.
 
4electros said:
what did you mean exactly by sorting and algorithm,i thought that they are the same

One is a verb the other is a noun. Adding the -ing ending to a verb makes it a modifier of the noun.

sort (vt.) arrange a collection of objects according to an ordering rule (eg. ascending or descending)

algorithm (n.) a sequence of steps which lead to a desired result.

A sorting algorithm is different from a random number generating algorithm.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…