In virtually all programming languages, math is math. Ensure that all of the numerical values are SIGNED; that is that they support positive and negative numbers. (UNSIGNED numbers are always positive). Then merely do the math. SUBTRACT fld1 FROM fld2 or whatever syntax is appropriate for your language.
For five points, what language would use this syntax : SP fld1,fld2 ?
I do not understand what you mean by “conditional formatting” nor do you specify what language you are coding in. The answer to your formatting question is going to be different depending on if you are using FORTRAN or RPG or whatever.