Deal with binary sequences

Hello,
I have come across the necessity for me to deal with binary sequences and I had a few questions.

1- Does any UNIX scripting language provide any tool or command for converting text data to binary sequences? Example of binary sequence: "0x97 0x93 0x85 0x40 0xd5 0xd6 0xd7"

2- If I want to concatenate this one line of binary sequence to a file, do I need to translate it first before using the cat command?

Moving into unknown territory there, I was hoping some of you guys had dealt with similar things at some point. Thanks by advance.

Ok I will expand ny second statement.

How do you insert a line of binary sequence in a file without destroying its structure?

Please post an example of input and expected output. Please make the number base and character set clear, or state that it is raw data. We normally assume ASCII characters, but your sample characters are mostly outside the normal printable range.

Your example looks like hexadecimal rather than binary which may be why nobody has responded.

Please also post the version of Unix/Linux. There are core tools in most unixes to handle conversion.

If you are trying to fix a non-text data file this is not a job for shell scripting.