Hey guys and gals,
an int in java is 4 bytes as we all know i bet.
Trying to break my into 4 bytes :
int foo = 87;
bytes[4] mybyte = new bytes[4];
the problem is i don't really know how to break my int into single bytes
i tried this:
bytes[0] = foo | 1 <<(7-8); //trying to get bits 0-7 here, not working.
not good with shifting, if anyone can give me a boost, it will be much appreciated.
thank you,
Mel