Thanks, @proteus-h! Yes we can get the entropy generated from the erasure of a single bit from Boltzmann equation( S=kln(W)). In Szilard's engine, if we consider the microstates of the molecule to be 2, i.e W=2. Hence, S=kln(2). Another approach is to calculate the work done by the molecule (isothermal expansion), which equals to kTln(2). Do you know that the Boltzmann equation is inscribed on Boltzmann's gravestone! Actually, it's not just Boltzmann, the Schrödinger equation is also inscribed on Schrödinger's gravestone.
:)