I saw that you want to make a encryptation algorithm. I have bad news for you: bin$() won't help you too much because it return a string. You need to learn how use bitwise operators(>>,<<,and,or,xor) to handle them as a binary.