TWSR &= 0xFC;
that code clears the lowest two bits in the register, so TWSR & 0x03 is always 0 and 4 ^ 0 is 1 as you would expect. If you get the result 142, TWSR must have bit 0 set but I see absolutely no reason for that. To test, don't divide by 1000 in the print. What do you get then?