  We analyze the thermodynamic costs of the three main approaches to generating
random numbers via the recently introduced Information Processing Second Law.
Given access to a specified source of randomness, a random number generator
(RNG) produces samples from a desired target probability distribution. This
differs from pseudorandom number generators (PRNG) that use wholly
deterministic algorithms and from true random number generators (TRNG) in which
the randomness source is a physical system. For each class, we analyze the
thermodynamics of generators based on algorithms implemented as finite-state
machines, as these allow for direct bounds on the required physical resources.
This establishes bounds on heat dissipation and work consumption during the
operation of three main classes of RNG algorithms---including those of von
Neumann, Knuth and Yao, and Roche and Hoshi---and for PRNG methods. We
introduce a general TRNG and determine its thermodynamic costs exactly for
arbitrary target distributions. The results highlight the significant
differences between the three main approaches to random number generation: One
is work producing, one is work consuming, and the other is potentially
dissipation neutral. Notably, TRNGs can both generate random numbers and
convert thermal energy to stored work. These thermodynamic costs on information
creation complement Landauer's limit on the irreducible costs of information
destruction.
