|
From: Eric S. <er...@br...> - 2004-06-11 18:15:00
|
Scott wrote: > Another way to write it in C is: > v = ( ((~sum & a & b) | (sum & ~a & ~b)) & 0x80) ? 1 : 0; I've verified that this produces identical results to my expression. > A perhaps somewhat simpler expression is: > v = ( ((sum ^ ~b) & (a ^ ~b)) & 0x80) ? 1 : 0; Does not seem to give the same results. An error in simplification? Or I suppose it could be an error in my C test program. I could send you the program if you like, not that it's particularly complicated. Eric |