Landauer's Principle explains that when info is erased, it requires work.
Each bit erased $\implies \Delta S = -K \ln(2)$. Hence, heat associated is given by $Q = -KT \ln(2)$.
Hence to keep constant temp, that amount of work needs to be put in. This generalises to reversible processes requiring work.