Use bit shifting instead of magic number in rrand().