Cells often perform computations in response to environmental cues. On general theoretical grounds (Landauer's Principle), it is expected that such computations require cells to consume energy. I will start by giving a general introduction to the relationship between information and thermodynamics using simple examples using ideal gases. I will then discuss the thermodynamics of cellular computations by consider the classic problem, first considered by Berg and Purcell, of determining the concentration of a chemical ligand in the surrounding media. I will show that learning about external concentrations necessitates the breaking of detailed balance and consumption of energy, with greater learning requiring more energy.