| ??? 08/22/08 14:47 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#157666 - Strength reduction Responding to: ???'s previous message |
Simple math. The average of n samples is sum(a1,a2,...an) / n.
But 256 = 2^8, i.e binary 100000000 (eight zeroes). So when n is a factor of 2 (2, 4, 8, 16, ...) you can shift the sum right one or more steps instead of performing the divide. Replacing a division by a factor of 2 with a shift right is called strength-reduction, and is a common method used by compilers to allow the cheapest possible assembler instructions to be used. |
| Topic | Author | Date |
| Integrate decimate... | 01/01/70 00:00 | |
| Strength reduction | 01/01/70 00:00 | |
| >> = Divide and << = Multiply | 01/01/70 00:00 | |
| Decimating | 01/01/70 00:00 | |
| I have also used this approach | 01/01/70 00:00 | |
| Thought process in frequency domain.. | 01/01/70 00:00 | |
| Low-pass filter | 01/01/70 00:00 | |
| Low pass filter selection... | 01/01/70 00:00 | |
| Sample a longer run at high frequency and analyse | 01/01/70 00:00 | |
| Good suggestion | 01/01/70 00:00 | |
| For your application... | 01/01/70 00:00 | |
| Rooling average concept... | 01/01/70 00:00 | |
| Moving Average Filter = Rolling Average Filter | 01/01/70 00:00 | |
| General concept vs. specific algorithm. | 01/01/70 00:00 | |
| Correlated and uncorrelated noise | 01/01/70 00:00 | |
| Your language ... | 01/01/70 00:00 | |
| 'Synchronous'? | 01/01/70 00:00 | |
| Similar but not identical meaning | 01/01/70 00:00 | |
Yes, sounds waayyy better... | 01/01/70 00:00 |



