hi all ..i have a problem with my project and need your help plz ...
i have this code
int [] exp = {32,1,2,3,4,5,4,5,6,7,8,9,8,9,10,11,12,13,12,13,14,15,16,17,16,17,18,19,20,21,20,21,22,23,
24,25,24,25,26,27,28,29,28,29,30,31,32,1};
int [] expword = new int [exp.length];
String s=toenc.getText();
if(s.length() < 32)
JOptionPane.showMessageDialog(null,"Word must be 32");
else{
int[] e = new int[s.length()];
for (int i = 0; i < s.length(); i++) {
e[i] = Character.digit(s.charAt(i), 10);
}
s is the string that i enter in the text field ...i'am entering serie of (32 bit ) in binary and then i transform them to (int []) ...
i want to extend these bits to become 48 bit by the way shown in the (exp array) for example i want the bit in the index(4 and 5) in the (int [] )to be typed 2 times (4 5 4 5) and soo on as shown in the (exp table) and i want them to be in a new table of 48 bits extended from the original table ...and thnx for help in advance