Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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
 
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.

Latest threads

New Articles From Microcontroller Tips

Back
Top