Java Integer lowestOneBit()

tutorial and example
tutorial and example

The lowestOneBit () method of Java Integer class returns an int value with at most a single one-bit, in the position of the lowest-order one-bit in the specified int value.

 Syntax

public static int lowestOneBit(int i)

 Parameters

The parameter ‘i’ represents the value whose lowest one bit is to be calculated.

 Return Value

This method returns an int value with a single one-bit in the lowest-order position.

Example 1

Output

Example 2

Output

Example 3

Output

Example 4

Output