To or from code based on probability