This animated guide explains how to negate formulas in propositional and first-order logic.
Guide to Negation