adrian aslett wrote: > > I have a need to convert a byte value into a percentage. By coincidence, I have to do the exact same thing to show a quantity (0-255) on a display of 0-99 bars. unsigned char cByte; unsigned int nPercent; nPercent = (((int)cByte)*100)/256; and the division by 256 is identical to >>8, or just take the high byte. 0--> 0, 255 -> 99.