# code required for the problem..

This is a discussion on code required for the problem.. within the C Programming forums, part of the General Programming Boards category; hi all.. i am thoroughly confused with the question. could anyone help me out with the code "Question : to ...

1. ## code required for the problem..

hi all..

i am thoroughly confused with the question. could anyone help me out with the code

"Question : to write a C program to sort a sequence of non negative numbers in ascending order. the method used should make use of finding out the smallest integer by converting it to its binary equivalent and be able to process binary representations of integer."

I have attached the word document of the question along.

It would be very helpful if anyone could help me out in this situation.

thank you..

2. There isn't that much to this question. Do you understand how non-negative integers are represented in binary ?

If you do, then you shouldn't be having trouble with coding this, or you need to be more specific about your problem.

If you don't : check this out.

but i need the code.. i am struggling as i am a new student to C programming.

thank you anyways..

4. Doesn't work that way here. Post an attempt and we'll tell you where you went wrong.

5. Did you read the homework announcement? http://cboard.cprogramming.com/annou...t.php?f=4&a=39

The algorithm to be used for this assignment has three steps. Firstly, convert each integer into its equivalent binary representation. Secondly, make a single pass of all the binary representations through a two dimensional array. Thirdly, convert each of the binary representations back into its equivalent integer. The first and third steps can be done by an obvious sequential algorithm. For the second step we set up an array of linear arrays.
Steps 1 and 3 are addressed in Happy_Reaper's link above and here: http://en.wikipedia.org/wiki/Binary_numeral_system

Step 2 could be implemented with any sorting algorithm, such as with the Bubble Sort or Insertion Sort.