Solution for integer binary reverse