Sample operation on bits