I was wondering if it is possible to enter a binary number and translate them back into text. For example, 01101000 01100101 01101100 01101100 01101111 "and will make it secret in the word" hello ".
Just a few logical corrections:
Here are three steps < Ol>
Fortunately a radix takes for the
parseInt basis. Therefore, once you cut an array of substrings necessary to reach string up (perhaps) length 8, or , then you only need to do this
(char) Integer .parseInt (S, 2) and concatenate.
string s2 = ""; For the next four (int i = 0; i & lt; = s.length () - 8; i + = 9) // It is a bit tricky that we want [0, 7], [9, 16] e.t.c. (If the bytes are delimited by increment index 9) {nextChar = (char) Integer.parseInt (s.sstring (i, i + 8), 2); S2 + = nextChar; }
Comments
Post a Comment