$_[0] & 0xff # A bitmask to gets the last (8 bit) byte from the integer. # It has exactly the same result as $_[0] % 256 >> 5 # bitshift the result of the above so all but # the 3 MSB drop off the end.