class ReverseBinaryNumber {

  public int reverse(int input) {
    int result = 1;
    do {
      result <<= 1;
      result |= (input & 1) == 1 ? 0 : 1;
      input >>= 1;
    } while (input != 0);
    result = reverseBitsOrder(result);
    result = removeFirstOne(result);
    return result;
  }

  public  ReverseBinaryNumber();

}