This thesis presents a general theory of nonequilibrium thermodynamics for information processing. Ever since Maxwell's demon was proposed in the nineteenth century, the relationship between thermodynamics and information has attracted much attention because it concerns the foundation...