First law of thermodynamics is stand on the principle of the conservation of power. According to the first law,
ΔQ = W + ΔU Where, Δ Q = heat given to the system
ΔU = Change in internal energy of working fluid (confined ideal gas)
W = Work done by the system
In applying this law special care must be taken in using the sign convention accurately.