I build a measuring device, which counts the number of pulses in a given time. Unfortunately the fluctuation of the measured values is so big that a single measurement is not very informative. So I would like to implement a running average algorithm, which gives the average of the last eight values. It should add up the last eight values and divide then by 8. but my values can be everything between 256 and 0. If I divide every value before adding them up I get very arbitrary averages from low input numbers due to rounding errors. Is there a possibility to do 16 bit integer arithmetric with two data registers. I think about putting the carry bit of a addition into the second register... All code I made myself by now seems to be very complicated and awkward. Perhaps someone has a more elagant solution for this? Thanks in Advance Cheers Ralf