  We present a general formalism for the construction of thermodynamically
consistent stochastic models of non-linear electronic circuits. The devices
constituting the circuit can have arbitrary I-V curves and may include tunnel
junctions, diodes, and MOS transistors in subthreshold operation, among others.
We provide a full analysis of the stochastic non-equilibrium thermodynamics of
these models, identifying the relevant thermodynamic potentials, characterizing
the different contributions to the irreversible entropy production, and
obtaining different fluctuation theorems. Our work provides a realistic
framework to study thermodynamics of computing with electronic circuits. We
demonstrate this point by constructing a stochastic model of a CMOS inverter.
We find that a deterministic analysis is only compatible with the assumption of
equilibrium fluctuations, and analyze how the non-equilibrium fluctuations
induce deviations from its deterministic transfer function. Finally, building
on the CMOS inverter, we propose a full-CMOS design for a probabilistic bit (or
binary stochastic neuron) exploiting intrinsic noise.
