Made binary int decoding a function.