a method and apparatus for reducing power consumption needed to refresh a memory may receive data having been encoded using data bus inversion , the dbi data having a first delta between a number of zeros for different cases between zero and a dbi maximum , balance code the dbi data to balance the number of zeros across the dbi data , and output data having a number of zeros for different cases between a minimum number greater than zero and less than or equal to the dbi maximum and a maximum number equal to the minimum number plus a second delta , the second delta being less than the first delta .