That depends on your string encoding.
In ascii, for example:
H = 72 = 1001000
i = 105 = 1101001
0100110101100001011100110110111101101110
356 in binary is101100100
Decimal 30 = binary 11110. The decimal binary code (BCD), however, is 11 0000.
14 decimal in binary is 11102. In octal it is 168 and in hexadecimal it is 0E16.
It is that type of binary code where weights are assigned to each symbol position in the code word.
There is no 'binary formula'. You can say that hydrogen iodide is a binary compound, that is one formed from just two elements. HI is its formula.
Say
110001010110000100100
0100110101100001011100110110111101101110
Thompson (with capital T): 0101010001101000011011110110110101110000011100110110111101101110
01
01
01100111 01101111 01101111 01100100 01100010 01111001 01100101 = goodbye in binary
Thompson (with capital T): 0101010001101000011011110110110101110000011100110110111101101110
That IS the binary code.
No, HI is not a binary compound. It is a binary molecular compound consisting of hydrogen and iodine atoms.
To represent the name "Sam" in binary code, you need to convert each letter to its ASCII value and then to binary. The ASCII values for 'S', 'a', and 'm' are 83, 97, and 109, respectively. In binary, these values are represented as: 'S' = 01010011, 'a' = 01100001, and 'm' = 01101101. Therefore, "Sam" in binary code is 01010011 01100001 01101101.