I've alluded above to a special sign convention used in thermodynamics. It isn't at all complicated. It is just this:
All quantities are measured with respect to the system.The convention is this: anything that comes into the system is positive. Anything that flows out of the system is negative. Thus heat flowing into a system is a positive quantity such as +12 Joules. And heat flowing out of a system is negative, such as -12 Joules.
The same is true of work. If a system causes a weight to move higher, the work done is negative since work is energy and the energy of the surroundings (the weight) has increased so the energy of the system must have decreased. Similarly if the weight drops, it is negative. This is why the work in Equation 4.4.1 is negative.
Paul J. Gans
2003-02-19