This thesis presents a general theory of nonequilibrium thermodynamics for information processing. Ever since Maxwell's demon was proposed in the …