I am aware of an algorithm I can write to convert a given number into binary, namely the one in which I divide by two and look at the remainder and so forth. However I am missing something crucial.
When I write in my code:
int x = 56;
The computer wants to convert 56 to binary because that is the only language it knows, but it can't divide 56 by 2 because 56 is not in binary. My question is, how does a computer do it? Does it convert each single digit to binary, multiplies by 10 and add them together or is there a faster way?