Java tutorial
public class Main { public static void main(String[] args) { long l = 100; System.out.println("Number = " + l); System.out.println("Binary = " + Long.toBinaryString(l)); System.out.println("Lowest one bit = " + Long.lowestOneBit(l)); System.out.print("Number of leading zeros = "); System.out.println(Long.numberOfLeadingZeros(l)); System.out.print("Number of trailing zeros = "); System.out.println(Long.numberOfTrailingZeros(l)); } }