Hi to all!

This is my first post so I feel like tot tell you that I studied programming in HighSchool and after two years of Mechanical University I found a part time job that choosed me to do some things.

I don't know C to much because I forgot most of it and actually I studyed it too little in the HighSchool (I didn't know I was wasting my time ) and I have some mounths to study it and do the job.

To get to the subject, I want to know the method to transform a decimal number in a binary number, but I want to know it like you write it on a piece of paper.

I kind of remember something and it's like this:

-for exemple to transform number 8810

--------------88/2

--------------88|44/2

---------------0|44|22/2

------------------0|22|11/2

---------------------0|10|5/2

------------------------1|4|2\2

--------------------------- 1|2|1

------------------------------0

I will explain what I did:

-first line I divided 88 by 2;

-44 of the second line is the result of 88 divided by 2;

-88 of the second line is the result of the multiplication of 44 with the same 2;

-0 of the third line is the result of the difference between 88 of the first line and 88 of the second line;

-44 of the second line I divided it by 2;

-forward I followed the same algoritm;

The binary number of 8810 is the red number read from right to left: 10110002 .

My problem is that I don't know if the algoritm is correct, so I ask for help.

Thank you for reading it.