5 Replies Latest reply on Aug 19, 2008 5:43 PM by 807589

    Problem converting int to binary.

      Hi all... i got some problem here and hope some expert can help me... below is part of my coding... i had simplify it.
      int a= int b XOR char c
      String d= d + Integer.toBinaryString(a);

      the problem now is that the length of string d is not constant. sometimes the length is 8 sometimes its 6. how do i make it constantly 8 so that I am able to get back the original value of int a.