Landauer's Principle explains that when info is erased, it requires work.
Each bit erased . Hence, heat associated is given by .
Hence to keep constant temp, that amount of work needs to be put in. This generalises to reversible processes requiring work.