Quote Originally Posted by srob
... Is it possible for negative temperatures to just XOR before the calculation. i.e. ...
Well, that's half way there ...

That would be what's called the "1's compliment".
But to get the positive value of a negative number, you need the "2's compliment".

So add 1 to it.
Add 1 to 1's compliment and you get 2's compliment.


Or there's PBP's built in function ABS (Absolute Value).
Does the same thing to negative numbers, and still preserves positive ones.

But there's more to your problem, because PBP can't multiply or divide negative numbers. (unless you are using PBPL on an 18F).

So you need to change the formula considerably to make it work.
There's a few examples in here somewhere.

Try searching for "negative DS1820"

Once you get the correct negative result ...
then you can use mister_e's suggestion.
<br>