A summer (or precision adder) and an inverter will also do the trick.
A - B = A + (-B)