binary and hexadecimal converter for ruby