Dim Seconds as Int = Bit.And(iTimeStamp, 0x1F)
Dim Minutes as Int = Bit.ShiftRight(Bit.And(iTimeStamp, 0x3FF), 5)
Dim Hours as Int = Bit.ShiftRight(Bit.And(iTimeStamp, 0xFFFF), 11)
I haven't really tested it, just wanted to give you the concept.
The AND with hex which is really just bit positions is masking out unneeded bits. So if you want the first 5 bits you AND with binary 11111 which is 0x1F. So any number left over will be in the range if 0 to 31.