// basic mask, get the low order bit. e.g. 1 for odd, 0 for even. int loBit = i & 0x1; // or boolean odd = ( i & 0x1 ) != 0; // get low order 3 bits. int lo3Bits = i & 0x7; // get low order nibble, 4 bits. int loNibble = i & 0xf; // get low order byte, 8 bits: int loByte = i & 0xff; // or byte loByte = (byte)i;