Why can we assume an algorithm can be represented as a bit string?
You already have a representation of that function as text.  Convert each character to a one-byte value using the ASCII encoding.  Then the result is a sequence of bytes, i.e., a sequence of bits, i.e., a string over the alphabet $\{0,1\}^*$. That's one example encoding.