I know that everything is stored as 0s and 1s in computer memory. To be specific let's take an example of integer. We assign n = 5 and it's equivalent binary would be 101 with 29 leading 0s. It's easy for us to find binary by doing repetitive n%2 and then by n/2. But my question is how does a computer does this conversion as computer cannot do any operation on the given decimal number. If anyone is thinking about writing program to convert decimal to binary, there also the input number is first stored as binary then operations are done. So coming down to my question, how does a computer finds the binary of a number without doing any arithmetic operations. I am highly curious to know about this process.
Correct me if I am wrong somewhere in my thinking process.