Earlier today, I wrote: > the PIC16's Carry flag is actually a combination of the Cout bit > and an internal "overflow" bit... This means that, after an > addition or subtraction, you can use the state of the Carry flag as > an under/overflow indicator. Please forget that I said that... It's not accurate. Everything else in that message is fine, though. Also, Jonathan King suggested reading the following two articles: > "A minus B = A + not(B) + 1 (Part 1)" EDN Dec 5 1996, p199-204 > "A minus B = A + not(B) + 1 (Part 2)" EDN Jan 2 1997, p119-128 I took Honathan's advice and read those articles today... They're pretty good. The author doesn't explain two's-complement math in much detail, but he does give an interesting overview of ALU design. -Andy === Andrew Warren - fastfwd@ix.netcom.com === === Fast Forward Engineering - Vista, California === === === === Custodian of the PICLIST Fund -- For more info, see: === === http://www.geocities.com/SiliconValley/2499/fund.html ===