returns a binary representation of a Integer as string. int a=1010; String s=Integer.toBinaryString(a);