> :10010110->A > :(abs (A-10int (A/10)))/10 > > or to test in the 10000 place > > :int ((abs (A-10000 int(A/10000))/10000 An easier way than dividing is with logarithms (base 10).