The '~' is bitwise 'not', so 64 = 0x40 = 0100000b and ~64 = 1011111b (the lower 5 bits set).
Then '&' is bitwise 'and' and it leaves just the 5 lower bits of timeByte. So, basically, it is a truncation of timeByte to 0..63 range.
decodeTimeStampByte(4c) = 0xC (12)
decodeTimeStampByte(44) = 44
P.S. Yes, I forgot the higher bits. ~64 = 1011111b.
It is either a bug in the code or some intention to leave the sign bit (the 7-th bit) in place.
P.P.S. Seems like an ancient bit-hack to squeeze some more performance
finalthis would be C and would do the same thing, you might need to brush up on your C Edit and the byte -> char or somethingbyteand that c's char is usually unsigned (although afaik not guaranteed by the spec) - not necessary (although in this case yes I think). In C it'd be the usual way to clear a bit.. although usually you'd write that asx & ~(1 << bitToClear)for documentation.