Forum Discussion
Altera_Forum
Honored Contributor
13 years agoAgreed. For multiplying by a fixed number, shifts, adds and subtracts are the way to go. I once wrote a program that would give you the optimal combination in pseudo code. I'll see if I can dig it up somewhere. It basically found two shift values that were above and below the multiplier and then recursively deduced the least expensive path.
-Mux