  We review and investigate the general theory of thermodynamics of
computation, and derive the fundamental inequalities that set the lower bounds
of the work requirement and the heat emission during a computation. These
inequalities constitute the generalized Landauer principle, where the
information contents are involved in the second law of thermodynamics. We
discuss in detail the relationship between the thermodynamic and logical
reversibilities; the former is related to the entropy production in the total
system including a heat bath, while the latter is related to the entropy change
only in the logical states of the memory. In particular, we clarify that any
logically irreversible computation can be performed in a thermodynamically
reversible manner in the quasi-static limit, which does not contradict the
conventional Landauer principle. Our arguments would serve as the theoretical
foundation of thermodynamics of computation in terms of modern statistical
physics.
