I know you can get the first byte by using
int x = number & ((1<<8)-1);
or
int x = number & 0xFF;
int nth = (number >> (n * 8)) & 0xFF;
Carry it into the lowest byte and take it in the "familiar" manner.