D. F. Welch wrote: > > Barry, > 2's complements are simply the "not" of the value + 1 > > For example: > > movlw 0xFF ; Load -1 into W > xorwf value,f ; Form 1's complement > incf value ; Form 2's complement That is one brute force way to do it. A better way is this: COMF value,f INCF value And if you want to complement W: XORLW 0xff ADDLW 1 I personally prefer Payson's solution for complementing W (which is suitable for the 12-bit cores): ADDWF some_register,W ;new W = old W + x SUBWF some_register,W ;W = x - (old W + x) = -W Another solution (that I believe Payson also posted) was to do this: SUBWF known_zero,W ;W = 0 - W = -W Where 'know_zero' is a file register that is equal to zero (this is very handy for other stuff too). Scott