java converting int to binary string results in 64 bits code example Example: java integer to binary string int n = 1000; String s = Integer.toBinaryString(n);