as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
create an algorithm to convert decimal numbers to binary numbers.
user
the algorithm can be written as follows: 
1. starting from the rightmost digit, divide the decimal number by 2 and take the remainder. 
2. the remainder is the current bit of the binary number.
3. divide the decimal number by 2 and take the remainder again.
4. this remainder will be the second rightmost bit of the binary number.
5. continue the above steps until the quotient is 0. 
6. the current bit(s) of the binary number should be reversed in order to obtain the final binary number.
assistant