Article: Vedic Mathematics in Microcontrollers

Interesting concept: using logical principles from ancient scripture to improve computational performance in electronic devices. I’m aware of a few religious traditions that codify math in their practices, such as Islamic Sufism, so I’m not too surprised that the Indian Sutras might, also.

“By using this technique, an increase in speed up to ten or even 15 times the original can be achieved. “A code written on 8051 series of microcontroller (using Vedic Mathematics) with 12MHz crystal to perform square of a two-digit number takes only 18 microseconds to generate an answer. Any other faster microcontroller, or even a PC, takes more than 200 microseconds in general mathematical methods. This almost eliminates the need of DSP microcontrollers,” says P. Chow Reddy of Interleaved Technologies, Hyderabad.”

“Vedic Mathematics in Microcontrollers”
http://electronicsforu.com/electronicsforu/circuitarchives/view_article.asp?sno=2255&title%20=%20Vedic+Mathematics+in+Microcontrollers&id=13627&article_type=8&b_type=new

I’m skeptical. Cursory research suggests that “Vedic Mathematics” has no basis in ancient religious texts and the methods posited in the 1965 book of the same name no advantages over conventional calculation methods.

1 Like

This approach appears to be simply coding up a number of checks for special cases before doing the calculation the hard way.

I have been playing with a toy compiler for BASIC lately. The most recent work involved writing floating point routines for the AVR. Because multiplication and especially division is expensive in terms of clock cycles, I check for special cases like multiplying by 0 or 1. The covered special cases are much quicker while an operation with two unspecial numbers is slightly slower. The benefit of the “optimization” depends upon how often the special cases come up.

1 Like