String x;
int z;
System.out.println("Your Plaintext?:");
x = stdin.readLine();
byte[] w = x.getBytes();
for(z = 0; z < w.length; z++)
{
String p = Byte.toString(w[z]);
int i = Integer.parseInt(p);
String by = Integer.toBinaryString(i);
if(by == "100000")
{
by = "0100000";
}
System.out.print(by + " ");
}
I've a problem with this... i don't know why?... characters will be showed in 7 bits binary number but 'space' will be shown in only 6 bits. why? is it going to change the value if i add 0 in front the binary number of SPACE? if no, how to add it since i couldn't make it in my source code.

New Topic/Question
Reply




MultiQuote


|