@Test public void shouldReturnBinaryNumberOrder() { int input = 13; int result = reverseOrder.reverse(input); assertEquals(11, result); }
public int reverse(int number) { int result = 0; while (number != 0) { result <<= 1; result |= number & 1; number >>= 1; } return result; }
ReverseOrderOfBinaryNumber { public int reverse(int number) { int result = 0; while (number != 0) { result <<= 1; result |= number & 1; number >>= 1; } return result; } }
ReverseOrderOfBinaryNumber { public int reverse(int number) { int result = 0; while (number != 0) { result <<= 1; result |= number & 1; number >>= 1; } return result; }  }
ReverseOrderOfBinaryNumber { public int reverse(int number) { int result = 0; while (number != 0) { result <<= 1; result |= number & 1; number >>= 1; } return result; }  int reverse(int number); }
ReverseOrderOfBinaryNumber { public int reverse(int number) { int result = 0; while (number != 0) { result <<= 1; result |= number & 1; number >>= 1; } return result; }  int reverse(int number);  }