It is commonly known that tempF = (9/5)tempC + 32 While helping a friend of mine working with a DS1620, I showed him that 9/5tempC is equal to: (tempC << 1) - (tempC >> 2) + (tempC >> 4) - (tempC >> 6) +.......... I came up with a real short, quick routine to do this if tempC is between 0 and 100. And that started me thinking...... Hmmmm.... How to do it fast if it was negative, and since he really wants it in BCD why convert it to decimal first. So here is my challenge: Your routine is called with a flag called CelsNeg set if the temperature is negative (and clear if it is positive.) You can access it as bsf flags, CelsNeg. The absolute of the temperature is stored in 1/2 step increments is stored in a variable called Celsius. (e.g. 0x02 = 1C, 0x32 = 25C) You must store whether the Fahrenheit is negative or not in a flag called FahrenNeg (also in the flags variable.) Then you must store the value of the Fahrenheit temperature in BCD in one var. (Fahrenheit) If the Fahrenheit temperature won't fit in two digits then you need to set the ConvertError flag. Celsius temperature will range from -55 to 125. Points are scored as follows: ROM locations: 3 per location Speed: 1 per cycle if Error condition 2 per cycle if Celsius temperature is negative 3 per cycle otherwise (0 - 37.5 Celsius) RAM locations: 3 for each temporary RAM needed Lowest score wins! The winner gets...... a free copy of PICBots. ;-) (For those of you that don't know, PICBots is always free. http://www.innovatus.com ) Let the games begin!!!! --Alan +--------------------------------------------------------- | Alan G. Smith | ags@poboxes.com | http://www.innovatus.com/ags