How does one extract the remainder though in such an operation. Thanks Dan > To the original OP, In C, integer maths always results in the > exact effect > you're looking for. > int v = 1133; > int result = v / 12; > // result == 961. > > > > I've been having a great dilemma in trying to figure out the > > > following: > > > > > > In my application (which I'm using PICC C), I have a > 16-Bit integer > > register which has a range of 0 to 12000 is each number is one inch. > > > > > > For display on an LCD, I want to break up this number into the > > > following > > components: > > > > > > Feet, Inches, and Tenths of Inches > > > > > > So for example, if my number was 11533, I want to be able > > to extract > > > only > > the whole part of the divide by 12 process which would be 961 and > > > the remainder of this operation would be displayed > > separately as well. > > > > > > If anyone has ideas on how to do this, it would be greatly > > > appreciated. > > I've been scratching my head for a few days on this one! > > > > > > Thanks again. > > > Dan > -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics