Maxwell's demon sorts gas particles by speed — letting fast ones through to the right chamber, slow ones to the left. Work is extracted but Landauer's principle saves the 2nd law: erasing each bit of demon memory costs at least kT ln2 of heat.