>Andy, > >I'm can't quite get the point you're making. > >The OP said that he has a hex number that he strips the 0x30 from and >then tests to see if it is between 0 and 9. Wrong. He does not have a hex number. He has an unknown ASCII character that he wants to test to see if it is in the range "0" - "9". He was trying to convert it to a BCD digit by XORing the 0x30 portion of it first, but that should have been done after the test. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads