Hi, Perhaps if you would elaborate a bit on the actual formula you intend to use I can give some hints. Signed/unsigned is fairly trivial unless you mix data of variable size and signed/unsigned then it starts to get a bit tricky :) We have had some disscussions about signed/unsigned on the list check the archives. But a short re-cap ( signed math ): Top bit set (msbit) = Value is negative Top bit clear (msbit) = Value is positive For addition/subtraction you need no special routines, unless there are possibilities for overflow. To 'convert' from negative to positive ( or the other way around ): ;++++++++++++ ; ; NORM_16 - Normalises a 16 bit variable ( i.e make two's complement ) ; argument must point to most significant byte, arg16+1 is lsb NORM_16 MACRO ARG_16 ; first make one's complement COMF LOW(ARG_16+1),F COMF LOW(ARG_16),F ; then add one to form two's complement MOVLW 1 ADDWF LOW(ARG_16+1),F SKPNC ADDWF LOW(ARG_16),F ENDM /Tony -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads