Strength reduction

Why do computers sometimes get tired of doing the same math over and over?

Image: FMNLab, CC BY 4.0, via Wikimedia Commons

Strength reduction

Why do computers sometimes get tired of doing the same math over and over?

Imagine you're counting change for a vending machine. Each coin is worth a certain amount, and you need to add up the total for each item sold.

Instead of multiplying the price by the number of items sold, you just add up the price for each item once and then add that total repeatedly. This is simpler and faster for the computer to do.

Example

If an item costs 1.50 and you sell 10, instead of multiplying 1.50 by 10, you just add $1.50 ten times.

Remember this

Computers use strength reduction to replace costly multiplications with cheaper additions, saving time and energy.

Related concepts

Swipe through 100 ML concepts daily

Open Pocket Polymath