You *could* set upper and lower limits and discard incoming values that fall outside these limits. OTOH, any selection among A, B, C will involve three comparisons; if you swap-if-greater following each comparison the process is equivalent to a bubble sort anyway. -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu]On Behalf Of Mark Rages Sent: Friday, July 15, 2005 1:26 PM To: piclist@mit.edu Subject: [PIC] Design Challenge: Find center of three values Here's a design challenge for you guys: I have values in three file registers: fileA, fileB, fileC. I want to choose the value that's in the middle (numerically) and put it into W. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist