Thanks, Andy, for the DETAILED explanation of adders, subtraction, and complements. I have a somewhat related question. What does the carry flag represent after a PIC subtraction? I've heard from one place that it should be thought of as a "non-negative result" flag, but that doesn't always work. The PSIM simulator gave the following reslts for these values: -4 - -2 = -2 No Carry -4 - 2 = -6 Carry -2 - 4 = -6 Carry -2 - -4 = 2 Carry 4 - -2 = 6 No Carry 2 - -4 = 6 No Carry My 16C84 code looked like this: movlw -4 movwf temp ; temp = -4 movlw -2 ; w = -2 subwf temp, 0 ; w = temp - w (-4 - -2) ; result is -2 (FE) and NO CARRY (positive?) I was bit by this mis-understanding this weekend and my resolution was to AND the result with 0x80 and test for zero to determine a non-negative result. Thanks, Byon ______________________________________ Byon Garrabrant N6BG byon@netcom.com