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

    Problem converting int to binary.

    807589
      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.

      thanks