calculate remainder of slots with a mask of size -1
calculate remainder of slots with a mask of size -1